From caa5c44e46734b2a9f7ada1685cc4b39184a1124 Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Tue, 23 Apr 2013 13:35:35 +0200 Subject: FULLPIPE: Add gameobj.h from the German version --- engines/fullpipe/gameobj.h | 5095 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 5095 insertions(+) create mode 100644 engines/fullpipe/gameobj.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameobj.h b/engines/fullpipe/gameobj.h new file mode 100644 index 0000000000..54a3f85410 --- /dev/null +++ b/engines/fullpipe/gameobj.h @@ -0,0 +1,5095 @@ +#define PIC_MAP_H09 5365 +#define PIC_SC19_RTRUBA31 5320 +#define PIC_SC7_LTRUBA 709 +#define PIC_SC5_RTRUBA1 664 +#define MV_MOM_JUMPFW 661 +#define PIC_SC8_RTRUBA 736 +#define PIC_CSR_LIFT 5176 +#define SC_FINAL4 2460 +#define SND_FIN_009 5081 +#define MV_FNHED_LOOK 5046 +#define ANI_FN3_HEAD 5042 +#define QU_SC32_TRYKUBIK 4981 +#define QU_BRD16_STARTBEARDED 4948 +#define MV_BRDCMN_TURN_RL 4946 +#define SND_CMN_064 4933 +#define PIC_CSR_ARCADE8 4911 +#define SND_22_034 4866 +#define PIC_INV_SWAB_C 4854 +#define PIC_INV_GLASSES_C 4839 +#define PIC_INV_BOARD_C 4824 +#define PIC_INV_COIN_H 4794 +#define PIC_INV_CARPET 1875 +#define MSG_RESTARTGAME 4767 +#define rMV_BRDCMN_FLYAWAY 4740 +#define SND_30_015 4710 +#define MV_EGTR_MD1_SHOW 4694 +#define MV_EGTR_SLIMSHOW 4693 +#define MV_CPT35_NORM 4593 +#define ST_BTN27_NORM 4581 +#define MV_SCK26_NORM 4554 +#define ANI_SOCK_26 4553 +#define SND_34_033 4493 +#define SND_34_022 4482 +#define SND_34_011 4471 +#define SND_33_012 4449 +#define SND_31_003 4381 +#define MV_VNT34_NORM 4308 +#define MV_MAN34_TURNVENT_R 2500 +#define MV_MAN32_PIPETOTUBE 4298 +#define MSG_SC28_ENDLIFT1 4259 +#define MV_MAN25_TRYHAND 4217 +#define MV_MAN_LOOKLADDER_RRV 4212 +#define SND_27_040 4141 +#define SND_25_020 4073 +#define SND_21_024 3978 +#define SND_21_013 3967 +#define SND_21_002 3951 +#define SND_13_032 3777 +#define SND_13_021 3766 +#define SND_12_011 3731 +#define SND_10_013 3679 +#define SND_10_002 3663 +#define SND_7_017 3597 +#define SND_7_006 3586 +#define SND_6_029 3568 +#define SND_6_018 3557 +#define SND_6_007 3544 +#define SND_CMN_031 3516 +#define QU_DRP25_TOFLOOR 3502 +#define MV_MAN25_TRYSPADE 3497 +#define QU_SC28_WORKINSIDE 3449 +#define MV_WMN28_IN_2 3445 +#define QU_MAN_DEF_SHOES1 3380 +#define MV_MAN_STARTSHOES_1 3373 +#define ST_BTH_1 3365 +#define MV_MAN_TURN_SRL 1081 +#define MSG_SC13_CLOSEFAST 1267 +#define MV_CDI_SHOWEYE 3309 +#define QU_GRL_LAUGH_POPA 3281 +#define QU_KZW14_TOEDGE 3272 +#define MSG_SC14_SHOWBALLGMAHIT2 3245 +#define QU_SC5_SND5 3244 +#define QU_SC4_SND4 3238 +#define QU_SC3_SND3 3232 +#define QU_SC2_SND1 3225 +#define SND_4_009 3124 +#define QU_STR_TURNL_L 3058 +#define QU_MID11_LOOK 3033 +#define ANI_CLOCK_8 2989 +#define QU_SC38_SHOWBOTTLE_ONTABLE 2838 +#define ST_LBN_6P 2769 +#define ST_LBN_4N 2762 +#define MV_LBN_2 2755 +#define MV_GRT9_FALL 2720 +#define MV_PTI25_NORM 2674 +#define PIC_SC33_TUMBA 2619 +#define PIC_SC33_LTRUBA 2618 +#define QU_SC35_SHOWHOSE 2519 +#define ST_CTS34_GROWN2 2474 +#define ST_CTS34_EMPTY 2383 +#define MV_DMN38_NORM4 2252 +#define ANI_PORTER 2082 +#define PIC_SC29_RTRUBA 2079 +#define QU_DRV_FROMRIGHT 2037 +#define QU_DRV_LOOKRIGHT2 2035 +#define QU_DRV_STOPDRIVE 2031 +#define ANI_BITA 2026 +#define MV_MID_SWAB2 2024 +#define QU_SC26_OPEN4 1941 +#define MV_MAN25_TOTRUBA 1884 +#define PIC_SC25_LADDERUP 1854 +#define ST_LUK23_CLOSED 1815 +#define QU_SC22_HANDLEDOWN 1804 +#define MV_MAN23_PUSH2 1725 +#define MV_GRFU_STARTKISS 1680 +#define QU_GRFU_STARTCHMOK 1669 +#define QU_GRFB_TAILUP 1644 +#define PIC_SCD_20 1622 +#define PIC_SC21_LADDER 1555 +#define MV_CDI_HIDEEMPTY 1541 +#define MV_MAN18_STANDKRESLO 1500 +#define MV_BOY18_JUMPFROM 1478 +#define QU_SMG_FILLBOTTLE 1433 +#define MSG_SC17_SHOWSUGAR 1416 +#define QU_SC17_SHOWSUGAR 1415 +#define ANI_INV_SUGAR 1410 +#define MSG_SC13_STARTWHIRLGIG 1388 +#define ST_GRL_EMPTY 1336 +#define MV_GRD2_LOOKRIGHT 1285 +#define MV_MAN15_TRIESOFF 1273 +#define QU_SC13_OPENBRIDGE 1213 +#define MV_MAN13_TAKEGUM 1208 +#define ST_MAN11_STARTJUMP 1130 +#define MSG_SC2_SHOWLADDER 1027 +#define MV_MAN6_PUSHBUTTON 1016 +#define MV_GLT_EAT 930 +#define ST_BLK_CLOSED 912 +#define MSG_SC8_GETHIMUP 789 +#define MV_BTT_CHESHET 752 +#define MV_BTT_LOOKMAN_SPOON 750 +#define MSG_STARTHAND 612 +#define ST_HND_EMPTY 603 +#define MV_CLK_CLOSE 594 +#define MSG_TESTKZWFLIGHT 570 +#define MSG_CLICKPLANK 549 +#define MSG_TESTPLANK 538 +#define MV_MAN_TURN_DL 492 +#define MV_MAN_TURN_UL 488 +#define MV_EGBR_SIGH 377 +#define MV_EGTR_FAT2SORROW 354 +#define MV_DYAS_CLOSEBOX 310 +#define MV_DYAS_FROMUS 313 +#define MV_EGTR_SLAPPIN 347 +#define MV_EGTR_SLAPPING 348 +#define MV_EGBR_RAISEHEAD 380 +#define MV_KZW_FROMHOLE 496 +#define QU_KZW_JUMPBOTTLE1 580 +#define MV_OTM_HANDLEUP 621 +#define QU_SC5_ENTER 637 +#define QU_SC6_TAKEBALL 681 +#define TrubaRight 696 +#define QU_BTT_LOOKMAN2 761 +#define MV_MAN8_HANDSUP 777 +#define MV_HGN_MORG 812 +#define ANI_INV_BOOT 881 +#define ANI_VISUNCHIK 904 +#define MV_NDV_LOOKBACK 951 +#define QU_GLT_BREATHE 960 +#define ANI_PACHKA 975 +#define PIC_INV_MENU 991 +#define MV_STR_NOSE 1182 +#define QU_STR_SHOW 1185 +#define QU_SC17_ENTER_UP 1326 +#define MV_JTI_FLOWIN 1394 +#define ANI_INV_BOTTLEFULL 1421 +#define QU_HND_TAKE2 1442 +#define MV_HND17_FIGA 1449 +#define PIC_SC19_RTRUBA1 1513 +#define PIC_SC16_LADDER 1523 +#define MSG_SC18_MANCLIMBEDDOWN 1540 +#define MV_GFA_SWING 1595 +#define QU_GFA_CHESHET 1608 +#define QU_GFA_STOPSOCK 1617 +#define MV_GRFU_TURN_LU 1646 +#define PIC_SC1_UTRUBA2 1696 +#define MV_CND_2_3 1708 +#define MSG_SC23_CLICKBTN3 1738 +#define MV_MAN21_COINTOBROOM 1773 +#define PIC_SC22_WALL 1797 +#define MSG_SC22_ONSTOOL 1798 +#define PIC_SC24_DTRUBA 1824 +#define PIC_SC24_UTRUBA 1829 +#define ANI_SHOOTER2 2111 +#define ST_DMN38_NORM 2202 +#define QU_DLD_DENY 2218 +#define QU_MLS_BLINK 2222 +#define MV_CTS_GROWMAN 2271 +#define MV_CTS_SHRINK 2272 +#define PIC_INV_PIPE 2321 +#define MV_LEG_POT2_OUT 2370 +#define MSG_SC32_SPIN 2405 +#define QU_SC35_ENTER_DOWN 2409 +#define MV_MAN32_POUR 2413 +#define MV_GMA20_STD_LOOK 2437 +#define QU_GMA20_STL_LOOK 2446 +#define QU_SC31_ENTER_RIGHT 2454 +#define MV_MAN34_PUTBOX 2483 +#define MV_BRD34_0_1 2510 +#define MV_PDV_NRM_BLINK 2525 +#define QU_PDV_CUT_BLINK 2528 +#define QU_SC37_ENTER_RIGHT 2565 +#define PIC_SCD_31 2566 +#define ANI_GUARD3 2577 +#define PIC_SC37_WALL2 2601 +#define ST_DMN01_default 2617 +#define ST_SCR36_NORM 2649 +#define MV_TSTG_FLOW 2663 +#define ANI_BOOTS_11 2704 +#define PIC_SC31_FLOOR 2712 +#define ST_TBE33_NORM 2717 +#define MV_DMN3_NORM 2733 +#define QU_SC32_EXITLIFT 2828 +#define MV_MOM_STANDUP 2891 +#define MV_MAN3_GIVEBLACK_2 2915 +#define MV_EGTR_1_2 343 +#define QU_CST_TRY 2875 +#define MV_BDP_SHOW 2953 +#define MV_CST_DENY_WHANDLE 2979 +#define QU_SWR_SITDOWN 3018 +#define SND_5_008 3149 +#define SND_5_019 3160 +#define SND_CMN_020 3167 +#define MV_DOMINO_18_default 3175 +#define ST_DOMINO_18_default 3176 +#define PIC_SC15_DFLOOR 3254 +#define ST_MAN_SHOES1_1 3458 +#define rMV_MAN_SNEEZE 3460 +#define QU_MAN_DEF_CLEAN 3462 +#define QU_MAN_DEF_SNEEZE_R 3465 +#define PIC_CMN_EVAL 3468 +#define MV_MAN25_ROWHAND 3482 +#define SND_8_005 3615 +#define SND_8_016 3626 +#define SND_9_004 3643 +#define SND_9_015 3659 +#define SND_11_001 3680 +#define SND_11_012 3696 +#define SND_11_023 3707 +#define SND_13_010 3755 +#define SND_20_003 3931 +#define SND_20_014 3947 +#define SND_22_001 3979 +#define SND_22_012 3995 +#define SND_23_011 4029 +#define SND_CMN_042 4035 +#define SND_24_010 4045 +#define QU_DRP24_TOWATER2 4046 +#define PIC_SC28_DARK3 4268 +#define MSG_SC28_TURNOFF_2 4277 +#define MV_CTS34_FALLEFT 4314 +#define SND_30_004 4362 +#define SND_32_002 4393 +#define SND_32_013 4409 +#define SND_32_024 4420 +#define SND_32_035 4431 +#define SND_33_001 4433 +#define SND_35_010 4508 +#define SND_35_021 4519 +#define MV_MAN34_TAKEBOX_FLOOR 4568 +#define ST_GRT38_NORM 4575 +#define PIC_MNU_SAVE_L 4630 +#define PIC_MSV_4_D 4654 +#define QU_SC28_LIFT5_START 4674 +#define PIC_SC30_EGG 4711 +#define ST_EYE_NORM 4715 +#define ST_LEG31_EMPTY 4726 +#define SND_CMN_053 4748 +#define MSG_HMRKICK_STUCCO 4765 +#define PIC_MNU_MUSICSLIDER_L 4915 +#define MV_FLY_FLY 4917 +#define QU_BRD28_GOR 4959 +#define PIC_SC12_WALL 4943 +#define ANI_FN2_HAND2 5031 +#define ST_FNHND2_NORM1 5033 +#define PIC_FN2_LEG 5035 +#define ST_FN4MAN_LAUGH 5100 +#define ANI_IN1GLASSES 5119 +#define SC_19 1143 +#define PIC_TTL_CREDITS 5172 +#define PIC_SC4_PLANK 5183 +#define MSG_DISABLESAVES 5201 +#define MSG_SC5_BGRSOUNDOFF 5315 +#define PIC_MAP_A10 5272 +#define PIC_MAP_P01 5277 +#define PIC_MAP_P12 5288 +#define ANI_BUTTON_32 5347 +#define MV_BTN32_TURNON 5348 +#define PIC_MEX_BGR 5300 +#define PIC_MAP_S20 5241 +#define PIC_MAP_S23_1 5244 +#define SND_26_020 5342 +#define MV_MAN11_JUMPFROMSWING 5209 +#define SND_30_016 5165 +#define MSG_INTR_GETUPMAN 5135 +#define MV_FNHED_EYES 5043 +#define ST_FNHND3_NORM1 5038 +#define QU_FIN1_TAKECOIN 5023 +#define SND_CMN_065 4934 +#define PIC_INV_VENT_C 4857 +#define PIC_INV_HAMMER_C 4841 +#define PIC_INV_EGGCOIN_C 4836 +#define PIC_INV_EGGBLACK_H 4798 +#define PIC_INV_BOOT_H 4788 +#define PIC_INV_COIN 861 +#define PIC_INV_BROOM 1783 +#define PIC_INV_BOX 866 +#define MV_MAN_LOOKUP 4773 +#define SND_13_033 4685 +#define ANI_CARPET_35 4592 +#define SND_35_022 4587 +#define SND_36_010 4534 +#define SND_34_023 4483 +#define SND_34_012 4472 +#define SND_34_001 4456 +#define SND_33_013 4450 +#define SND_31_004 4382 +#define SND_CMN_043 4319 +#define PIC_SC34_DTRUBA2 4311 +#define MV_TTA_STARTD 4287 +#define QU_SC28_LIFT6_START 4243 +#define ST_BAL14_GMA 4210 +#define SND_38_030 4197 +#define SND_27_041 4142 +#define SND_27_030 4131 +#define SND_25_021 4074 +#define SND_25_010 4063 +#define SND_23_001 4014 +#define SND_21_025 3972 +#define SND_21_014 3968 +#define SND_21_003 3952 +#define QU_SC19_SND1 3914 +#define SND_13_022 3767 +#define SND_12_012 3732 +#define SND_12_001 3716 +#define SND_10_003 3664 +#define SND_7_018 3598 +#define SND_7_007 3587 +#define SND_6_019 3558 +#define SND_6_008 3545 +#define SND_CMN_032 3517 +#define MSG_SC28_ENDCABIN 3456 +#define MV_WMN28_IN_3 3446 +#define MSG_SC25_STOPBEARDEDS 3424 +#define QU_SC17_FILLMUG_DROP 3415 +#define ST_BTH_2 3363 +#define MV_BTH_5_4 3358 +#define MSG_SC14_GMATOTRUBA 3249 +#define QU_SC4_SND5 3239 +#define QU_SC3_SND4 3233 +#define QU_SC2_SND2 3226 +#define QU_SC1_SND1 3220 +#define ST_GMA_SIT2 3212 +#define rMV_STR_THROWGLASSES 3202 +#define QU_SC38_SHOWBOTTLE_FULL 3173 +#define SND_CMN_010 3080 +#define QU_STR_TURNR 1186 +#define ST_HDL_LAID 3039 +#define MV_VSN_CYCLE2 2987 +#define MV_MAN8_STANDUP 2970 +#define QU_MOM_LOOKEMPTY 2948 +#define ST_LBN_5P 2766 +#define ST_LBN_3N 2759 +#define MV_LBN_3 2758 +#define ANI_GRIT_14 2724 +#define MV_NBL_DEFORM 1075 +#define MV_BDP_DROP 2686 +#define ANI_NEWBALL 1073 +#define ANI_KADKA 2670 +#define QU_SC32_FLOWG 2668 +#define MV_MAN34_TAKEBOX 2502 +#define ST_CTS34_GROWNEMPTY2 2475 +#define ST_LEG_UP1 2329 +#define PIC_SCD_32 2312 +#define ST_STR1_RIGHT 2143 +#define MV_SHR_NORM 2131 +#define ST_MAN29_RUN 2086 +#define QU_DRV_DRIVE 2030 +#define MV_MAN27_TAKEVENT 1993 +#define QU_SC26_OPEN5 1943 +#define ANI_VENT 1927 +#define QU_SC25_PUTBOARD 1896 +#define ST_LUK26_CLOSED 1870 +#define MV_WTR24_0_1 1842 +#define QU_SC22_FROMSTOOL 1800 +#define MSG_SC22_FROMSTOOL 1799 +#define PIC_SC21_WALL 1788 +#define MV_MAN23_PUSH3 1726 +#define PIC_SCD_21 1623 +#define PIC_SC19_LADDER 1538 +#define MV_CDI_HIDE 1533 +#define ST_MAN18_JUMP 1512 +#define MSG_SC18_SHOWMANJUMP 1510 +#define ST_GRL18_FLYTO 1490 +#define MV_JTI_FLOWBY 1393 +#define QU_SC16_BOYOUT 1364 +#define MSG_SC13_CHEW 1220 +#define PIC_SC8_RTRUBA_ITN 1014 +#define PIC_SCD_10 981 +#define ST_PLV_SIT 921 +#define MV_PBAR_RUN 897 +#define MV_BTT_MORG 743 +#define ANI_BATUTA 737 +#define PIC_SC3_UTRUBA 700 +#define PIC_SC4_MONETOPR 689 +#define MV_MAN_TAKEBALL 673 +#define QU_MOM_JUMPFW 670 +#define QU_SC6_ENTER 669 +#define MV_MANHDL_HANDLEUP 631 +#define MV_MAN_LOOKLADDERRV 556 +#define ANI_SPRING 542 +#define PIC_SC3_BOX 536 +#define QU_EGTR_SLIMOBLRV 528 +#define QU_DYAS_DEFAULT1 319 +#define MV_MAN_TURN_LD 490 +#define MV_MAN_TURN_LU 486 +#define ST_MAN_UP 449 +#define MV_EGBR_BRK_APPLE 385 +#define MV_DYAS_MORGOPEN 316 +#define MV_DYAS_MORGTOUS 315 +#define ST_DYAS_LIES 318 +#define ANI_MAN 322 +#define MV_EGTR_SORROW2SLIM 341 +#define MV_OTM_BOX_TURNL 436 +#define MSG_SHOOTKOZAW 557 +#define ST_KZW_SIT 560 +#define QU_KZW_JUMPBOTTLE2 583 +#define PIC_SC4_MASK 585 +#define MSG_CLICKBUTTON 609 +#define MV_OTM_BOXHANDLEUP 627 +#define QU_BTT_LOOKMAN 760 +#define MV_CST_LOOKHOLE 713 +#define MV_MAN7_HANDLE2BOX 802 +#define MV_INV_OLDAPPLE_default 393 +#define ST_SLN_POT_HOBOTUP 843 +#define QU_SLN_POT_MORG2 850 +#define MV_NDV_LOOK 949 +#define QU_GLT_OPEN 961 +#define QU_SC5_MANBUMP 1167 +#define QU_SC13_ENTER_LEFT 1191 +#define ST_HDLL_DOWN 1212 +#define QU_TEST 1056 +#define QU_SC14_ENTER_LIFTUP 1066 +#define MV_MAN14_DECLINE 1239 +#define MV_HDLL_1_2 1309 +#define MV_GRL_PULL 1338 +#define MSG_SC16_FILLMUG 1363 +#define MSG_SC17_TESTTRUBA 1458 +#define PIC_SC19_RTRUBA2 1514 +#define MV_MAN17_GIVECOIN 1557 +#define MV_INV_EGGCOIN_default 1568 +#define MV_GFA_STOP 1601 +#define MV_GFA_STOPSOCK 1602 +#define QU_GFA_GREETSOCK 1607 +#define QU_GFA_BREATHE 1610 +#define PIC_SC22_LADDERD 1632 +#define MSG_SC23_CLICKBTN4 1739 +#define ANI_CHHI 1957 +#define MV_MAN25_ONBOARD 1885 +#define MV_HDL23_DEF 1979 +#define QU_GRFM_PODMYSHA 1987 +#define MV_ASS_SHOW 2123 +#define QU_ASS_SIT 2134 +#define MV_MAN29_TOPORTER 2085 +#define ST_GLV_HAMMER 2156 +#define MV_GLV_LOOKHMR 2168 +#define ANI_MUG38 2191 +#define MV_MUG38_NORM 2192 +#define QU_DLD_TAKE1 2214 +#define MV_FFT_TUBE_START 2230 +#define MV_GLV_PROPOSE 2278 +#define MV_DMN38_NORM5 2282 +#define MV_LEG_2_3 2345 +#define PIC_INV_POTTIE 2393 +#define MSG_SC34_CLIMB 2490 +#define MV_MAN34_BOARD_FLY 2505 +#define ST_BRD34_GRANDMA 2511 +#define MV_PDV_1_2 2521 +#define QU_LUK34_CLOSE 2547 +#define PIC_SC37_RTRUBA 2562 +#define MSG_SC35_SHRINK 2570 +#define MV_GRD3_LOOKR 2582 +#define MV_GRD37_LOOKR 2594 +#define PIC_SC37_WALL3 2602 +#define ANI_MUG_33 2623 +#define ST_INV_MUGFULL_default 2635 +#define ST_TST31_NORM 2654 +#define ANI_GRIT_6 677 +#define MV_MAN13_TAKEFIRECAN 2711 +#define MV_MUG17_NORM 2738 +#define QU_SC35_ENTER_LIFTUP 2817 +#define QU_SC34_ENTER_LIFTUP 2821 +#define QU_SC32_ENTER_LIFTDOWN 2830 +#define rMV_MAN_TOTRUBAHOR2 2840 +#define MV_MAN3_GIVEBLACK_3 2916 +#define MV_PL3_FLOW 2925 +#define QU_SC4_ENTER_DOWN 2937 +#define ST_BTN6_OFF 2993 +#define ST_GUM_NORM 977 +#define SND_5_009 3150 +#define SND_CMN_021 3168 +#define PIC_SC13_LWALL 3169 +#define MV_MAN13_TAKEHAMMER 3207 +#define ANI_ROPE_15 3255 +#define PIC_SC17_PIPE2 3293 +#define MV_MAN17_TAKEBOTTLEEMPTY 3308 +#define ANI_DOMINOS 3317 +#define MV_MAN_STARTSHOES_2 3385 +#define QU_MAN_DEF_SITDOWN_R 3390 +#define QU_MAN_DEF_SHOES2 3395 +#define MV_MAN_LOOKLADDER_R 3418 +#define ST_MAN_SHOES2_1 3459 +#define SND_8_006 3616 +#define SND_8_017 3627 +#define SND_9_005 3644 +#define SND_9_016 3660 +#define SND_11_002 3681 +#define SND_11_013 3697 +#define SND_11_024 3708 +#define SND_13_011 3756 +#define SND_14_010 3792 +#define SND_16_030 3850 +#define SND_20_004 3932 +#define SND_22_002 3980 +#define SND_22_013 3996 +#define SND_23_012 3948 +#define SND_24_011 4047 +#define MV_MAN17_TAKEBOOT 4224 +#define ST_MAN_SIT_NOBOOT 4229 +#define PIC_SC28_DARK4 4269 +#define MSG_SC28_TURNOFF_3 4275 +#define SND_30_005 4363 +#define SND_32_003 4394 +#define SND_32_014 4410 +#define SND_32_025 4421 +#define SND_32_036 4432 +#define SND_33_002 4434 +#define SND_35_011 4509 +#define SND_34_034 4614 +#define PIC_MNU_AUTHORS_L 4624 +#define PIC_MSV_5_D 4655 +#define MV_EYE30_HIDE 4718 +#define ANI_LEG_31 4723 +#define MV_BRD_STARTR 4733 +#define SND_CMN_054 4762 +#define SND_20_015 4888 +#define PIC_CSR_GOFAR_L 4895 +#define PIC_SCD_FIN 5026 +#define MV_FNHND2_MOVE 5032 +#define ST_FNHND2_NORM2 5034 +#define MV_FNHND6_MOVE2 5068 +#define ST_IN1MAN_LOOK 5118 +#define ST_IN1MAN_GONE 5125 +#define ST_IN2BOOT_EMPTY 5143 +#define MSG_SC32_TRUBATOBACK 5181 +#define PIC_MNU_SLIDER_D 4913 +#define MSG_SC33_TESTMUG 5185 +#define MSG_MANSHADOWSOFF 5196 +#define SND_22_035 5211 +#define PIC_SC5_RTRUBA2 665 +#define PIC_MAP_A11 5273 +#define PIC_MAP_P02 5278 +#define PIC_MAP_P13 5289 +#define PIC_INV_MAP 5324 +#define MSG_SC28_LIFT6MUSIC 5355 +#define MSG_FN4_STARTMUSIC 5356 +#define PIC_MSV_BGR 4634 +#define PIC_MAP_S10 5232 +#define PIC_MAP_S21 5242 +#define PIC_MAP_S23_2 5245 +#define PIC_SC3_LADDER 1102 +#define PIC_SC19_REACTOR 1498 +#define SND_INTR_010 5155 +#define QU_INTR_STARTINTRO 5133 +#define ST_IN1CLK_CLOSED 5128 +#define MSG_SC31_TESTCACTUS 5095 +#define QU_FN3_SHOWKICKING 5074 +#define QU_FN2_DOFINAL 5066 +#define ANI_FN3_HAND3 5036 +#define ST_MANFIN1_RIGHT 5021 +#define MSG_SC16_LAUGHSOUND 4993 +#define rMV_BBL_GOR 4926 +#define MV_BBL_GOR 4924 +#define PIC_INV_SCISSORS_C 4850 +#define PIC_INV_EGGBOOT_C 4835 +#define PIC_INV_POT_H 4813 +#define PIC_INV_BOOT 863 +#define MV_DRP25_TOWATER 3503 +#define SND_13_034 4686 +#define MV_PDV_LEGS 4589 +#define SND_35_023 4588 +#define SND_36_011 4535 +#define SND_34_024 4484 +#define SND_34_013 4473 +#define SND_34_002 4457 +#define SND_33_014 4451 +#define SND_31_005 4383 +#define SND_CMN_044 4320 +#define MV_MAN34_TRYTABUR 2489 +#define QU_KDK_DRIZZLE 4301 +#define ST_MAN28_SIT 4253 +#define SND_38_031 4198 +#define SND_38_020 4187 +#define SND_27_031 4132 +#define SND_27_020 4121 +#define SND_25_022 4075 +#define SND_25_011 4064 +#define SND_23_002 4015 +#define SND_21_026 3974 +#define SND_21_015 3969 +#define SND_21_004 3953 +#define QU_SC19_SND2 3915 +#define QU_SC18_SND1 3901 +#define SND_15_010 3812 +#define SND_13_023 3768 +#define SND_12_013 3733 +#define SND_12_002 3717 +#define SND_10_004 3665 +#define SND_7_019 3599 +#define SND_7_008 3588 +#define SND_CMN_033 3554 +#define SND_6_009 3546 +#define PIC_CMN_EXIT 3467 +#define MV_WMN28_IN_4 3447 +#define ANI_WOMAN_28 3439 +#define QU_SC25_BEARDED2 3426 +#define MV_MAN_SMILE 3416 +#define SND_CMN_022 3404 +#define QU_SC27_SHOWBET 3368 +#define ST_BTH_3 3361 +#define ST_VNT27_LIES 3355 +#define MV_MAN16_TRYBOTTLE 3305 +#define QU_SC19_ENTER_DOWNRIGHT 3300 +#define MV_KZW14_TOEDGE 3265 +#define QU_SC3_SND5 3234 +#define QU_SC2_SND3 3227 +#define QU_SC1_SND2 3221 +#define ST_BAL14_NORM2 3215 +#define MV_BAL14_TOGMA 3214 +#define SND_CMN_011 3081 +#define QU_SC13_CLOSEFAIL 3063 +#define rMV_STR_HIDE 3055 +#define QU_STR_RTOL 3053 +#define ANI_MAID_11 3024 +#define MSG_SC11_PUTBOOT 1117 +#define MSG_SC4_DROPBOTTLE 2896 +#define QU_SC15_ENTER_LIFTUP 2813 +#define QU_SC10_EXITLIFT 2809 +#define ST_LBN_4P 2763 +#define MV_LBN_4 2761 +#define ST_LBN_2N 2756 +#define PIC_SCD_33 2636 +#define MV_BRD34_1_2 2573 +#define MV_MAN34_BOARD_FLY2 2572 +#define QU_SC34_FROMBOX 2494 +#define MV_CTS34_0_1 2387 +#define ANI_CACTUS_34 2381 +#define ST_LEG_EMPTY 2338 +#define ST_LEG_UP2 2333 +#define PIC_SC32_UTRUBA 2293 +#define MV_MAN38_TAKEHAMMER 2289 +#define MV_DMN38_NORM6 2284 +#define MV_MAN29_PUSHASS 2145 +#define ST_STR2_RIGHT 2144 +#define QU_SC29_ENTER_LEFT 2078 +#define QU_MID_SWITCHBACK 2044 +#define QU_DRV_FROMLEFT2 2038 +#define ST_INV_VENT_default 1970 +#define MV_MAN25_BACKTOLADDER 1954 +#define QU_SC25_ENTERUP_WATER 1895 +#define MV_MAN25_PUTBOARD 1878 +#define ST_LUK26_NOHANDLE 1869 +#define QU_SC25_ENTER_UP 1860 +#define MV_HDL22_FALL 1760 +#define MV_MAN23_PUSH4 1727 +#define QU_GRFU_CHMOKLEFT 1667 +#define MV_GRFB_TAILUP 1640 +#define MV_GRFB_TRYSTAND 1634 +#define ANI_GIRAFFE_BOTTOM 1633 +#define PIC_SCD_22 1624 +#define QU_GRD_LOOKLEFT 1001 +#define ST_GRD_SIT2 1525 +#define ST_INV_SUGAR_default 1412 +#define MV_INV_SUGAR_default 1411 +#define ANI_SAMOGONSHCHIK 1397 +#define QU_SC16_GIRLOUT 1365 +#define MSG_SC16_HIDEMUG 1351 +#define MSG_SC16_SHOWWIRE 1350 +#define ST_BOY_STAND 1331 +#define QU_GMS_DRYG_BOOTLESS 1276 +#define ST_BAL14_MAIN 1248 +#define ST_HDLR_UP 1198 +#define ST_SWR_SITBALD 1153 +#define ANI_SC2_BOX 1020 +#define MV_MAN12_POT2BOOT 983 +#define ST_GLT_OPEN 928 +#define MV_GLT_BREATHE 925 +#define QU_SLN_POT_TURN 851 +#define MSG_SC7_CLOSELUKE 822 +#define ST_BTT_NOSPOON 739 +#define ST_CST_HEADUP 717 +#define TrubaUp 680 +#define PIC_SC6_UTRUBA 668 +#define MV_CLK_HAND 592 +#define ST_MAN_LOOKPLANK 555 +#define QU_DYAS_DEFAULT2 471 +#define ST_MAN_GOD 480 +#define ST_MAN_GOU 459 +#define MV_OTM_GLS_TURNR 422 +#define MV_EGBR_BRK_COIN 389 +#define MV_EGTR_SORROW2FAT 356 +#define MV_OTM_BOX_MORGRIGHT 439 +#define MV_KZW_TOPLANK 497 +#define QU_KZW_WALKBOTTLE 578 +#define PIC_SC4_ULTRUBA 615 +#define ST_HDL_DOWN 625 +#define MV_MANOTM_BOX2GLASSES 628 +#define QU_OTM_VNT_TRIESOFF 648 +#define MV_BRD_DROPBALLROT 695 +#define MV_LUK_0_1 804 +#define ST_LUK_CLOSED 805 +#define MV_CST_CLOSELUKE 807 +#define MV_INV_BOOT_default 882 +#define PIC_SC2_DFLOOR 891 +#define QU_GRD_MORG 1004 +#define MV_MAN6_SPINHANDLE 1008 +#define ANI_SC4_COIN 690 +#define MV_MAN_TAKECOIN 1031 +#define MV_SLN_0_1 834 +#define LiftUp 1057 +#define PIC_SCD_11 1098 +#define MV_MAN11_SWING_0 1109 +#define ST_MAN_SIT 1164 +#define MV_STR_CHEW 1177 +#define PIC_SC15_LTRUBA 1261 +#define PIC_SC16_RTRUBA 1293 +#define MV_HDL_1_2 1308 +#define MV_INV_MUG_default 1371 +#define QU_SMG_STOPFINGERS 1408 +#define QU_SC17_FILLBOTTLE 1437 +#define QU_HND_TAKEBOTTLE 1443 +#define ST_HND17_EMPTY 1448 +#define QU_SC18_ENTER_WHIRLIGIG 1469 +#define PIC_SC19_RTRUBA3 1515 +#define QU_CDI_DRYG 1536 +#define MSG_SC3_TESTFAT 1582 +#define QU_GFA_GREET 1606 +#define QU_SC22_ENTER_LEFT 1618 +#define QU_SC23_ENTER_DOWN 1630 +#define ST_CND_0 1704 +#define MV_CND_3_4 1710 +#define MV_INV_BROOM_default 1775 +#define ST_INV_BROOM_default 1776 +#define QU_SC22_FALLBROOM 1786 +#define PIC_SC24_PIPE 1828 +#define MV_MAN_FROMTRUBAVER2_R 1849 +#define ANI_BOARD25 1898 +#define QU_SC25_TRUBATOBOARD 1909 +#define PIC_INV_LOPAT 1924 +#define ST_CHI_EMPTY 1959 +#define MV_MAN27_BROOMTOSWAB 1992 +#define ST_BTA_HILITE 2052 +#define QU_SC29_MANTO_R 2100 +#define MV_SHR_HITASS 2152 +#define ANI_DYLDA 2169 +#define ST_MLS_LEFT 2179 +#define MV_MLS_TURNLR 2181 +#define MV_MAN38_TAKEBOTTLE 2184 +#define QU_SC38_SHOWMUG 2198 +#define QU_GLV_TOSMALL_NOHMR 2209 +#define QU_GLV_DRINK 2210 +#define QU_DLD_TAKE2 2215 +#define QU_MLS_TURNL 2220 +#define ST_FFT_TUBE 2231 +#define ST_FFT_TUBEOPEN 2236 +#define MV_CTS_GROW 2268 +#define QU_FFT_PIPE_CYCLE 2297 +#define QU_FFT_TUBE_FLOW 2304 +#define PIC_SC35_FLOOR 2407 +#define ST_HZE_NORM 2426 +#define MV_CTS34_EYES 2478 +#define MV_BRD34_RIGHT 2507 +#define MSG_SC35_PLUGHOSE 2524 +#define ST_LUK34_CLOSED 2543 +#define MV_PDV_SML_BLINK 2551 +#define PIC_SC35_DTRUBA_L 2558 +#define QU_GRD3_LOOKR 2587 +#define PIC_SC31_WALL 2603 +#define ANI_TESTO_BLUE 2659 +#define MV_MAN6_TAKEBALL 2691 +#define ST_GRT6_GRIT 2693 +#define MV_JET17_FLOW 2747 +#define MSG_SC4_MANFROMBOTTLE 2854 +#define QU_EGTR_MD1_BOLTLEGS 2877 +#define MV_MAN_PLANKTOLADDER 553 +#define MV_MAN3_GIVEBLACK_4 2917 +#define MV_EGTR_2_3 351 +#define ST_STP8_3 2980 +#define ST_BALL9_NORM 2973 +#define ST_PCH2_NORM 3021 +#define MV_SLN_POT_DENY 3040 +#define MV_MAN38_TRYTAKEBOTTLE 3178 +#define MV_HDLL_1_3 3204 +#define rMV_MAN_STARTSHOES_1 3382 +#define rMV_MAN_STOPSHOES_1 3384 +#define MV_MAN17_GIVEBOOT 3432 +#define ST_GRFU_KISSOPEN 3475 +#define MV_GRFU_CLOSEEYES 3476 +#define ST_DRP26_NORM2 3483 +#define SND_8_007 3617 +#define SND_8_018 3628 +#define SND_9_006 3650 +#define SND_9_017 3661 +#define SND_11_003 3682 +#define SND_11_014 3698 +#define SND_11_025 3709 +#define SND_13_012 3757 +#define SND_14_011 3793 +#define SND_16_020 3840 +#define SND_16_031 3851 +#define SND_17_030 3894 +#define SND_20_005 3933 +#define SND_22_003 3981 +#define SND_22_014 3997 +#define SND_22_025 4008 +#define SND_23_013 3949 +#define SND_24_001 4003 +#define SND_24_012 4048 +#define SND_26_010 4091 +#define MV_BOT17_FILL 4221 +#define ST_BOT17_NORM 4222 +#define ST_MAN25_ROW2 4235 +#define ST_MAN_TEMPPP 4236 +#define PIC_SC28_DARK5 4270 +#define MSG_SC28_TURNOFF_4 4282 +#define QU_SC29_SND1 4335 +#define SND_30_006 4369 +#define MV_MAN30_ITCHSWAB 4373 +#define SND_32_004 4395 +#define SND_32_015 4411 +#define SND_32_026 4422 +#define SND_33_003 4435 +#define SND_35_001 4494 +#define SND_35_012 4510 +#define ANI_CARPET_36 4600 +#define SND_34_035 4615 +#define PIC_MLD_OK_L 4647 +#define PIC_MSV_6_D 4656 +#define SND_32_037 3560 +#define QU_EYE30_HIDE 4722 +#define SND_CMN_055 4763 +#define SND_CMN_066 4966 +#define PIC_FN2_BODY 5027 +#define ST_FNHND6_BEFORE2 5069 +#define MSG_ENABLESAVES 5202 +#define PIC_SC23_BOXOPEN 1723 +#define SND_22_036 5304 +#define PIC_MAP_A01 5263 +#define PIC_MAP_A12 5274 +#define PIC_MAP_P03 5279 +#define PIC_MAP_P14 5290 +#define MV_MAN35_CUTPIPE 2514 +#define PIC_MAP_S11 5233 +#define PIC_MAP_S22 5243 +#define PIC_MAP_S33 5257 +#define MV_MOM_TAKE1 2885 +#define ST_MAP_NORM 5323 +#define ANI_INV_MAP 5321 +#define PIC_MEX_OK 5301 +#define PIC_SC6_LADDER 1104 +#define MV_MOM_CYCLEBK 3012 +#define QU_SC16_MANDRINK 5200 +#define ST_PBAR_START2 5178 +#define MV_MAN30_ITCHSPADE 5164 +#define SND_INTR_011 5156 +#define ANI_IN1CLOCK 5126 +#define ANI_IN1HAND 5113 +#define ST_FNHND6_BEFORE3 5057 +#define ANI_FN3_HAND4 5048 +#define ANI_FIN1_MAN 5019 +#define ANI_FIN_COIN 5014 +#define SND_29_030 4879 +#define SND_13_035 4871 +#define SND_21_027 4867 +#define PIC_INV_EGGDOM_C 4837 +#define PIC_INV_APPLE_C 4823 +#define PIC_INV_STOOL_H 4817 +#define PIC_INV_EGGGLS_H 4801 +#define PIC_INV_EGGAPL_H 4797 +#define PIC_INV_EGG_H 4796 +#define rMV_MAN_LOOKUP 4775 +#define SND_CMN_056 4772 +#define MV_MAN_LOOKSTUCCO 4771 +#define SND_15_011 4754 +#define MV_BRD_FALL 4731 +#define SND_36_012 4606 +#define QU_PDV_LRG_LEGS 4591 +#define SND_35_024 4590 +#define QU_SC34_FROMBOX_FLOOR 4572 +#define SND_36_001 4520 +#define SND_34_025 4485 +#define SND_34_014 4474 +#define SND_34_003 4458 +#define MV_MAN33_TAKEMUGEMPTY 4452 +#define SND_28_020 4329 +#define SND_CMN_045 4321 +#define MV_LEG_POT0_DENY 4283 +#define QU_SC28_LIFT1_WORK 4256 +#define MSG_SC21_UPDATEASS 4211 +#define SND_9_018 4200 +#define SND_38_032 4199 +#define SND_38_021 4188 +#define SND_38_010 4175 +#define SND_27_032 4133 +#define SND_27_021 4122 +#define SND_27_010 4111 +#define SND_25_023 4076 +#define SND_25_012 4065 +#define SND_25_001 4049 +#define SND_23_003 4016 +#define SND_21_016 3970 +#define SND_21_005 3954 +#define QU_SC19_SND3 3916 +#define QU_SC18_SND2 3902 +#define PIC_SC38_ROPE 3859 +#define SND_13_024 3769 +#define SND_13_013 3758 +#define SND_12_014 3734 +#define SND_12_003 3718 +#define SND_10_005 3666 +#define SND_7_009 3589 +#define SND_CMN_034 3555 +#define QU_SC25_TRYROWHAND 3493 +#define MV_WMN28_IN_5 3448 +#define QU_SC25_BEARDED3 3427 +#define SND_CMN_023 3405 +#define MV_MAN_SHOES1 3375 +#define MSG_SC27_SHOWNEXTBET 3369 +#define ST_BTH_4 3359 +#define MV_KZW14_TOUS 3267 +#define QU_SC2_SND4 3228 +#define QU_SC1_SND3 3222 +#define ST_BAL14_NORM3 3216 +#define QU_GLV_TAKEDOMINO_NOHMR 3182 +#define SND_CMN_012 3082 +#define SND_CMN_001 2927 +#define MV_MAN8_JUMPOFF 2969 +#define ANI_PLUSMINUS 2938 +#define PIC_SC1_OSK2 2932 +#define MV_KZW_JUMPHIT 2857 +#define MV_MAN4_FROMBOTTLE 2849 +#define MV_LBN_5 2764 +#define ST_LBN_3P 2760 +#define ST_LBN_1N 2753 +#define MV_MAN2_TRYBOX 2736 +#define ST_GRT14_NORM 2726 +#define ST_MAN6_BALL 2688 +#define QU_SC35_SHOWSTOPPER 2520 +#define QU_SC32_SHOWHANDLE 2399 +#define MV_FLG_STARTL 2258 +#define MV_FLG_CYCLER 2266 +#define MV_LEG_POT2_SHOW 2332 +#define MSG_SC38_PROPOSE 2287 +#define ST_SHG_NORM 2118 +#define ST_MAN29_SIT 2089 +#define ST_DRV_LEFTNOVENT 2000 +#define QU_SC25_TRYSWAB 1913 +#define ANI_INV_BOARD 1872 +#define ANI_LUK26 1867 +#define LadderDown 1851 +#define PIC_SC22_DTRUBA2 1810 +#define MV_MAN22_STANDTABUR 1750 +#define ANI_INV_SOCK 1698 +#define QU_GRFG_SHOW 1683 +#define PIC_SCD_23 1625 +#define ST_CDI_SUGAR 1532 +#define MV_MAN19_TAKESUGAR 1528 +#define MV_MAN18_JUMPTOTRUBA 1511 +#define MV_BOY18_JUMPTO 1481 +#define ST_SMG_HANDSUP 1403 +#define QU_MOM_START 1389 +#define MV_WHR13_SPIN 1384 +#define MSG_SC14_SHOWBALLMAN 1254 +#define ANI_INV_GUM2 1204 +#define ST_GLT_EMPTY 1070 +#define MV_MAN_LIFTFROMU 1061 +#define MV_MAN_LIFTFROMD 1060 +#define ANI_HDL6 1009 +#define MV_MAN_FROMVTRUBA 966 +#define ST_BALL9_default 935 +#define ST_SLN_POT 835 +#define QU_SC8_FINISH 788 +#define PIC_SC8_LADDER_D 755 +#define MV_CST_SPINHANDLE 714 +#define ANI_INV_BOX 890 +#define PIC_SC4_DOWNTRUBA 619 +#define MV_BTN_CLICK 599 +#define ST_CLK_OPEN 591 +#define MV_CLK_GO 589 +#define MSG_SHAKEBOTTLE 584 +#define ST_SPR_DOWN 545 +#define MV_PNK_WEIGHTLEFT 541 +#define QU_KOZAW_WALK 505 +#define QU_DYAS_DEFAULT3 514 +#define QU_SC1_EGBRHEADDOWN 513 +#define rMV_EGBR_SIGH 464 +#define MV_EGBR_BRK_BOOT 384 +#define MV_EGTR_TAKEMONEY 352 +#define MV_EGTR_FATBOLTLEGS 374 +#define MV_MANDYAS_GIVESGLAS 363 +#define MV_MANEGBR_EGG2APPLE 444 +#define MV_MAN_TURN_RL 332 +#define QU_KZW_GOOUT 567 +#define QU_OTM_GLS_TURNL 641 +#define QU_OTM_BOX_MORGR 643 +#define MV_MAN_TAKESBALL 674 +#define QU_SC1_ENTER_RIGHT 702 +#define QU_CST_TURNDOWN 724 +#define ANI_VMYATS 764 +#define MV_MAN8_DRYGDOWN 770 +#define MV_MAN8_STARTJUMP 779 +#define ST_HGN_LUKE 810 +#define PIC_SCD_12 857 +#define PIC_SC9_DTRUBA 902 +#define MV_VSN_TURNLEFT 953 +#define MV_GRD_MORG1 1000 +#define MV_MAN_TAKEBOOT 1034 +#define ANI_SC4_BOOT 1035 +#define MV_LFT_OPEN 1048 +#define MV_MAN_TURN_SDR 1085 +#define MV_MAN_TURN_SUR 1088 +#define MV_MAN11_SWING_1 1111 +#define MSG_SC13_UPDATEBRIDGE 1217 +#define QU_SC14_ENTER_LIFTDOWN 1068 +#define MSG_SC14_MANKICKBALL 1257 +#define MV_GMS_DRYGNOBOOT 1268 +#define PIC_SC18_LTRUBA 1320 +#define QU_SC16_GOBOY 1347 +#define QU_SC16_GOGIRL 1348 +#define QU_SC16_BOYDRINK 1353 +#define QU_SC16_BOYKICK 1367 +#define ST_GRL_LAUGH 1342 +#define MV_BDG_CLOSE 1382 +#define MV_MAN17_TAKEBOTTLE 1427 +#define QU_HND17_TOCYCLE 1454 +#define QU_CDI_SHOW 1535 +#define PIC_INV_EGGDOM 1576 +#define MV_GFA_0_1 1605 +#define MV_GRFU_BLINKLEFT 1651 +#define MV_GRFU_STOP 1655 +#define ST_CND_1 1705 +#define QU_SC23_TOCALENDAR 1733 +#define QU_SC25_SHOWBOARD_L 1907 +#define MSG_SC26_UPDATEPOOL 1956 +#define MV_PTR_MOVEFAST 2102 +#define ST_STR1_EMPTY 2115 +#define QU_ASS_SIT_R 2136 +#define MV_SHG_HITASS 2151 +#define MV_GLV_PUTDOMIN 2157 +#define ST_GLV_NOHAMMER 2159 +#define MV_HMR38_NORM 2195 +#define MV_FFT_TUBE_FLOWOPEN 2237 +#define MV_FFT_STARTPIPE 2239 +#define MSG_SC38_POSTHMRKICK 2256 +#define QU_GLV_PROPOSE_NOHMR 2281 +#define ANI_INV_TUBE 2314 +#define MV_RHT_BLINK 2361 +#define PIC_SCD_34 2389 +#define MV_POTTIE_default 2391 +#define MV_HDL32_FALL 2395 +#define MSG_SC32_STARTCACTUS 2414 +#define ST_PDV_SMALL 2420 +#define QU_CTS34_EYES 2384 +#define MV_LUK34_CLOSE 2545 +#define ANI_DMN01 2615 +#define QU_SC33_SHOWMUG 2631 +#define QU_TST_FLOW 2655 +#define ANI_TESTO_ORANGE 2656 +#define MV_MAN17_TAKEMUG 2744 +#define MV_MAN_TOLADDER 448 +#define QU_SC6_DROPS2 2905 +#define MV_MAN3_GIVECOIN_2 2931 +#define MV_MAN4_LOOKINBOTTLE 2935 +#define rMV_MAN_HMRKICK_COINLESS 2965 +#define MV_STP8_FALL 2972 +#define PIC_SC9_UTRUBA 2985 +#define MV_VSN_FROMLEFT 1015 +#define QU_VSN_FROMR 3000 +#define QU_SC11_MANFALL 3017 +#define MSG_SC8_ENTERUP 3037 +#define ANI_DOMINO_18 3174 +#define MSG_SC38_TRYTAKEBOTTLE 3179 +#define QU_DRP7_DROP 3188 +#define MV_BTT_LOOK_SPOON 3194 +#define QU_RPE_NORM 3258 +#define MV_JET17_DROP 3291 +#define QU_JET17_FLOW 3294 +#define MSG_SC19_UPDATESUGAR 3315 +#define QU_SC22_TOSTOOL_R 3332 +#define rMV_MAN_STARTSHOES_2 3398 +#define rMV_MAN_STOPSHOES_2 3400 +#define rMV_MAN_CLEANNOSE 3461 +#define QU_GRFU_KISSOPEN 3480 +#define SND_8_008 3618 +#define SND_8_019 3629 +#define SND_9_007 3651 +#define SND_11_004 3683 +#define SND_11_015 3699 +#define SND_11_026 3710 +#define SND_13_002 3742 +#define SND_14_001 3778 +#define SND_14_012 3794 +#define SND_16_010 3830 +#define SND_16_021 3841 +#define SND_16_032 3852 +#define QU_SC17_SND1 3865 +#define SND_17_020 3884 +#define SND_17_031 3895 +#define SND_20_006 3939 +#define SND_22_004 3982 +#define SND_22_015 3998 +#define SND_22_026 4009 +#define SND_24_002 4004 +#define SND_26_011 4092 +#define QU_SC28_SND1 4148 +#define ANI_SHD_01 4202 +#define PIC_SC28_DARK6 4271 +#define PIC_SC32_LADDER 4296 +#define QU_SC29_SND2 4336 +#define SND_30_007 4370 +#define SND_31_006 4389 +#define SND_32_005 4396 +#define SND_32_016 4412 +#define SND_32_027 4423 +#define SND_33_004 4436 +#define SND_35_002 4495 +#define SND_35_013 4511 +#define MV_MAN34_PUTBOX_FLOOR 4567 +#define MV_MAN34_FROMBOX_FLOOR 4570 +#define ANI_GRIT_38 4573 +#define MV_MID_CLEANVENT 4582 +#define SND_34_036 4616 +#define PIC_MNU_DEBUG_L 4632 +#define PIC_MSV_7_D 4657 +#define MSG_HMRKICK_METAL 4764 +#define ST_FLY_FLY 4918 +#define QU_GLV28_GOL 4958 +#define SND_CMN_067 4967 +#define SND_32_038 4996 +#define SND_FINAL1_001 5007 +#define MV_FN4MAN_LAUGH 5101 +#define MV_IN1MAN_GETUP 5117 +#define PIC_MSV_DOT_D 5188 +#define SND_23_014 5193 +#define MSG_MANSHADOWSON 5197 +#define MV_MAN_LOOKUP_EYES 5206 +#define SND_22_037 5305 +#define PIC_MAP_A02 5264 +#define PIC_MAP_A13 5275 +#define PIC_MAP_P04 5280 +#define PIC_MAP_P15 5291 +#define PIC_MAP_S01 5223 +#define PIC_MAP_S12 5234 +#define PIC_MAP_S34 5258 +#define PIC_MAP_S02 5224 +#define QU_SC32_FALLHANDLE 5351 +#define MV_HDL_FALL 2396 +#define SND_17_032 5212 +#define SND_21_028 5192 +#define PIC_SC18_DOMIN 5184 +#define SND_INTR_012 5157 +#define SND_INTR_001 5146 +#define QU_INTR_CLOCK 5137 +#define PIC_IN1_LADDER 5102 +#define ST_FNHND6_BEFORE 5058 +#define ANI_FN2_HAND6 5056 +#define ANI_FN3_HAND5 5052 +#define ST_FNHND3_HMR 5041 +#define ST_MANFIN1_EMPTY 5022 +#define SND_29_031 4880 +#define SND_25_024 4872 +#define SND_CMN_057 4868 +#define PIC_INV_LOPAT_C 4844 +#define PIC_INV_BOX_C 4828 +#define PIC_INV_VANTUZ_H 4821 +#define PIC_INV_TUBE_H 4820 +#define PIC_INV_SOCK_H 4816 +#define PIC_INV_GUM2_H 4804 +#define QU_MAN_DEF_LOOKUP_R 4777 +#define PIC_SC27_HITZONE2 4756 +#define rMV_BRD_STARTR 4738 +#define SND_38_033 4729 +#define PIC_MSV_0_L 4644 +#define PIC_MSV_FULL_L 4642 +#define SND_36_013 4607 +#define MSG_SC34_CLIMBBOX 4571 +#define MSG_SC4_HIDEBOOT 4563 +#define SND_37_001 4536 +#define SND_36_002 4521 +#define SND_34_026 4486 +#define SND_34_015 4475 +#define SND_34_004 4459 +#define SND_29_020 4354 +#define SND_CMN_046 4322 +#define QU_SC28_LIFT1_END 4257 +#define SND_9_019 4201 +#define SND_38_022 4189 +#define SND_38_011 4176 +#define QU_SC38_SND1 4166 +#define SND_27_033 4134 +#define SND_27_022 4123 +#define SND_27_011 4112 +#define QU_SC27_SND1 4102 +#define SND_25_013 4066 +#define SND_25_002 4050 +#define SND_23_004 4017 +#define SND_21_017 3971 +#define SND_21_006 3960 +#define QU_SC19_SND4 3917 +#define QU_SC18_SND3 3903 +#define SND_15_001 3798 +#define SND_13_025 3770 +#define SND_13_014 3759 +#define SND_12_015 3735 +#define SND_12_004 3719 +#define SND_10_006 3672 +#define SND_2_020 3514 +#define SND_1_010 3511 +#define QU_DRP24_TOFLOOR 3510 +#define QU_SC28_WMN_START 3452 +#define SND_CMN_024 3406 +#define ST_TEST 3367 +#define ST_BTH_5 3357 +#define MV_SPK4_PLAY 3276 +#define QU_KZW14_TOUS 3273 +#define QU_SC2_SND5 3229 +#define QU_SC1_SND4 3223 +#define SND_CMN_013 3112 +#define SND_CMN_002 2928 +#define rMV_STR_NOSE 3052 +#define MSG_SC13_TESTOPEN 3048 +#define PIC_SC10_FLOOR 3001 +#define ST_LBN_0N 2832 +#define MV_LBN_6 2767 +#define ST_LBN_2P 2757 +#define MV_EGBR_DENY 2735 +#define ANI_GRIT_9 2719 +#define MV_TEST2 2684 +#define ST_BRD34_GRANDMA2 2574 +#define MV_MAN34_FROMBOX 2493 +#define MV_CTS34_HIDE 2476 +#define MV_CTS34_GROW 2382 +#define MV_LEG_POT1_SHOW 2328 +#define MV_MAN32_SITDOWN 2276 +#define QU_SC38_SHOWDMN_DLD1 2254 +#define PIC_SC38_UTRUBA 2171 +#define QU_SC29_MANFROM_R 2104 +#define MV_DRV_TOLEFT_V 2007 +#define MV_MAN26_TURNVENT_R 1932 +#define MV_MAN25_CHIH 1886 +#define QU_SC26_ENTER_LEFT 1866 +#define PIC_SC26_LTRUBA 1864 +#define MV_MAN22_TAKEBROOM 1753 +#define MV_INV_SOCK_default 1699 +#define PIC_SC21_HDLBASE 1635 +#define QU_GRFG_BLINKBALD 1684 +#define QU_GRFB_DANGLE 1643 +#define MV_GRFB_TAIL 1636 +#define rMV_MANEGBR_EGG2APPLE 465 +#define MV_GRD_LOOKRIGHT 1527 +#define MV_GRD_LOOKLEFT 1526 +#define MV_KSL_0_1 1466 +#define ST_WR16_DEFAULT 1346 +#define MSG_SC17_HIDESUGAR 1417 +#define QU_SMG_FINGERS 1407 +#define ST_SMG_SIT 1399 +#define MSG_SC13_STOPWHIRLGIG 1387 +#define MSG_SC16_SHOWMUG 1352 +#define MV_GRL_GOOUT 1340 +#define ANI_BOY 1327 +#define ANI_WHIRLGIG_19 1302 +#define MSG_SC14_SHOWBALLGMADIVE 1260 +#define MSG_SC14_GMAJUMP 1250 +#define PIC_SC14_DTRUBA 1222 +#define MV_MAN11_JUMPOVER 1131 +#define QU_SC10_ENTER_LIFTDOWN 1063 +#define QU_SC10_ENTER_LEFT 989 +#define MSG_SC9_EATBALL 941 +#define MSG_SC5_HIDEHANDLE 917 +#define MV_BLK_CLOSE 911 +#define SC_TEST 903 +#define MV_SLN_POT_TURN 632 +#define SC_INV 858 +#define QU_SC12_ENTER_RIGHT 856 +#define ST_SLN_BOOT 830 +#define MSG_SC7_HIDELUKE 821 +#define MV_BTT_LOOKMAN 738 +#define MV_BTT_ZANIUKH 742 +#define PIC_SCD_1 727 +#define QU_SC7_ENTER_RIGHT 721 +#define QU_SC7_ENTER_LEFT 720 +#define ANI_CORNERSITTER 711 +#define MSG_SC6_TAKEBALL 682 +#define ST_INV_BOX_default 892 +#define ANI_BUTTON 598 +#define MV_KZW_TOHOLERV 537 +#define QU_EFTR_FATTOSORROW 530 +#define MV_MAN_TOTRUBAVER2 519 +#define ST_MAN_1PIX 518 +#define QU_DYAS_DEFAULT4 515 +#define QU_SC1_EGBRSIGH 510 +#define PIC_SC3_RTRUBA 414 +#define MV_EGBR_BRK_DOMINO 388 +#define ST_EGBR_HEADLOWER 378 +#define MV_EGTR_SLIMBOLTLEGS 335 +#define PIC_SC2_LTRUBA 411 +#define MV_MANEGTR_GIVESEGGSLIM 418 +#define MV_OTM_BOX_MORGLEFT 427 +#define ST_OTM_BOX_RIGHT 430 +#define ST_KZW_FRONT 573 +#define MV_KZW_GOEDGE 575 +#define QU_OTM_GLS_MORGRIGHT 640 +#define QU_SC4_ENTER_RIGHT 707 +#define ST_MAN8_FLYUP 769 +#define MV_MAN8_HANDSDOWN 772 +#define MV_BRD_PICKBALL 692 +#define MV_INV_OLDGLASSES_default 403 +#define PIC_INV_OLDEGG 370 +#define MV_INV_OLDCOIN_default 390 +#define ANI_INV_OLDCOIN 386 +#define MV_SLN_POT_TURNBACK 634 +#define ST_VSN_NORMAL 906 +#define ST_VSN_RIGHT 956 +#define QU_VSN_DRYG 958 +#define PIC_SC6_CLKAXIS 1006 +#define MV_MAN_FROMTRUBAVER2 1024 +#define MV_SC4_COIN_default 1029 +#define PIC_SC4_HOLE 1038 +#define MSG_SC2_LADDERCLICK 1101 +#define MSG_SC8_HIDELADDER_D 1107 +#define MV_MAN11_SWING_2 1112 +#define MV_MAN11_JUMPONSWING 1125 +#define PIC_SCD_13 1195 +#define MV_GMA_TOTRUBA 1234 +#define MV_BAL14_SPIN 1247 +#define QU_SC15_ENTER_RIGHT 1274 +#define ST_WHR19_SPIN 1318 +#define PIC_SC18_RTRUBA2 1322 +#define ST_BDG_CLOSED 1380 +#define ST_INV_BOTTLEFULL_default 1423 +#define QU_SC16_TAKEMUG 1435 +#define MV_BTL_FILL 1430 +#define MV_HND17_CYCLE 1452 +#define MSG_SC18_SHOWMANJUMPTO 1508 +#define QU_SC18_ENTER_RIGHT 1521 +#define ST_HND17_ASK 1559 +#define MV_INV_EGGAPL_default 1565 +#define MV_GFA_BREATHE 1589 +#define ST_GFA_SITSOCK 1592 +#define ST_GFA_SWINGSOCK 1598 +#define QU_SC22_ENTER_UP 1619 +#define ST_CND_2 1707 +#define MV_CND_4_5 1712 +#define MV_CND_9_0 1722 +#define PIC_SCD_24 1845 +#define MV_MAN24_TAKEBOARD 1876 +#define ANI_INV_SWAB 1917 +#define MV_CHI_HIDE 1961 +#define ST_BTA_EMPTY 2050 +#define ST_SHR_EMPTY 2150 +#define MV_MAN29_HIT 2088 +#define QU_DLD_BLINK 2216 +#define QU_FFT_PIPE_LOOKFLAG 2302 +#define PIC_SCD_35 2412 +#define MV_GMA20_FLR_LOOK 2430 +#define MV_GMA20_STD_BLINK 2435 +#define ANI_STOOL_20 2463 +#define MV_CTS_CYCLEDOWN 2470 +#define MSG_SC22_SHOWSTOOL 2495 +#define MV_BOX34_MAIN 2499 +#define MV_MAN1_TAKEDOMINO 2614 +#define QU_SC33_STARTWATER 2644 +#define ST_HZE_CUT 2678 +#define MV_POT_9 2698 +#define ST_BTS11_2 2707 +#define QU_SC14_EXITLIFT 1226 +#define QU_SC34_ENTERLIFT 2819 +#define ST_EGTR_MID1 2863 +#define MV_MOM_TAKE2 2886 +#define MSG_SC6_JUMPFW 2901 +#define MSG_SC6_RESTORESCROLL 2906 +#define ST_DRP3_NORM2 2923 +#define MV_MAN3_GIVECOIN_3 2930 +#define MSG_SC31_PULL 2944 +#define QU_SC6_DROPS3 2955 +#define ANI_NADUVTAIL 3023 +#define PIC_SC11_LADDER 3038 +#define QU_BTT_CLOCK 3195 +#define ST_BAL14_NORM4 3219 +#define MSG_SC14_HIDEPINK 3248 +#define QU_JET17_DROP 3295 +#define ST_BTL_FULL2 3307 +#define MV_MAN_SHOES2 3387 +#define SND_8_009 3619 +#define SND_9_008 3652 +#define SND_11_005 3684 +#define SND_11_016 3700 +#define SND_11_027 3711 +#define SND_13_003 3743 +#define SND_14_002 3779 +#define SND_14_013 3795 +#define QU_SC16_SND1 3821 +#define SND_16_011 3831 +#define SND_16_022 3842 +#define SND_16_033 3853 +#define QU_SC17_SND2 3866 +#define SND_17_010 3874 +#define SND_17_021 3885 +#define SND_20_007 3940 +#define SND_22_005 3983 +#define SND_22_016 3999 +#define SND_22_027 4010 +#define SND_24_003 4006 +#define SND_26_001 4077 +#define SND_26_012 4093 +#define QU_SC28_SND2 4149 +#define SND_28_010 4157 +#define MSG_SC9_TOLADDER 4206 +#define MV_MAN25_STARTROW 1880 +#define MSG_SC28_TURNOFF_6 4273 +#define QU_SC29_SND3 4337 +#define SND_30_008 4371 +#define SND_31_007 4390 +#define SND_32_006 4402 +#define SND_32_017 4413 +#define SND_32_028 4424 +#define SND_33_005 4437 +#define MV_JTI33_POURFULL 4455 +#define SND_35_003 4496 +#define SND_35_014 4512 +#define MV_BOX34_FLOOR 4564 +#define MV_GLV_DRINKBOTTLE 2164 +#define SND_35_025 4603 +#define SND_34_037 4617 +#define PIC_MSV_8_D 4658 +#define QU_TBL_GOR 4709 +#define SND_27_044 4687 +#define ST_BRDCMN_GOR 4734 +#define ST_BOT15_NORM 4781 +#define MV_LUK26_HIT 4889 +#define PIC_CSR_GOR 4898 +#define rMV_BRDCMN_STOPR 4945 +#define MSG_SC16_SHOWBEARDED 4956 +#define SND_CMN_068 4968 +#define rMV_KBK_FROMTRUBA 4973 +#define SND_13_036 4992 +#define SND_32_039 4997 +#define PIC_INTR1_RTRUBA 5002 +#define PIC_FIN1_UTRUBA 5004 +#define ST_FNFNG_AFTER 5065 +#define ST_FNG_SINGLE 5078 +#define SND_22_038 5306 +#define SND_23_015 5309 +#define PIC_MAP_A03 5265 +#define PIC_MAP_A14 5276 +#define PIC_MAP_P05 5281 +#define PIC_MAP_P16 5292 +#define SND_CMN_035 3714 +#define SND_28_021 4672 +#define PIC_MAP_S13 5235 +#define PIC_MAP_S24 5246 +#define PIC_MAP_S35 5259 +#define PIC_MAP_H30 5384 +#define PIC_MAP_S03 5225 +#define SND_13_037 5335 +#define PIC_SC26_SOCK 5312 +#define PIC_SC11_RTRUBA 1120 +#define PIC_SC3_DOMIN 5182 +#define MV_BHD_GOR 4939 +#define rMV_BHD_GOR 4941 +#define SND_INTR_013 5158 +#define ST_IN1HAND_BEFORE 5115 +#define MV_IN1HAND_DO 5114 +#define MV_FNHED_NOSE 5045 +#define ST_FNHED_NORM 5044 +#define ST_FNHND3_NORM 5039 +#define MSG_FIN_GOTO2 5024 +#define QU_SC33_TRYKUBIK 4979 +#define QU_BRD16_FLYL 4954 +#define QU_EGG6_GOL 4936 +#define ST_BBL_GOR 4925 +#define SND_25_025 4874 +#define SND_CMN_058 4869 +#define PIC_INV_MUGFULL_C 4846 +#define PIC_INV_HANDLE_C 4842 +#define PIC_INV_DOMINO_C 4832 +#define PIC_INV_CARPET_C 4830 +#define PIC_INV_SWAB_H 4819 +#define PIC_INV_GLASSES_H 4802 +#define PIC_INV_BOARD_H 4787 +#define MV_MAN_LOOKMONETOPR 4770 +#define SND_38_034 4730 +#define SND_36_014 4608 +#define ANI_BOOT_34 4560 +#define QU_SC26_SHOWSOCK 4556 +#define QU_SC37_SND1 4541 +#define SND_37_002 4537 +#define SND_36_003 4522 +#define SND_34_027 4487 +#define SND_34_016 4476 +#define SND_34_005 4460 +#define SND_33_006 4443 +#define SND_29_021 4355 +#define ST_STL34_BOX2 4305 +#define MV_TTA_GOD 4290 +#define MSG_SC28_ENDLIFT6 4244 +#define SND_38_023 4190 +#define SND_38_012 4177 +#define QU_SC38_SND2 4167 +#define SND_38_001 4161 +#define SND_27_034 4135 +#define SND_27_023 4124 +#define SND_27_012 4113 +#define QU_SC27_SND2 4103 +#define SND_27_001 4097 +#define SND_25_014 4067 +#define QU_SC25_SC3 4056 +#define SND_25_003 4051 +#define SND_21_007 3961 +#define QU_SC19_SND5 3918 +#define QU_SC18_SND4 3904 +#define QU_SC15_SND1 3803 +#define SND_15_002 3799 +#define SND_13_026 3771 +#define SND_13_015 3760 +#define SND_12_016 3736 +#define SND_12_005 3720 +#define SND_10_007 3673 +#define SND_1_011 3524 +#define SND_2_021 3515 +#define MSG_SC26_UPDATEDROP 3496 +#define QU_CHI_NORM 3485 +#define QU_WMN_SHOWBEFORE 3450 +#define ST_WMN28_EMPTY 3444 +#define MV_MUG17_FILLDROP 3412 +#define QU_MAN_DEF_STARTSHOES1 3379 +#define MV_CDI_BLINK 3311 +#define PIC_SC19_LADDER2 3301 +#define ST_GRL_POPA 3277 +#define ST_SPK4_NORM2 3113 +#define QU_SC1_SND5 3224 +#define SND_CMN_014 3138 +#define SND_2_010 3092 +#define MV_MID11_SWAB 3025 +#define ST_BOT4_LEFT 2882 +#define MV_MAN_STOPLADDER2 2845 +#define QU_SC6_ENTER_LIFTDOWN 2810 +#define QU_SC6_EXITLIFT 1055 +#define MV_LBN_9H 2806 +#define MV_LBN_7 2770 +#define ST_LBN_1P 2754 +#define ANI_BALLDROP 2685 +#define MV_MAN25_TAKEPOTTIE 2676 +#define MV_KDK_DRIZZLE 2671 +#define MV_MAN35_PLUGPIPE 2513 +#define MV_LEG_POT0_SHOW 2323 +#define QU_SC32_ENTER_RIGHT 2295 +#define PIC_SC32_RTRUBA 2292 +#define MV_FLG_STOPL 2261 +#define QU_SC38_SHOWDMN_DLD2 2255 +#define QU_SC29_ENTER_UP 2077 +#define QU_SC28_ENTER_RIGHT 2076 +#define QU_DRV_STARTDRIVE 2029 +#define ST_MID_BROOM 2022 +#define ST_DRV_RIGHTNOVENT 2002 +#define MV_DRV_TOLEFT 1998 +#define ANI_VODILLA 1994 +#define ANI_INV_VENT 1968 +#define QU_SC26_CLOSE1 1936 +#define MV_MAN25_TRYSWAB 1888 +#define PIC_SC24_PIPE2 1871 +#define QU_SC25_ENTER_RIGHT 1862 +#define ST_LUK23U_CLOSED 1819 +#define MV_LUK23U_OPEN 1818 +#define MV_LUK23_OPEN 1814 +#define QU_SC22_SHOWSACK 1792 +#define QU_SC22_SHOWSTOOL 1793 +#define MV_MSH_MOVE 1755 +#define MV_TABURETTE_default 1746 +#define PIC_INV_SOCK 1701 +#define MV_MAN2_TAKEBOX 1695 +#define ST_GRFU_KISS 1681 +#define PIC_SC22_UTRUBA 1587 +#define PIC_SC22_DTRUBA 1586 +#define MV_KSL_SWING 1460 +#define QU_GRL_LAUGH 1376 +#define ST_WHR18_SPIN 1301 +#define MV_GRD2_LOOKLEFT 1284 +#define QU_GRD2_BLINK1 1288 +#define QU_GMS_DRYG 1277 +#define ANI_BALL14 1246 +#define PIC_INV_GUM2 1207 +#define ST_INV_GUM2_default 1206 +#define MV_HDLR_0_1 1197 +#define ST_SWR_SIT 1147 +#define QU_NDV_EAT 968 +#define ANI_BIGLUK 909 +#define ANI_INV_OLDBOOT 396 +#define ST_SLN_POT_HOBOT 839 +#define MV_BTT_SLEEP 751 +#define ST_BTT_SPOON 741 +#define PIC_SCD_2 728 +#define MV_CST_TURNDOWN 719 +#define MV_CST_SPINHEADUP 716 +#define ST_CLK_CLOSED 590 +#define QU_EGTR_SORROWTOSLIM 526 +#define QU_DYAS_DEFAULT5 516 +#define MV_EGTR_BRK_BOOT 383 +#define MV_DYAS_SLEEPS 317 +#define MV_EGTR_SMOBLRV 338 +#define ANI_EGGBREAKER 376 +#define MV_MANYAS_TAKESCRATE 362 +#define ANI_KOZAWKA 495 +#define PIC_SC5_LTRUBA 636 +#define QU_SC3_ENTER_UP 706 +#define ST_MAN8_FLYDOWN 771 +#define MV_HGN_PLUU 813 +#define ST_SC7_BOX_default 793 +#define QU_SCT_LOOK 819 +#define MV_SLN_BOOT_DECLINE 832 +#define ST_INV_COIN_default 877 +#define MV_INV_GLASSES_default 888 +#define PIC_SC10_LTRUBA 972 +#define LiftDown 1058 +#define rMV_MAN_TURN_RL 1072 +#define MV_MAN11_FROMDOWN 1151 +#define MV_STR_TURNL 1173 +#define QU_STR_HIDE 1187 +#define PIC_SCD_14 1224 +#define QU_GMA_THROW 1255 +#define MV_BDG_OPEN 1379 +#define QU_SC18_ENTER_UP 1468 +#define MSG_SC18_MANCLIMBEDUP 1539 +#define ANI_INV_EGGCOIN 1567 +#define ST_INV_EGGCOIN_default 1569 +#define QU_GFA_SWINGSOCK 1615 +#define QU_DYAS_SLEEP 1690 +#define ST_CND_3 1709 +#define MV_CLN_ZHMUR 1768 +#define PIC_SCD_25 1846 +#define QU_SC25_ROWTOLADDER 1910 +#define ST_INV_SWAB_default 1919 +#define MV_GRFM_ASS 1982 +#define MV_ASS_TAIL 2121 +#define rMV_ASS_SHOW 2126 +#define ST_BTL38_NORM 2190 +#define QU_GLV_HMRKICK 2207 +#define MV_FFT_0_1 2274 +#define QU_GLV_DRINKBOTTLE 2286 +#define PIC_INV_TUBE 2320 +#define MV_MAN36_GOOUT 2367 +#define MV_MAN36_SHAKE 2368 +#define QU_SC35_ENTER_LEFT 2410 +#define ANI_HOSE 2424 +#define QU_GMA20_STL_NOSE 2447 +#define QU_GMA20_STD_BLINK 2450 +#define MV_STL20_NORM 2464 +#define QU_CTS34_BLINK 2388 +#define MV_MAN34_GOUP 2484 +#define ANI_INV_STOPPER 2535 +#define MV_LUK34_OPEN 2542 +#define PIC_SCD_36 2567 +#define MV_GRD3_PULL 2578 +#define MV_GMA22_TAKESTOOL 2610 +#define QU_SC22_FALLSACK_GMA 2613 +#define ANI_JETTIE_FLOW 2627 +#define MV_TSTB_FLOW 2660 +#define ST_TSTG_NORM 2664 +#define ST_POT_9 2699 +#define PIC_SC9_LADDER_R 2700 +#define ST_DMN3_NORM 2734 +#define MV_MAN_FROMHORTRUBA2 2846 +#define MV_MAN_FROMLADDER 493 +#define ST_EGTR_MID2 2869 +#define MV_MOM_TAKE3 2887 +#define MV_MOM_JUMPCLOSED 2892 +#define ST_INV_EGGBLACK_default 2920 +#define MV_CST_TRYCLOSE 2874 +#define QU_SC6_FALLGRIT2 2966 +#define PIC_CMN_SAVE 3034 +#define MV_GRIT2_FALL 3190 +#define ST_HDLL_HAMMER 3205 +#define MSG_SC14_SHOWBALLLAST 3246 +#define MSG_SC14_HIDEBALLLAST 3251 +#define PIC_SC18_BOARD 3296 +#define PIC_SC18_RTRUBA3 3298 +#define ST_DMS_3 3319 +#define ST_HDL_BROKEN 3342 +#define rMV_MAN_SHOES1 3383 +#define MV_DRP24_TOWATER 3506 +#define SND_9_009 3653 +#define SND_11_006 3690 +#define SND_11_017 3701 +#define SND_11_028 3712 +#define SND_13_004 3744 +#define SND_14_003 3780 +#define SND_14_014 3796 +#define SND_16_001 3816 +#define QU_SC16_SND2 3822 +#define SND_16_012 3832 +#define SND_16_023 3843 +#define SND_16_034 3854 +#define QU_SC17_SND3 3867 +#define SND_17_011 3875 +#define SND_17_022 3886 +#define SND_20_008 3941 +#define SND_22_006 3989 +#define SND_22_017 4000 +#define SND_22_028 4011 +#define SND_24_004 4007 +#define SND_26_002 4078 +#define QU_SC26_SND1 4082 +#define SND_26_013 4094 +#define QU_SC28_SND3 4150 +#define SND_28_011 4158 +#define MV_LFT28_OPEN 4239 +#define ST_LFT28_CLOSED 4240 +#define QU_MAN32_LOOKDOWN 4303 +#define QU_SC29_SND4 4338 +#define SND_29_010 4344 +#define SND_30_009 4372 +#define SND_31_008 4391 +#define SND_32_007 4403 +#define SND_32_018 4414 +#define SND_32_029 4425 +#define SND_35_004 4497 +#define SND_35_015 4513 +#define SND_3_020 4550 +#define SND_4_030 4551 +#define MSG_SC27_TAKEVENT 4584 +#define QU_SC35_FALLGRIT 4611 +#define SND_34_038 4618 +#define PIC_MNU_CONTINUE_D 4625 +#define PIC_MLD_CANCEL_L 4649 +#define PIC_MSV_9_D 4659 +#define PIC_MSV_1_L 4660 +#define SND_28_022 4673 +#define SND_CMN_047 4692 +#define ST_TBL_R 4707 +#define ST_BRDCMN_RIGHT 4732 +#define SND_35_026 4863 +#define MV_MAN11_TAKEBOOT 4884 +#define MV_GMA20_STL_DENY 4886 +#define PIC_CSR_DEFAULT 4891 +#define QU_BALL_WALKR 4919 +#define SND_CMN_069 4969 +#define QU_KBK32_START 4982 +#define SND_18_010 4994 +#define QU_FN1_ENTER_RIGHT 5005 +#define SND_FIN_030 5105 +#define MSG_FIN_ENDFINAL 5109 +#define MV_IN1GLS_NORM 5120 +#define ANI_IN2BOOT 5140 +#define SND_INTR_002 5147 +#define PIC_MSV_SPACE_L 5191 +#define SND_21_029 5213 +#define SND_17_033 4018 +#define SND_23_016 5310 +#define MSG_SC34_ONBUMP 5313 +#define PIC_MAP_A04 5266 +#define PIC_MAP_P06 5282 +#define PIC_MAP_P17 5293 +#define PIC_CSR_MAP 5339 +#define SND_CMN_025 3407 +#define SND_CMN_036 3715 +#define PIC_MOV_BGR 5343 +#define PIC_MAP_S14 5236 +#define PIC_MAP_S25 5247 +#define PIC_MAP_S36 5260 +#define PIC_MAP_H31 5385 +#define PIC_MAP_H20 5374 +#define PIC_MAP_S04 5226 +#define MSG_SC3_ONTAKECOIN 5338 +#define PIC_CSR_HELPERBGR 5331 +#define SC_30 2064 +#define SND_INTR_014 5159 +#define SND_INTR_003 5148 +#define ST_CLK1_CYCLE 5129 +#define SND_FIN_020 5092 +#define MSG_FIN_GOTO3 5071 +#define MV_FCN_FALL 5015 +#define SND_25_026 4875 +#define SND_CMN_059 4873 +#define PIC_INV_LEVERHANDLE_C 4843 +#define PIC_INV_BROOM_C 4829 +#define PIC_INV_BOTTLE_C 4826 +#define PIC_INV_VENT_H 4822 +#define PIC_INV_HAMMER_H 4805 +#define PIC_INV_EGGCOIN_H 4800 +#define QU_SC29_BRD1 4741 +#define SND_CMN_048 4702 +#define QU_EGTR_MD2_SHOW 4698 +#define SND_3_021 4696 +#define SND_28_023 4683 +#define MSG_SC28_TURNON_0 4677 +#define ANI_BUTTON_27 4579 +#define QU_SC37_SND2 4542 +#define SND_37_003 4538 +#define QU_SC36_SND1 4525 +#define SND_36_004 4523 +#define SND_34_028 4488 +#define SND_34_017 4477 +#define SND_34_006 4466 +#define SND_33_007 4444 +#define SND_29_022 4356 +#define ANI_TIOTIA 4286 +#define MSG_SC28_LIFT1_SHOWAFTER 4261 +#define ST_MAN28_WASH 4250 +#define QU_SC25_MANLOOKUP 4213 +#define SND_38_024 4191 +#define QU_SC38_HMRKICK 4180 +#define SND_38_013 4178 +#define QU_SC38_SND3 4168 +#define SND_38_002 4162 +#define SND_27_035 4136 +#define SND_27_024 4125 +#define SND_27_013 4114 +#define QU_SC27_SND3 4104 +#define SND_27_002 4098 +#define SND_25_015 4068 +#define QU_SC25_SND1 4054 +#define SND_25_004 4052 +#define SND_23_006 4024 +#define SND_21_019 3973 +#define SND_21_008 3962 +#define SND_19_010 3923 +#define QU_SC18_SND5 3905 +#define QU_SC15_SND2 3804 +#define SND_15_003 3800 +#define SND_13_027 3772 +#define SND_13_016 3761 +#define SND_12_017 3737 +#define SND_12_006 3726 +#define SND_10_008 3674 +#define SND_1_012 3525 +#define SND_2_022 3518 +#define MV_MAN27_SPADE2SWAB 3486 +#define MSG_SC17_DROP 3414 +#define QU_SC27_RESTARTBETS 3370 +#define QU_SC22_TRYHANDLE 1802 +#define ANI_SPEAKER_4 3275 +#define SND_CMN_015 3139 +#define SND_4_020 3135 +#define SND_3_010 3109 +#define SND_2_011 3093 +#define SND_CMN_004 3074 +#define QU_SC13_CLOSESUCCESS 3062 +#define QU_STR_TURNR_L 3059 +#define QU_SC13_OPENFAIL 3042 +#define QU_MOM_OPENEYE 2949 +#define MSG_SC6_ENABLEDROPS 687 +#define PIC_SC4_LBTRUBA 2884 +#define MV_MAN17_TAKEFIRECAN 2859 +#define ST_LBN_0P 2833 +#define QU_SC15_ENTERLIFT 2811 +#define ST_LBN_9H 2807 +#define MV_LBN_8H 2804 +#define MV_LBN_8 2773 +#define QU_SC6_FALLBALL 2690 +#define MV_SPR_NORM 2516 +#define ST_LEG_DOWN1 2330 +#define ANI_LEG 2322 +#define ST_FLG_LEFT 2260 +#define PIC_SC38_TABLE 2206 +#define MV_MAN29_BEND 2091 +#define PIC_SC29_LTRUBA 2081 +#define QU_MID_BROOM 2046 +#define QU_MID_LOOK 2045 +#define MV_MID_SWITCH 2020 +#define ST_MID_SWAB2 2019 +#define QU_SC26_CLOSE2 1938 +#define MV_WTR25_FLOW 1857 +#define PIC_SC25_UTRUBA 1852 +#define MV_JET24_FLOW 1838 +#define QU_SC23_STARTKISS 1822 +#define QU_GRFU_KISS 1821 +#define QU_SC22_PUTSTOOL 1803 +#define MV_MAN22_TAKEHANDLE 1752 +#define ST_TABURETTE_default 1747 +#define QU_GRFU_STOPCHMOK 1671 +#define QU_GRFU_BLINKDOWN 1668 +#define PIC_SC22_LADDER 1585 +#define ST_KSL_JUMPMAN 1505 +#define ST_GRL18_FLYFROM 1486 +#define ANI_GIRL18 1484 +#define MV_KSL_1_2 1467 +#define MV_MAN16_TAKEMUG 1362 +#define MV_BOY_PULL 1332 +#define MV_GMA_JUMPFW 1230 +#define MV_MAN13_PUTGUM 1203 +#define ST_HDLR_GUM 1201 +#define MV_SWR_SWING 1114 +#define MSG_SC3_UTRUBACLICK 1103 +#define MV_MAN_STOPLADDERD 458 +#define MSG_SC10_HIDEGUM 993 +#define MSG_SC5_SHOWHANDLE 918 +#define MSG_SC5_TESTLUK 914 +#define MV_BLK_OPEN 910 +#define PIC_INV_OLDCOIN 406 +#define ST_INV_EGG_default 871 +#define ANI_INV_APPLE 878 +#define QU_SLN_POT_MOVEBACK 854 +#define MV_SLN_BOOT_KICK 828 +#define MV_BTT_EAT 740 +#define PIC_SCD_3 729 +#define ST_CST_WHANDLE 715 +#define PIC_SC1_UTRUBA 699 +#define MSG_CLICKBOTTLE 569 +#define ST_PNK_WEIGHTRIGHT 504 +#define ST_SPR_UP 544 +#define QU_EGTR_FATSLAP 529 +#define MV_MAN_TURN_DR 491 +#define MV_MAN_TURN_UR 487 +#define MV_MAN_FROMHORTRUBA 475 +#define ST_OTM_GLS_LEFT 421 +#define MV_EGBR_KACHAET 381 +#define MV_EGTR_FATOBLRV 373 +#define MV_EGTR_SLIMTRAIN 342 +#define MV_OTM_BOXDEFAULT 431 +#define MV_MAN_TOTRUBAHOR 445 +#define ST_KZW_RIGHT 559 +#define QU_KZW_WALKBOTTLE2 579 +#define QU_SC4_CLOSECLOCK 597 +#define PIC_SC4_LRTRUBA 616 +#define MV_OTM_HANDLEDOWN 620 +#define MV_OTM_BOXHANDLEDOWN 626 +#define ST_MOM_STANDS 658 +#define MV_CST_MORG 712 +#define ST_INV_OLDHANDLE_default 797 +#define PIC_INV_OLDAPPLE 409 +#define ST_PBAR_FINISH 899 +#define PIC_SC9_RTRUBA 901 +#define ST_BALL9_EMPTY 940 +#define ST_NDV_TURN 950 +#define ANI_LIFT 982 +#define MV_MAN4_TAKEAPPLE 1039 +#define ST_LFT_CLOSED 1049 +#define MV_MAN_TURN_SDU 1086 +#define MV_MAN_TURN_SUD 1089 +#define MV_MAN_STARTR 324 +#define MSG_SC6_UTRUBACLICK 1105 +#define ANI_MAN11 1108 +#define PIC_INV_GUM 1160 +#define ST_GMA_SIT 1229 +#define MV_MAN14_STEPFW 1240 +#define PIC_SCD_15 1278 +#define MV_GRD2_PULL 1280 +#define PIC_SC17_LADDER 1324 +#define PIC_INV_MUG 1373 +#define MV_HND17_FROMCYCLE 1453 +#define QU_HND17_ASK 1456 +#define MSG_SC17_UPDATEHAND 1560 +#define ST_INV_EGGAPL_default 1566 +#define ANI_INV_EGGBOOT 1570 +#define MV_INV_EGGBOOT_default 1571 +#define ST_GFA_SWING 1596 +#define MV_GFA_CHESHSOCK 1604 +#define ST_GRFG_HAIR 1677 +#define ST_CND_4 1711 +#define MV_CND_5_6 1714 +#define ST_CLN_STAND 1769 +#define ANI_INV_LEVERHANDLE 1777 +#define ST_INV_LEVERHANDLE_default 1779 +#define ANI_INV_STOOL 1780 +#define PIC_SCD_26 1847 +#define ST_BRD25_RIGHT 1900 +#define PIC_INV_SWAB 1923 +#define ST_CHI_NORM 1960 +#define QU_CHI_SHOW 1964 +#define MSG_SC29_DISABLERIDEBACK 2106 +#define QU_ASS_TAIL_R 2135 +#define ST_FFT_TUBEFLOW 2232 +#define ST_FFT_PIPEOPEN 2244 +#define PIC_SC32_HDLBASE 2400 +#define MV_MAN32_SPIN 2403 +#define ST_PDV_LARGE 2421 +#define MV_CTS34_SHRINK 2477 +#define MV_VNT34_SPIN 2480 +#define MV_MAN34_TRY 2485 +#define MV_MAN34_BOARD_BUMP 2504 +#define QU_LUK34_OPEN 2546 +#define PIC_SCD_37 2568 +#define MV_MOM_BLINK 825 +#define rMV_MAN_FROMHORTRUBA2 2847 +#define MV_EGTR_MD1_JOY 2867 +#define MV_MOM_TAKE4 2888 +#define ANI_POOL_3 2924 +#define MSG_SC1_SHOWOSK2 468 +#define MSG_SC4_HANDOVER 2960 +#define MV_GRIT1_FALL 2962 +#define QU_SWR_SITBALD 3007 +#define ST_SWR_STAND3 3014 +#define QU_SWR_STAND 3015 +#define MV_PCH_NORM 979 +#define QU_MID11_SWAB 3032 +#define SND_1_001 3041 +#define ST_MUG38_NORM2 3183 +#define ST_GRIT2_GRIT 3192 +#define ST_DMS_4 3320 +#define QU_CLN_TUZH 3327 +#define MV_MAN23_TRY 3333 +#define rMV_TABURETTE_default 3336 +#define QU_MAN_DEF_STARTSHOES2 3394 +#define rMV_MAN_SHOES2 3399 +#define ST_DRP24_EMPTY 3507 +#define SND_11_007 3691 +#define SND_11_018 3702 +#define SND_11_029 3713 +#define SND_13_005 3745 +#define SND_14_004 3781 +#define QU_SC14_SND1 3783 +#define SND_14_015 3797 +#define SND_16_002 3817 +#define QU_SC16_SND3 3823 +#define SND_16_013 3833 +#define SND_16_024 3844 +#define SND_16_035 3855 +#define SND_17_001 3860 +#define QU_SC17_SND4 3868 +#define SND_17_012 3876 +#define SND_17_023 3887 +#define SND_20_009 3942 +#define SND_22_007 3990 +#define SND_22_018 4001 +#define SND_22_029 4012 +#define SND_CMN_037 4030 +#define SND_24_005 4028 +#define SND_26_003 4079 +#define QU_SC26_SND2 4083 +#define SND_26_014 4095 +#define SND_28_001 4143 +#define QU_SC28_SND4 4151 +#define SND_28_012 4159 +#define MSG_SC25_TOLADDER 4215 +#define MV_MAN1_PUTBOOT 4230 +#define MSG_SC32_ONLADDER 2270 +#define QU_SC29_SND5 4339 +#define SND_29_011 4345 +#define SND_32_008 4404 +#define SND_32_019 4415 +#define SND_35_005 4498 +#define SND_35_016 4514 +#define MV_DRV_PUSHBUTTON 2005 +#define ST_CPT36_NORM 4602 +#define QU_SC36_SHOWCARPET 4605 +#define SND_36_015 4610 +#define SND_34_039 4619 +#define PIC_MNU_EXIT_D 4621 +#define PIC_MSV_OK_L 4636 +#define PIC_MSV_CANCEL_L 4638 +#define PIC_MSV_2_L 4661 +#define SND_31_009 4727 +#define SC_1 301 +#define PIC_CSR_DEFAULT_INV 4892 +#define QU_KBK33_START 4983 +#define SND_4_031 4988 +#define MV_FNFNG_0_1 5077 +#define SND_FIN_031 5106 +#define MSG_LIFT_STARTEXITQUEUE 5186 +#define SND_38_035 5204 +#define SND_17_034 4023 +#define PIC_MNU_RESTART_L 5299 +#define QU_SC22_TRYBOX 5311 +#define PIC_MAP_A05 5267 +#define PIC_MAP_P07 5283 +#define PIC_MAP_P18 5294 +#define SND_CMN_026 3408 +#define PIC_MAP_S15 5237 +#define PIC_MAP_S26 5248 +#define PIC_MAP_S37 5261 +#define PIC_MAP_H32 5386 +#define PIC_MAP_H21 5375 +#define PIC_MAP_H10 5366 +#define PIC_SC17_RTRUBA2 5297 +#define SND_36_016 5208 +#define ST_PBAR_FINISH2 5179 +#define SC_31 2065 +#define SND_INTR_015 5160 +#define SND_INTR_004 5149 +#define MV_IN1CLK_SHOW 5127 +#define ST_IN1MAN_SLEEP 5112 +#define PIC_FN4_LADDER 5096 +#define SND_FIN_021 5093 +#define SND_FIN_010 5082 +#define MSG_FIN_GOTO4 5075 +#define ST_FNHND5_AFTER 5055 +#define ST_FNHND4_AFTER 5051 +#define MV_FNHED_SHOWHAND 5047 +#define QU_FIN1_FALLCOIN 5018 +#define PIC_SC35_DTRUBA_R2 4986 +#define ANI_BIGBALL 4923 +#define SND_25_027 4876 +#define PIC_INV_SCISSORS_H 4815 +#define PIC_INV_EGGBOOT_H 4799 +#define rMV_MAN_LOOKMONETOPR 4774 +#define MSG_SC15_ASSDRYG 4755 +#define MV_TBE36_NORM 4750 +#define QU_SC29_BRDOUT1 4743 +#define QU_SC29_BRD2 4742 +#define rMV_BRD_FALL 4737 +#define SND_CMN_049 4703 +#define QU_EGTR_MD1_SHOW 4697 +#define MSG_SC23_HIDEGIRAFFEE 4650 +#define ST_CPT35_NORM 4594 +#define ST_BOT34_NORM 4562 +#define MV_MAN26_PUTSOCK 4557 +#define QU_SC37_SND3 4543 +#define SND_37_004 4539 +#define QU_SC36_SND2 4526 +#define SND_36_005 4524 +#define SND_34_029 4489 +#define SND_34_018 4478 +#define SND_34_007 4467 +#define SND_33_008 4445 +#define SND_29_023 4357 +#define QU_SC32_FROMLADDER 4300 +#define SND_38_025 4192 +#define SND_38_014 4179 +#define QU_SC38_SND4 4169 +#define SND_38_003 4163 +#define SND_27_036 4137 +#define SND_27_025 4126 +#define SND_27_014 4115 +#define QU_SC27_SND4 4105 +#define SND_27_003 4099 +#define SND_25_016 4069 +#define QU_SC25_SND2 4055 +#define SND_25_005 4053 +#define SND_23_007 4025 +#define SND_21_009 3963 +#define SND_19_011 3924 +#define SND_14_016 3813 +#define QU_SC15_SND3 3805 +#define SND_15_004 3801 +#define SND_13_028 3773 +#define SND_13_017 3762 +#define SND_12_018 3738 +#define SND_12_007 3727 +#define SND_10_009 3675 +#define SND_6_030 3569 +#define SND_1_013 3526 +#define SND_2_023 3520 +#define ST_DRP25_EMPTY 3501 +#define MV_MID_SPADE 3488 +#define MSG_SC25_STARTBEARDEDS 3423 +#define ST_BRDCMN_EMPTY 3422 +#define SND_CMN_027 3409 +#define ST_VNT27_LIES2 3354 +#define ST_VNT26_UP 1929 +#define rMV_MAN25_CHIH 3343 +#define MV_MAN24_TRY 3340 +#define SND_2_001 3083 +#define QU_SC18_ENTER_UPRIGHT 3302 +#define QU_SC16_SHOWBOOT 3290 +#define MV_KZW14_JUMP 3268 +#define ST_KZW14_FRONT 3264 +#define MV_KZW14_SHOW 3262 +#define MV_GMA_BACKOFF2 3217 +#define ST_BTL38_FULL 3172 +#define SND_CMN_016 3140 +#define SND_4_021 3136 +#define SND_4_010 3125 +#define SND_2_012 3094 +#define SND_CMN_005 3075 +#define SND_1_002 3066 +#define rMV_STR_TURNL 3050 +#define QU_SC13_OPENSUCCESS 3047 +#define MSG_SC7_PULL 2943 +#define MV_FCN_NORM 2861 +#define QU_SC15_ENTER_LIFTDOWN 2814 +#define ST_LBN_8H 2805 +#define MV_LBN_7H 2802 +#define LIFTBTN_1 2781 +#define MV_LBN_9 2776 +#define ST_GRT9_NORM 2721 +#define ST_BDP_NORM 2687 +#define MV_MAN34_BOARD_STAND 2548 +#define MV_MAN34_JUMPDOWN 2385 +#define ST_LEG_DOWN2 2334 +#define MV_MAN32_TUBETOPIPE 2275 +#define ANI_FLAG 2257 +#define MSG_SC29_ENABLEPORTER 2096 +#define QU_MID_SWAB2 2043 +#define MV_MID_KERN 2016 +#define MV_DRV_FROMCYCLE 2003 +#define PIC_INV_VENT 1971 +#define MSG_SC26_HIDEVENT 1945 +#define QU_SC26_CLOSE3 1940 +#define QU_SC25_TRYBROOM 1912 +#define MV_MAN25_ROW 1882 +#define QU_SC26_ENTER_UP 1865 +#define QU_WTR25_FLOW 1859 +#define MV_WTR24_FLOW 1835 +#define QU_JET24_FLOW 1841 +#define ANI_JET24 1837 +#define QU_SC21_SHOWLEVER 1789 +#define QU_GRFU_TURN_UD 1664 +#define MV_GRFB_DANGLE 1639 +#define ST_MAN18_STANDKSL 1501 +#define MV_WR16_DEFAULT 1345 +#define MV_SMG_FINGERS 1404 +#define MV_MAN16_PUTMUG 1369 +#define PIC_SC16_TUMBA 1368 +#define MV_GRL_STARTLAUGH 1341 +#define MV_GRL_DRINK 1339 +#define PIC_SCD_16 1299 +#define QU_GMA_JUMPFW 1249 +#define MV_INV_BALL_default 1243 +#define PIC_SC14_RTRUBA 1221 +#define MV_HDLR_1_2 1200 +#define PIC_SC11_LTRUBA2 1150 +#define MSG_SC11_RESTARTMAN 1133 +#define MV_MAN11_JUMPHIT 1129 +#define PIC_SC1_LADDER 1091 +#define ST_KCH_180 1097 +#define MSG_SC10_SHOWGUM 994 +#define MV_MAN12_BOOT2POT 984 +#define QU_NDV_LOOK 970 +#define ST_GLT_FLOWN 932 +#define ANI_PLEVATEL 919 +#define PIC_INV_OLDBOOT 407 +#define QU_SLN_POT_MOVE 853 +#define QU_SLN_BOOT_LOOK 848 +#define MV_SLN_POT_INOUT 845 +#define ANI_SC7_BOX 791 +#define QU_HGN_MORG 814 +#define ST_MAN8_ONLADDER 786 +#define MV_MAN8_GOODLUCK 785 +#define MSG_STARTARCADE 781 +#define PIC_SCD_4 730 +#define QU_MOM_SHAKE 672 +#define MV_HND_TAKE0 604 +#define MV_KZW_RAISEHEAD 577 +#define ST_MAN_ONPLANK 552 +#define PIC_TEST 508 +#define ST_MAN_GOLADDER 450 +#define MV_EGBR_LOWERHEAD 382 +#define ST_EGTR_SLIM 336 +#define MV_OTM_GLS_DECLINES 426 +#define MV_OTM_BOX_TURNR 428 +#define ST_OTM_BOX_LEFT 429 +#define MV_OTM_MORGLEFT 420 +#define MSG_EGGEATEN 535 +#define ANI_MAMASHA 656 +#define TrubaDown 697 +#define ST_VMT_MIN 766 +#define MV_SCT_MORG 799 +#define ANI_INV_HAMMER 884 +#define ST_NDV_SIT 946 +#define MV_MAN6_INSTHANDLE 1007 +#define MSG_SHOWCOIN 1033 +#define PIC_SC8_ARCADENOW 1043 +#define MV_LFT_CLOSE 1053 +#define MV_KCH_MAIN 1095 +#define ST_MAN11_EMPTY 1110 +#define MV_MAN11_JUMPTOSWING 1126 +#define ANI_INV_VANTUZ 1157 +#define MV_INV_VANTUZ_default 1158 +#define PIC_SC13_LTRUBA 1171 +#define ST_STR_RIGHT 1174 +#define QU_STR_NOSE 1188 +#define ANI_HANDLE_L 1209 +#define MV_GMA_BLINK 1228 +#define MV_MAN14_KICK 1237 +#define QU_SC15_ENTER_UP 1275 +#define MV_BOY_KICK 1355 +#define ANI_INV_BOTTLE 1418 +#define QU_HND17_FROMCYCLE 1457 +#define PIC_SC18_LADDER1 1471 +#define MSG_SC18_SHOWBOYJUMP 1495 +#define MV_MAN_FROMLADDERUP 1522 +#define PIC_INV_EGGCOIN 1577 +#define MV_GFA_TOSWINGSOCK 1600 +#define QU_GFA_STARTSOCK 1613 +#define MV_GRFG_SHOWHAIR 1676 +#define MV_GRFG_BLINKHAIR 1679 +#define QU_GRFU_TURN_DU 1665 +#define ST_CND_5 1713 +#define QU_SC23_FROMCALENDAR 1734 +#define QU_SC24_ENTER_DOWN 1831 +#define QU_SC24_ENTER_DOWNLADDER 1832 +#define PIC_SCD_27 1916 +#define MV_LUK23_1_2 1974 +#define ST_HDL23_DEF 1980 +#define MV_BTA_FALL 2049 +#define QU_MID_SWITCH 2042 +#define PIC_SC29_RFLOOR 2153 +#define MV_GLV_HMRKICK 2155 +#define MV_GLV_TOSMALL_NOHMR 2161 +#define MV_DLD_PUT 2174 +#define MV_MLS_TURNRL 2178 +#define MSG_SC38_DRINK 2225 +#define PIC_SCD_38 2228 +#define QU_FFT_PIPE_OPENEYE 2299 +#define QU_FFT_PIPE_BLINK 2301 +#define QU_FFT_TUBE_STOP 2308 +#define MV_INV_PIPE_default 2318 +#define QU_LEG_HIDE0 2375 +#define MV_CTS34_BLINK 2479 +#define ANI_STOOL_34 2486 +#define ANI_BOX_34 2498 +#define PIC_INV_SCISSORS 2530 +#define QU_GRD37_BLINK1 2596 +#define MV_JTI33_POUR 2630 +#define MSG_SC33_HANDLEDOWN 2643 +#define QU_SC6_SHOWNEXTBALL 2689 +#define MV_MAN33_TAKETUBE 2718 +#define ANI_MUG_17 2737 +#define QU_SC3_EXITLIFT 2808 +#define MV_EGTR_MD2_JOY 2872 +#define QU_DRP3_DROP 2876 +#define QU_EGTR_MD2_BOLTLEGS 2879 +#define MV_MOM_TAKE5 2889 +#define PIC_SC4_BOTTLE2 2936 +#define ST_GRT1_GRIT 2964 +#define ST_HDLR_DOWN_GUM 3044 +#define SND_5_020 3161 +#define ST_RPE15_NORM 3257 +#define MV_DMS_FOUR 3322 +#define MSG_SC27_HANDLERTOBACK 3372 +#define QU_MAN_DEF_SHOES1_R 3392 +#define MV_GRFM_AFTER 3473 +#define MV_GRFU_OPENEYES 3474 +#define SND_11_008 3692 +#define SND_11_019 3703 +#define QU_SC13_SND1 3746 +#define SND_13_006 3751 +#define SND_14_005 3782 +#define QU_SC14_SND2 3784 +#define SND_16_003 3818 +#define QU_SC16_SND4 3824 +#define SND_16_014 3834 +#define SND_16_025 3845 +#define SND_16_036 3856 +#define SND_17_002 3861 +#define QU_SC17_SND5 3869 +#define SND_17_013 3877 +#define SND_17_024 3888 +#define SND_22_008 3991 +#define SND_CMN_038 4031 +#define QU_SC24_SND1 4036 +#define SND_24_006 4041 +#define SND_26_004 4080 +#define QU_SC26_SND3 4084 +#define SND_26_015 4096 +#define SND_28_002 4144 +#define QU_SC28_SND5 4152 +#define SND_28_013 4160 +#define MSG_SC28_TURNON_1 4278 +#define QU_SC32_TEST1 4297 +#define QU_CTS_DEFAULT 4302 +#define SND_29_001 4330 +#define SND_29_012 4346 +#define SND_32_009 4405 +#define QU_SC35_SND1 4499 +#define SND_35_006 4504 +#define SND_35_017 4515 +#define SND_3_011 3110 +#define MV_RHT_OPEN 2365 +#define MV_RNG_OPEN 4612 +#define PIC_MNU_LOAD_L 4628 +#define PIC_MSV_3_L 4662 +#define MV_BRD28_TALK 4680 +#define MV_BRDCMN_FLYAWAY 4736 +#define ST_SHD_CMN0 4861 +#define SC_2 302 +#define QU_EGTR_SLIMSHOW 4883 +#define PIC_CSR_GOFAR_R 4896 +#define PIC_CSR_GOU 4899 +#define PIC_CSR_GOD 4900 +#define MV_KBK_GOR 4964 +#define rMV_KBK_GOR 4972 +#define SND_4_032 4989 +#define SND_3_022 4991 +#define SC_INTRO1 3896 +#define ST_FNHND1_NORM 5030 +#define SND_FIN_032 5107 +#define QU_IN2_DO 5144 +#define PIC_SCD_INTR 5163 +#define SC_20 1144 +#define MSG_SC11_SITSWINGER 5198 +#define MSG_SC20_UPDATELOCKABLE 5217 +#define ST_HZE_CUT2 5318 +#define PIC_MAP_A06 5268 +#define PIC_MAP_P08 5284 +#define ST_BTN32_ON 5350 +#define PIC_MLD_BGR 4645 +#define PIC_MAP_S05 5227 +#define PIC_MAP_S16 5238 +#define PIC_MAP_S27 5249 +#define PIC_MAP_S38 5262 +#define PIC_MAP_H33 5387 +#define PIC_MAP_H22 5376 +#define PIC_MAP_H11 5367 +#define PIC_SC4_LADDER 1438 +#define PIC_SC8_RTRUBA2 2978 +#define SC_32 2066 +#define SND_INTR_016 5161 +#define SND_INTR_005 5150 +#define SND_FIN_022 5094 +#define SND_FIN_011 5083 +#define QU_FN2_CYCLE 5067 +#define ST_FHND3_SHOT 5061 +#define ST_FNHND6_AFTER 5059 +#define ST_BHD_GOR 4940 +#define ANI_BIGHEAD 4938 +#define PIC_CSR_ARCADE2_D 4903 +#define SND_26_016 4878 +#define PIC_INV_APPLE_H 4599 +#define QU_SC29_BRDOUT2 4744 +#define MV_GLV_LOOKBOTTLE 4688 +#define MSG_SC11_MANCRY 4691 +#define ST_SCK26_NORM 4555 +#define QU_SC37_SND4 4544 +#define SND_37_005 4540 +#define SND_36_006 4530 +#define QU_SC36_SND3 4527 +#define SND_34_019 4479 +#define SND_34_008 4468 +#define QU_SC34_SND1 4461 +#define SND_33_009 4446 +#define SND_29_024 4358 +#define SND_28_014 4323 +#define MSG_SC34_FROMCACTUS 4313 +#define ST_VNT34_NORM 4309 +#define ST_TTA_GOD 4289 +#define MV_MAN25_TOTRUBA_R 4216 +#define SND_38_026 4193 +#define SND_38_015 4182 +#define QU_SC38_SND5 4170 +#define SND_38_004 4164 +#define SND_27_037 4138 +#define SND_27_026 4127 +#define SND_27_015 4116 +#define QU_SC27_SND5 4106 +#define SND_27_004 4100 +#define SND_25_017 4070 +#define SND_25_006 4059 +#define SND_23_008 4026 +#define QU_SC23_SND1 4019 +#define SND_19_012 3925 +#define SND_18_002 3897 +#define SND_14_017 3814 +#define QU_SC15_SND4 3806 +#define SND_15_005 3802 +#define SND_13_029 3774 +#define SND_13_018 3763 +#define SND_12_019 3739 +#define SND_12_008 3728 +#define QU_SC12_SND1 3721 +#define SND_6_031 3570 +#define SND_6_020 3559 +#define SND_5_021 3162 +#define SND_1_014 3527 +#define QU_GRFM_AFTER 3481 +#define MV_WMN28_GREET 3440 +#define SND_CMN_028 3410 +#define MV_MAN_SITDOWN 3378 +#define MV_VNT26_TURNR 1928 +#define SND_3_001 3100 +#define MV_GRL_FALL 3115 +#define QU_KZW14_JUMP 3271 +#define QU_KZW14_SHOW 3270 +#define QU_SC14_WINARCADE 3247 +#define MV_MAN14_KICKLAST 3218 +#define SND_4_022 3137 +#define SND_4_011 3126 +#define SND_2_013 3095 +#define SND_2_002 3084 +#define SND_CMN_006 3076 +#define SND_1_003 3067 +#define QU_STR_SHOW_L 3056 +#define MV_NTL_MOVE 3028 +#define MSG_SC10_LADDERTOBACK 3002 +#define QU_MOM4_OPENEYE 2959 +#define ST_MOM_LIFT2 2950 +#define MV_MOM_OPENEYE 2947 +#define ST_PMS_PLUS 2941 +#define MSG_SC6_STARTDROPS 2897 +#define MV_MAN_GOLADDER2 2844 +#define QU_SC30_EXITLIFT 2824 +#define ST_LBN_7H 2803 +#define MV_LBN_6H 2800 +#define LIFTBTN_2 2782 +#define ST_PTI25_NORM 2675 +#define ANI_POTTIE_25 2673 +#define QU_SC35_EATHOZE 2540 +#define MSG_SC22_HIDESTOOL 2503 +#define MSG_SPINHANDLE 2398 +#define MV_MAN34_STANDBOX 2386 +#define MSG_SC30_UPDATEPATH 2358 +#define QU_LEG_MOVE1 2349 +#define ST_LEG_DOWN3 2337 +#define MV_LEG_POTS_HIDE 2336 +#define MV_MAN32_STANDUP 2313 +#define MV_DLD_TAKE 2249 +#define PIC_SC28_DTRUBA 2074 +#define MV_BTA_NORM 2027 +#define MV_MID_0_1 2025 +#define QU_SC26_CLOSE4 1942 +#define rMV_MAN25_STOPROW 1890 +#define ST_MAN25_ONBOARD 1879 +#define MV_LUK26_0_1 1868 +#define MSG_SC25_ENTERMAN 1861 +#define LadderUp 1850 +#define ST_WTR24_FLOWLOWER 1843 +#define QU_WTR24_FLOW 1840 +#define ANI_WATER24 1834 +#define ST_HDL22_LIES 1762 +#define MV_MAN22_TAKETABUR 1749 +#define PIC_SC21_LTRUBA 1553 +#define MV_KSL_SWINGMAN 1502 +#define MV_KSL_INGIRL 1493 +#define ST_GRL18_WALKTO 1489 +#define ST_KSL_GIRL 1465 +#define ST_KSL_NORM 1461 +#define ST_BOY_EMPTY 1330 +#define ANI_GIRL 1328 +#define QU_SC19_ENTER_DOWN 1303 +#define MV_INV_FIRECAN_default 1313 +#define ANI_INV_FIRECAN 1312 +#define QU_SC18_ENTER_LEFT 1304 +#define QU_GRD2_LOOKRIGHT 1290 +#define MV_MAN15_TAKEBOOT 1272 +#define QU_SWR_SIT 1149 +#define ST_KCH_0 1096 +#define QU_SLN_POT_PLAY 1045 +#define MV_OTM_0_2 437 +#define ST_INV_POT_default 988 +#define MSG_SC9_SETSCROLL 964 +#define ANI_BALL9 933 +#define ANI_GLOTATEL 924 +#define QU_SC9_ENTER_DOWN 908 +#define MV_INV_OLDBOOT_default 397 +#define ST_INV_OLDCOIN_default 391 +#define MV_INV_BOX_default 633 +#define MV_SLN_BOOT_MORG 831 +#define MV_VMT_DEF 765 +#define MV_BTT_DRINK 749 +#define PIC_SCD_5 731 +#define MV_CST_TURNUP 718 +#define ANI_BEARDED 691 +#define MV_HND_TAKE1 605 +#define ST_KZW_JUMPOUT 587 +#define QU_SC4_MANLOOKDOWN 548 +#define QU_EGTR_SORROWTOFAT 531 +#define QU_SC1_EGBRKACH 512 +#define PIC_dsf 410 +#define ST_EGTR_FAT 344 +#define ANI_EGGEATER 334 +#define MV_DYAS_OPENBOX 307 +#define MV_MANDYAS_GIVESAPPL 360 +#define MV_OTM_VNT_TRIESOFF 435 +#define MV_MANEGBR_EGG2COIN 441 +#define ST_KZW_EMPTY 498 +#define QU_PNK_CLICK 550 +#define MV_KZW_TOEDGE 572 +#define QU_OTM_BOX_TURNL 645 +#define QU_OTM_VNT_BOLTHEAD 647 +#define ST_MAN_BALL 675 +#define rMV_MAN_FROMHORTRUBA 703 +#define QU_BTT_MORG 762 +#define ST_VMT_MAX 767 +#define MV_CST_0_2 800 +#define ST_INV_OLDHAMMER_default 401 +#define ANI_GUM 978 +#define MSG_SC6_SPINHANDLE 1013 +#define rMV_MAN_STARTR 330 +#define ANI_INV_GUM 1154 +#define QU_SC5_MANFLY 1168 +#define ST_HDLL_UP 1211 +#define ANI_GRANDMA 1227 +#define MV_GMA_BACKOFF 1233 +#define PIC_SC16_LTRUBA 1292 +#define ANI_MUG 1296 +#define PIC_SCD_17 1305 +#define PIC_SC17_RTRUBA 1323 +#define ANI_INV_MUG 1370 +#define PIC_SC17_TUMBA 1426 +#define MV_MAN17_PUTBOTTLE 1428 +#define MSG_SC17_SHOWBOTTLE 1432 +#define PIC_SC18_LADDER2 1472 +#define MV_KSL_2_3 1506 +#define QU_DYS_CLOSEBOX 1003 +#define QU_CDI_HIDE 1537 +#define QU_CDI_HIDEEMPTY 1545 +#define PIC_INV_EGGBOOT 1579 +#define MV_GFA_CHESH 1603 +#define QU_GFA_SWING 1614 +#define QU_GFA_STOP 1616 +#define MV_GRFU_TURN_DU 1649 +#define MV_GRFU_TURN_UD 1654 +#define MV_DYAS_0_1 1692 +#define MV_MAN22_TAKESOCK 1697 +#define ST_CND_6 1715 +#define MV_CND_6_7 1716 +#define MV_CLN_0_1 1770 +#define MV_MAN_TOTRUBAVER2_R 1848 +#define MV_MAN25_TRY 1877 +#define ST_LUK23_WHANDLE 1975 +#define MV_GRFM_NECK 1985 +#define MV_MAN27_SWABTOBROOM 1991 +#define PIC_SCD_28 2098 +#define MV_STR1_LEAVE 2114 +#define ST_ASS_NORM 2122 +#define ST_DMN38_NORM2 2205 +#define QU_MLS_TURNR 2221 +#define MV_GLV_PROPOSE_NOHMR 2279 +#define QU_FFT_TUBE_START 2303 +#define QU_LEG_HIDE1 2371 +#define PIC_SC35_MONETOPR 2408 +#define MV_PDV_BLINKLARGE 2422 +#define MV_PDV_PUZO 2423 +#define ST_GMA20_STAND 2436 +#define QU_GMA20_STD_LOOK 2451 +#define ST_CTS_GROWDOWN 2468 +#define PIC_INV_STOPPER 2531 +#define PIC_SC35_DTRUBA_R 2559 +#define QU_SC34_ENTER_UP 2569 +#define MV_GRD37_PULL 2589 +#define ST_MUG33_EMPTY 2625 +#define MV_JTI33_FLOW 2628 +#define ANI_TESTO_GREEN 2662 +#define MV_MAN9_TAKEPOT 2697 +#define MV_MUG17_FILL 2745 +#define QU_SC34_TOTRUBAVER 2853 +#define MSG_SC4_STARTCLOCK 2856 +#define MV_EGTR_MD1_BOLTLEGS 2864 +#define ANI_DROP_3 2873 +#define ST_MOM_STANDCLOSED 2890 +#define ST_PL3_NORM 2926 +#define MV_MAN13_THROWAPPLE 1444 +#define MV_VSN_FROMRIGHT 2996 +#define MV_MAN11_HITBY 3016 +#define QU_SC10_TAKEGUM 3026 +#define MV_HDLR_RISE_GUM 3045 +#define SND_5_010 3151 +#define SND_CMN_017 3164 +#define MV_STR_DENY 3208 +#define MV_DRP26_DROP 3346 +#define QU_MAN_DEF_SHOES2_R 3401 +#define ANI_DROP_24 3505 +#define SND_11_009 3693 +#define QU_SC13_SND2 3747 +#define SND_13_007 3752 +#define QU_SC14_SND3 3785 +#define SND_14_006 3788 +#define SND_16_004 3819 +#define QU_SC16_SND5 3825 +#define SND_16_015 3835 +#define SND_16_026 3846 +#define SND_16_037 3857 +#define SND_17_003 3862 +#define SND_17_014 3878 +#define SND_17_025 3889 +#define SND_22_009 3992 +#define SND_CMN_039 4032 +#define QU_SC24_SND2 4037 +#define SND_24_007 4042 +#define SND_26_005 4081 +#define QU_SC26_SND4 4085 +#define SND_28_003 4145 +#define MV_SHD01_SHD 4203 +#define MV_BOT1_NORM 4232 +#define MSG_SC28_TURNON_2 4276 +#define MSG_SC28_TURNON4 4280 +#define QU_CTS34_FALLEFT 4316 +#define SND_29_002 4331 +#define SND_29_013 4347 +#define QU_SC35_SND2 4500 +#define SND_35_007 4505 +#define SND_35_018 4516 +#define SND_3_012 3111 +#define PIC_MSV_EMPTY_D 4639 +#define PIC_MSV_4_L 4663 +#define PIC_MSV_DOTS_D 4670 +#define QU_BRD28_TALK 4682 +#define MSG_SC14_SCROLLLEFT 4768 +#define ANI_BOOT_15 4779 +#define ANI_SHD_CMN 4859 +#define ST_SHD_CMN1 4862 +#define SC_3 303 +#define ANI_KUBIK 4963 +#define QU_KBK33_GO 4978 +#define SND_4_033 4990 +#define SC_INTRO2 3907 +#define PIC_FN1_RTRUBA 5003 +#define MSG_INTR_SWITCHTO1 5145 +#define SC_10 653 +#define SC_21 1546 +#define SND_25_028 5173 +#define SND_3_023 5195 +#define MSG_SC19_UPDATENUMRIDES 5203 +#define PIC_MAP_A07 5269 +#define PIC_MAP_P09 5285 +#define PIC_MAP_S06 5228 +#define PIC_MAP_S17 5239 +#define PIC_MAP_S28 5250 +#define PIC_MAP_H34 5388 +#define PIC_MAP_H23 5377 +#define PIC_MAP_H12 5368 +#define PIC_MAP_H01 5357 +#define QU_SC28_LIFT6_END 3563 +#define SND_26_017 5337 +#define SND_3_024 5333 +#define MV_MOM_TOLIFT 2893 +#define MV_MOM_JUMPBK 662 +#define MSG_LIFT_EXITLIFT 5187 +#define SC_4 304 +#define SC_33 2067 +#define SND_INTR_017 5162 +#define SND_INTR_006 5151 +#define MSG_INTR_ENDINTRO 5139 +#define QU_INTR_FINISH 5138 +#define MSG_INTR_SWITCHTO2 5134 +#define MV_IN1CLK_CYCLE 5130 +#define MV_IN1MAN_SLEEP 5111 +#define SND_FIN_012 5084 +#define ST_FNHND4_BEFORE 5050 +#define MV_FNHND3_SHOWHMR 5040 +#define PIC_MNU_SLIDER_L 4912 +#define PIC_INV_SUGAR_C 4853 +#define PIC_INV_POTTIE_C 4849 +#define PIC_INV_MUG_C 4845 +#define PIC_INV_GUM_C 4840 +#define PIC_INV_BOTTLEFULL_C 4827 +#define PIC_INV_LOPAT_H 4808 +#define PIC_INV_BOX_H 4791 +#define MSG_CMN_WINARCADE 4778 +#define SND_15_006 3808 +#define SND_29_025 4689 +#define MV_RNG_CLOSE 2605 +#define MV_INV_CARPET_default 4597 +#define MV_DRV_PUSHBUTTON_NOVENT 4577 +#define SND_37_006 4546 +#define QU_SC37_SND5 4545 +#define SND_36_007 4531 +#define QU_SC36_SND4 4528 +#define SND_34_009 4469 +#define QU_SC34_SND2 4462 +#define SND_28_015 4324 +#define MV_LEG_DENY_POT1 4284 +#define MV_MAN28_STARTWASH 4248 +#define SND_38_027 4194 +#define SND_38_016 4183 +#define SND_38_005 4165 +#define SND_27_038 4139 +#define SND_27_027 4128 +#define SND_27_016 4117 +#define SND_27_005 4101 +#define SND_25_018 4071 +#define SND_25_007 4060 +#define QU_SC25_SND4 4057 +#define SND_23_009 4027 +#define QU_SC23_SND2 4020 +#define SND_19_013 3926 +#define SND_19_002 3910 +#define SND_18_003 3898 +#define SND_14_018 3815 +#define QU_SC15_SND5 3807 +#define SND_13_019 3764 +#define SND_12_009 3729 +#define QU_SC12_SND2 3722 +#define SND_7_020 3600 +#define SND_6_032 3571 +#define SND_6_010 3547 +#define SND_1_015 3528 +#define SND_3_013 3519 +#define QU_DRP25_TOWATER 3504 +#define ANI_DROP_25 3499 +#define MV_MID_0_2 3491 +#define SND_CMN_029 3469 +#define MV_WMN_AFTER 3454 +#define ST_WMN28_NORM 3441 +#define PIC_SC27_FLOOR2 3353 +#define ST_BTH_EMPTY 3351 +#define MV_MAN22_HANDLEDOWN2 3328 +#define SND_4_001 3116 +#define SND_1_004 3068 +#define QU_TEST1 3303 +#define ANI_BOOT_16 3285 +#define MV_GRL_DRYG 3279 +#define ST_KZW14_SIDE 3266 +#define PIC_SC14_GRID 3260 +#define MV_BAL14_NORM2 3213 +#define SND_4_023 3141 +#define SND_4_012 3127 +#define SND_3_002 3101 +#define SND_2_014 3096 +#define SND_2_003 3085 +#define SND_CMN_007 3077 +#define MV_MOM_STARTBK 3010 +#define MV_CLK8_GO 2990 +#define QU_MOM4_LOOKBAG 2958 +#define MV_MOM4_OPENEYE 2957 +#define MV_MOM_LIFTUP 2951 +#define MV_MAN4_FALLBOTTLE 2848 +#define MV_MAN_STARTLADDER2 2842 +#define QU_SC30_ENTERLIFT 2823 +#define QU_SC15_EXITLIFT 2812 +#define ST_LBN_6H 2801 +#define MV_LBN_5H 2798 +#define LIFTBTN_3 2783 +#define QU_SC14_BREAKGRIT 2728 +#define QU_SC32_FLOWO 2666 +#define QU_SC21_ENTER_DOWN 2646 +#define ST_HDL_PLUGGED 2397 +#define MV_FLG_STARTR 2263 +#define QU_LEG_MOVE2 2350 +#define QU_LEG_SHOW 2346 +#define MSG_SC32_TRYSIT 2294 +#define ST_DMN38_NORM3 2251 +#define ST_MAN29_SITR 2141 +#define ST_SHR_NORM 2132 +#define MSG_SC29_DISABLEPORTER 2097 +#define MSG_SC27_STARTBET 2047 +#define QU_SC26_CLOSE5 1944 +#define QU_SC27_ENTER_LEFT 1915 +#define QU_SC25_ROWTOTRUBA 1897 +#define rMV_MAN25_ROW 1891 +#define MV_MAN25_TRYBROOM 1887 +#define ST_INV_BOARD_default 1874 +#define MV_INV_BOARD_default 1873 +#define ANI_WATER25 1856 +#define PIC_SC25_RTRUBA 1853 +#define MSG_SC21_HANDLEDOWN 1807 +#define ANI_HANDLE22 1759 +#define ST_BOX2_LEFT 1694 +#define ST_GRFU_DOWN 1650 +#define QU_GRFB_TRYSTAND 1641 +#define MV_MAN18_FROMRTRUBA 1519 +#define ST_KSL_JUMPGIRL 1494 +#define ST_KSL_JUMPBOY 1492 +#define MV_GRL18_JUMPFROM 1485 +#define ST_BOY_FLYTO 1483 +#define QU_SMG_TAKESUGAR 1434 +#define PIC_INV_SUGAR 1413 +#define QU_SC16_GIRLLAUGH 1375 +#define MV_GRL_GOIN 1335 +#define MSG_SC11_SHOWSWING 1124 +#define ST_KCH_STATIC 1122 +#define QU_SC11_ENTER_LEFT 1093 +#define QU_SC10_ENTER_RIGHT 990 +#define QU_NDV_BLOW 969 +#define ST_GLT_SIT 926 +#define PIC_SC9_WALL1 923 +#define MSG_SC5_HANDLEDOWN 916 +#define ANI_INV_DOMINO 872 +#define ST_INV_BOOT_default 883 +#define ST_INV_GLASSES_default 889 +#define ANI_INV_GLASSES 887 +#define MV_SLN_POT_MOVE 842 +#define ST_SLN_POT_TURNED 838 +#define MSG_SC7_OPENLUKE 823 +#define MV_SC7_BOX_default 792 +#define MSG_SC6_SHOWNEXTBALL 790 +#define PIC_SCD_6 732 +#define PIC_SC1_RTRUBA 698 +#define MV_MAN_PUTCOIN 688 +#define MV_HND_TAKE2 606 +#define QU_EGTR_FATOBL 532 +#define ST_MAN_LADDERDOWN 521 +#define MV_MAN_TURN_DU 484 +#define MV_MAN_TURN_UD 483 +#define MV_MAN_GOLADDER 451 +#define MV_MANEGBR_EGG2BOOT 440 +#define ANI_OTMOROZ 419 +#define ST_EGTR_SLIMSORROW 340 +#define MV_MANDYAS_GIVESHMR 359 +#define MV_OTM_GLS_MORGRIGHT 425 +#define MV_OTM_BOX_DECLINES 432 +#define MV_MAN_LOOKPLANKRV 522 +#define ST_HND_TAKEN 608 +#define QU_OTM_GLS_TURNR 639 +#define ST_MOM_SITS 659 +#define MV_MAN_SHOOTBALL 676 +#define QU_CST_TURNUP 723 +#define MV_MAN8_FIRSTJUMP 778 +#define QU_SC8_ENTER_RIGHT 780 +#define ST_CST_HANDLELESS 794 +#define QU_CST_CLOSELUKE 820 +#define ST_INV_OLDDOMINO_default 369 +#define MV_BALL9_EXPLODE 939 +#define MV_NDV_DENIES 952 +#define MV_GRD_PULL 999 +#define QU_SC2_ENTER_DOWN 1025 +#define MV_SC4_BOOT_default 1036 +#define MV_MAN_TURN_SRD 1082 +#define MV_MAN_TURN_SRU 1083 +#define rMV_MAN_TURN_SRL 1090 +#define MSG_STANDLADDER 1092 +#define MV_MAN_STARTD 478 +#define MV_MAN_STARTU 333 +#define ST_MAN11_SWING 1127 +#define MV_MAN5_FALLBUMP 1163 +#define MV_STR_PLUU 1178 +#define ST_STR_EMPTY 1180 +#define QU_STR_CHEW 1190 +#define MV_MAN_FALLPOPA 1193 +#define MV_GRD2_MORG 1282 +#define PIC_SCD_18 1306 +#define ST_HDLL_FIRECAN 1310 +#define QU_SC14_ENDARCADE 1391 +#define MV_INV_BOTTLE_default 1419 +#define MV_INV_BOTTLEFULL_default 1422 +#define ANI_HAND17 1446 +#define MV_MANEGTR_GIVESCOIN 1581 +#define ANI_GIRAFFEE 1672 +#define ST_CND_7 1717 +#define ANI_CLEANERS 1767 +#define ANI_INV_BROOM 1774 +#define MV_INV_STOOL_default 1781 +#define MV_MAN25_BOARDTOLADDER 1893 +#define QU_SC25_SHOWBOARD_R 1901 +#define QU_SC25_SHOWBOARD_LCLOSE 1908 +#define QU_SC25_BOARDTOLADDER 1911 +#define QU_SC26_AUTOCLOSE1 1949 +#define MSG_SC26_TESTVENT 1952 +#define PIC_SCD_29 2099 +#define rMV_ASS_TAIL 2128 +#define ST_GLV_SLEEP2 2166 +#define MV_DLD_ICK 2172 +#define MV_DLD_GLOT 2177 +#define MV_MLS_BLINK 2182 +#define MV_MAN38_TAKEMUG 2185 +#define ST_MUG38_NORM 2193 +#define MV_FFT_TUBE_DENY 2233 +#define PIC_SC32_KADKA 2273 +#define QU_FFT_PIPE_STOP 2298 +#define QU_FFT_TUBE_OPENEYE 2305 +#define MV_INV_TUBE_default 2315 +#define QU_LEG_HIDE2 2372 +#define QU_CTS_GROW 2416 +#define MV_GMA20_STL_LOOK 2434 +#define QU_GMA20_STD_LOOKTRUBA 2452 +#define MV_CTS_STOPDOWN 2471 +#define ST_STL34_NORM 2488 +#define ST_INV_SCISSORS_default 2534 +#define QU_PDV_SML_TRY 2554 +#define MV_GRD37_BLINK1 2592 +#define MV_MAN33_TAKEMUG 2622 +#define MV_SCR36_NORM 2648 +#define MV_TSTO_FLOW 2657 +#define MV_MAN6_THROWBALL 2692 +#define MV_MAN32_BUMP 2713 +#define MSG_LIFT_CLICKBUTTON 2780 +#define QU_SC34_ENTER_LIFTDOWN 2822 +#define QU_EGTR_MD1_OBL 2878 +#define MV_MAN3_GIVEEGG_1 2907 +#define PIC_SC6_PIPEY 2954 +#define ST_BALL9_EMPTY2 2974 +#define SND_5_011 3152 +#define SND_5_022 3163 +#define SND_CMN_018 3165 +#define QU_SC38_SHOWDOMINO2 3181 +#define MV_BTT_LOOK 3193 +#define MSG_SC14_ENDARCADE 3250 +#define PIC_SC18_LADDER3 3299 +#define MSG_SC13_OPENFAST 1266 +#define MV_MAN26_TRY 3344 +#define QU_DRP26_DROP 3352 +#define ST_VNT26_RIGHT 1930 +#define rMV_MAN_SITDOWN 3391 +#define QU_SC25_MANLOOKDOWN 3417 +#define QU_SC9_SND1 3645 +#define QU_SC11_SND1 3685 +#define QU_SC13_SND3 3748 +#define SND_13_008 3753 +#define QU_SC14_SND4 3786 +#define SND_14_007 3789 +#define SND_16_005 3820 +#define SND_16_016 3836 +#define SND_16_027 3847 +#define SND_16_038 3858 +#define SND_17_004 3863 +#define SND_17_015 3879 +#define SND_17_026 3890 +#define QU_SC22_SND1 3984 +#define QU_SC24_SND3 4038 +#define SND_24_008 4043 +#define QU_SC26_SND5 4086 +#define SND_26_006 4087 +#define SND_28_004 4146 +#define ANI_BOOT_1 4231 +#define QU_SC28_FALLGRIT 4265 +#define MSG_SC28_TURNON_3 4274 +#define SND_29_003 4332 +#define QU_SC33_SND1 4438 +#define QU_SC35_SND3 4501 +#define SND_35_008 4506 +#define SND_35_019 4517 +#define MV_RHT_DENY 2561 +#define PIC_MNU_SAVE_D 4629 +#define PIC_MSV_5_L 4664 +#define ST_BRD28_RIGHT 4681 +#define SND_29_014 4348 +#define MSG_SC29_LAUGH 4760 +#define MSG_SC14_RESTORESCROLL 4769 +#define ST_RNG_CLOSED2 4865 +#define MV_LFT_FROMU 4881 +#define MV_LFT_FROMD 4882 +#define QU_GLV28_GOR 4957 +#define QU_KBK32_GO 4977 +#define SC_11 654 +#define SC_22 1547 +#define SND_25_029 5174 +#define PIC_MNU_MUSICSLIDER_D 4914 +#define rMV_MAN_LOOKUP_EYES 5207 +#define PIC_SC1_PRIMUS 837 +#define PIC_MAP_A08 5270 +#define PIC_INV_MAP_H 5325 +#define PIC_IN1_GAMETITLE 5169 +#define PIC_MAP_S07 5229 +#define PIC_MAP_S1819 5240 +#define PIC_MAP_S29 5251 +#define PIC_MAP_H35 5389 +#define PIC_MAP_H24 5378 +#define PIC_MAP_H13 5369 +#define PIC_MAP_H02 5358 +#define SND_26_018 5340 +#define SND_16_039 5336 +#define PIC_SC20_DTRUBA 3741 +#define SC_5 305 +#define SC_34 2068 +#define SND_INTR_007 5152 +#define SND_FIN_013 5085 +#define MV_FNHND5_SHOW 5053 +#define PIC_SC35_UTRUBA_R 4987 +#define MSG_SC30_TESTFLIES 4962 +#define QU_BRD16_GOL 4952 +#define QU_BRD17_TURNL 4950 +#define rMV_BRDCMN_TURN_RL 4947 +#define PIC_CSR_ARCADE1 4901 +#define PIC_INV_MUGFULL_H 4811 +#define PIC_INV_HANDLE_H 4806 +#define PIC_INV_DOMINO_H 4795 +#define PIC_INV_CARPET_H 4793 +#define MV_DRP25_TOFLOOR 3500 +#define MV_TBL_WALKL 4700 +#define SND_29_026 4690 +#define MV_MAN35_TAKECARPET 4595 +#define MV_BTN27_NORM 4580 +#define SND_37_007 4547 +#define SND_36_008 4532 +#define QU_SC36_SND5 4529 +#define QU_SC34_SND3 4463 +#define SND_28_016 4325 +#define MSG_SC34_ONCACTUS 2482 +#define MV_CTS_DEFAULT 4299 +#define QU_SC28_TIOTIA 4294 +#define MV_LEG_DENY_POT2 4285 +#define SND_38_028 4195 +#define SND_38_017 4184 +#define QU_SC38_DOMINOKICK 4181 +#define SND_38_006 4171 +#define SND_27_039 4140 +#define SND_27_028 4129 +#define SND_27_017 4118 +#define SND_27_006 4107 +#define SND_25_019 4072 +#define SND_25_008 4061 +#define QU_SC25_SND5 4058 +#define QU_SC23_SND3 4021 +#define QU_SC21_SND1 3955 +#define SND_19_014 3927 +#define SND_19_003 3911 +#define SND_18_004 3899 +#define SND_15_007 3809 +#define SND_13_009 3754 +#define QU_SC12_SND3 3723 +#define QU_SC10_SND1 3667 +#define QU_SC8_SND1 3635 +#define SND_7_021 3601 +#define SND_7_010 3590 +#define SND_6_033 3572 +#define SND_6_022 3561 +#define SND_6_011 3548 +#define SND_5_023 3532 +#define SND_3_014 3521 +#define ST_WMN28_READY 3442 +#define MV_MAN21_TAKEBROOM 3438 +#define MV_CLN_DENY_BROOM 3437 +#define MV_BRD_FALLTHREAD 3421 +#define MV_BTH_1_0 3366 +#define ST_VNT26_RIGHT2 3348 +#define ST_CDI_EYE 3310 +#define SND_5_001 3142 +#define QU_TEST2 3304 +#define MV_GRL_LAUGH_POPA 3278 +#define QU_STR_THROWGLASSES 3201 +#define SND_4_013 3128 +#define SND_3_003 3102 +#define SND_2_015 3097 +#define SND_2_004 3086 +#define SND_CMN_008 3078 +#define SND_1_005 3069 +#define MSG_SC13_TESTCLOSE 3065 +#define ST_NTL_NORM 3029 +#define ANI_STEP_8 2971 +#define MV_CST_DENY 2967 +#define ST_MOM4_SIT 2956 +#define MV_MOM4_LOOKBAG 686 +#define MV_PMS_CHANGE 2939 +#define ST_FCN17_NORM 2862 +#define QU_SC30_ENTER_LIFTDOWN 2826 +#define ST_LBN_5H 2799 +#define MV_LBN_4H 2796 +#define LIFTBTN_4 2784 +#define QU_SC34_ENTER_DEBUG 2380 +#define QU_LEG_MOVE3 2351 +#define MV_MAN30_PUT1 2340 +#define MV_MAN30_PUT1_EMPTY 2339 +#define ST_DMN38_NORM4 2253 +#define QU_GLV_TAKEDOMINO 2170 +#define ANI_SHELL_GREEN 2116 +#define MV_MAN29_JUMP 2090 +#define QU_DRV_LOOKLEFT 2032 +#define MV_DRV_FROMRIGHT 2014 +#define MV_DRV_FROMLEFT_V 2011 +#define MV_DRV_DRIVE 2004 +#define MV_DRV_TOCYCLE 1995 +#define ST_LUK26_OPEN 1973 +#define MV_LUK26_1_2 1972 +#define QU_SC25_BACKTOLADDER 1955 +#define ST_BRD25_RIGHT2 1902 +#define PIC_SC21_MONETOPR 1808 +#define MV_BOX2_FLIP 1693 +#define rMV_MANEGBR_EGG2COIN 467 +#define ST_KSL_MAN 1503 +#define MSG_SC18_SHOWGIRLJUMPTO 1499 +#define ST_BOY18_FLYFROM 1479 +#define MV_KSL_CALMDOWN 1476 +#define ST_KSL_REACT 1474 +#define ANI_KRESLO 1459 +#define MV_MAN_HMRKICK_COINLESS 1445 +#define MV_SMG_HANDSUP 1402 +#define ST_WHR13_SPIN 1385 +#define PIC_SCD_19 1319 +#define MV_GRD2_MORG1 1283 +#define QU_SC13_SHOWGUM 1216 +#define MV_MAN13_GIVEGUM 1192 +#define MV_MAN_STARTLADDERD 457 +#define QU_SC3_ENTER_LIFTDOWN 1059 +#define MV_SLN_POT_PLAY 1046 +#define ST_SC2_BOX_default 1022 +#define MV_MAN10_TAKEGUM 967 +#define MV_GLT_FLYAWAY 931 +#define MV_GLT_CLOSE 929 +#define MV_INV_APPLE_default 879 +#define MV_INV_HANDLE_default 894 +#define ANI_INV_OLDAPPLE 392 +#define MV_SLN_POT_MORG2 840 +#define QU_MOM_MORG 826 +#define MV_MAN8_BADLUCK 783 +#define PIC_SCD_7 733 +#define QU_MOM_JUMPBK 671 +#define MV_MANHDL_HANDLEDOWN 630 +#define QU_SC4_MANTOLADDER 617 +#define MSG_TAKEKOZAW 611 +#define MV_MAN_LOOKLADDER 520 +#define QU_SC1_EGBRHEADUP 511 +#define MV_PNK_WEIGHTRIGHT 502 +#define rMV_EGBR_RAISEHEAD 463 +#define ST_MAN_STANDLADDER 453 +#define MV_MANEGTR_GIVESEGGF 416 +#define PIC_SC3_LTRUBA 413 +#define ST_EGTR_FATSORROW 355 +#define ANI_DADAYASHIK 306 +#define MV_MANEGTR_TAKESCOIN 394 +#define PIC_SC4_RTRUBA 507 +#define QU_KZW_GOEDGE1 571 +#define QU_SC4_HANDPUSH 596 +#define MSG_SC6_BEARDEDTAKEBALL 683 +#define QU_CST_SPINHANDLE 722 +#define QU_SCD_ENTER 735 +#define MV_MAN8_JUMP 775 +#define MV_MAN_HANDSUP 776 +#define ANI_HOOLIGAN 808 +#define QU_HGN_OPENLUKE 824 +#define MV_INV_OLDEGG_default 365 +#define ST_PBAR_START 898 +#define QU_SC9_BALLEXPLODE 938 +#define MV_NDV_MORG 947 +#define PIC_SC07_PANEL 1002 +#define MV_MAN_TAKEHANDLE 1040 +#define ST_POT_NORM 1047 +#define MV_MAN_STOPR 328 +#define MV_KCH_MOVE2 1099 +#define QU_SC11_RESTARTMAN 1134 +#define MV_MAN11_GUM2VANTUZ 1145 +#define ST_INV_GUM_default 1156 +#define ST_INV_VANTUZ_default 1159 +#define MV_STR_SHOW 1179 +#define MSG_SC14_SHOWBALLGMAHIT 1259 +#define PIC_SC15_DTRUBA 1263 +#define PIC_SC15_UTRUBA 1264 +#define MV_MAN13_HANDLEUP 1377 +#define ST_BDG_OPEN2 1381 +#define PIC_SC1_KUCHKA 1321 +#define ANI_INV_EGGAPL 1564 +#define ST_INV_EGGBOOT_default 1572 +#define ANI_INV_EGGGLS 1573 +#define MSG_SC3_TAKEEGG 1583 +#define MV_CND_7_8 1718 +#define ST_CND_8 1719 +#define PIC_SC23_BOXCLOSED 1728 +#define PIC_SC23_BTN1 1729 +#define MV_MAN21_INSERTHANDLE 1744 +#define ST_INV_STOOL_default 1782 +#define QU_SC25_ENTERUP_FLOOR 1904 +#define ANI_INV_LOPAT 1920 +#define QU_SC26_AUTOCLOSE2 1950 +#define ANI_HANDLE23 1978 +#define MV_GRFM_PODMYSHA 1984 +#define ANI_ASS 2120 +#define MSG_SC29_SHOOTRED 2137 +#define MV_SHR_HITMAN 2149 +#define ANI_MALYSH 2165 +#define ANI_HAMMER38 2194 +#define ST_HMR38_NORM 2196 +#define MV_DMN38_NORM 2201 +#define MSG_SC38_HMRKICK 2224 +#define ST_FFT_PIPEFLOW 2241 +#define QU_FFT_PIPE_FLOWOPEN 2307 +#define PIC_SC30_RTRUBA 2355 +#define ANI_GRANDMA_20 2427 +#define MV_GMA20_FLR_BLINK 2428 +#define MV_GMA20_STL_BLINK 2431 +#define QU_SC20_ENTER_RIGHT 2453 +#define MV_CTS31_GROWMAN 2457 +#define MV_PDV_CUT_BLINK 2527 +#define MV_INV_STOPPER_default 2536 +#define QU_PDV_SML_BLINK 2553 +#define QU_PDV_LRG_BLINK 2555 +#define QU_SC36_ENTER_LEFT 2564 +#define QU_GRD37_BLINK 2595 +#define QU_GRD37_LOOKL 2597 +#define QU_RHT_BLINK 2599 +#define MV_DMN01_default 2616 +#define ANI_VENT_33 2637 +#define MV_MAN33_HANDLEDOWN 2642 +#define MSG_SC33_POUR 2645 +#define ST_TSTB_NORM 2661 +#define ST_GRT6_NORM 679 +#define ST_BTS11_ONE 2706 +#define MV_TBE33_NORM 2716 +#define ST_JET17_EMPTY 2748 +#define QU_SC34_EXITLIFT 2820 +#define QU_EGTR_MD2_OBL 2880 +#define QU_MOM_TOLIFT 2902 +#define QU_MOM_PUTBALL 2903 +#define MV_MAN3_GIVEEGG_2 2908 +#define MV_INV_EGGBLACK_default 2919 +#define QU_VSN_TURNL 2997 +#define MV_MAN6_TRYHANDLE 3009 +#define MV_GUM_NORM 976 +#define ANI_PACHKA2 3008 +#define SND_4_002 3117 +#define SND_5_012 3153 +#define SND_CMN_019 3166 +#define MSG_SC3_HIDEDOMINO 3177 +#define MV_HDL_BREAK 3341 +#define ANI_DROP_26 3345 +#define QU_MAN_DEF_STARTSHOES1_R 3389 +#define MV_SWR_DENY 3428 +#define MV_MAN_CLEANNOSE 3374 +#define SND_4_024 3466 +#define MV_GRFM_0_1 3471 +#define QU_GRFU_CLOSEEYES 3479 +#define SND_8_020 3630 +#define QU_SC9_SND2 3646 +#define QU_SC11_SND2 3686 +#define QU_SC13_SND4 3749 +#define QU_SC14_SND5 3787 +#define SND_14_008 3790 +#define SND_16_006 3826 +#define SND_16_017 3837 +#define SND_16_028 3848 +#define SND_17_005 3864 +#define SND_17_016 3880 +#define SND_17_027 3891 +#define QU_SC22_SND2 3985 +#define QU_SC24_SND4 4039 +#define SND_24_009 4044 +#define SND_26_007 4088 +#define SND_28_005 4147 +#define MV_CLN_BLINK1 4208 +#define ANI_BOOT_17 4220 +#define SND_1_016 4234 +#define MSG_SC28_CLICKLIFT 4258 +#define MSG_SC28_TURNON_4 4281 +#define QU_MAN32_LOOKBACK 4304 +#define SND_29_004 4333 +#define SND_29_015 4349 +#define QU_SC32_SND1 4397 +#define QU_SC33_SND2 4439 +#define QU_SC35_SND4 4502 +#define SND_35_009 4507 +#define MV_GRT38_NORM 4574 +#define QU_SC38_SHOWGRIT 4576 +#define PIC_MNU_AUTHORS_D 4623 +#define PIC_MSV_6_L 4665 +#define MSG_SC28_MAKEFACES 4684 +#define ST_EYE_EMPTY 4714 +#define ST_KBK_GOR 4965 +#define MSG_SC37_EXITLEFT 5006 +#define SND_FIN_002 5008 +#define ST_FN4MAN_BEFORE 5099 +#define SC_12 655 +#define SC_23 1548 +#define PIC_IN1_NAKL 5132 +#define SND_INTR_018 5177 +#define MSG_SC5_BGRSOUNDON 5314 +#define QU_SC19_ENTER_RIGHT 5319 +#define PIC_MAP_A09 5271 +#define PIC_MAP_I01 5295 +#define MSG_SC33_UPDATEKUBIK 5346 +#define PIC_MAP_S08 5231 +#define PIC_MAP_H36 5390 +#define PIC_MAP_H25 5379 +#define PIC_MAP_H14 5370 +#define PIC_MAP_H03 5359 +#define MSG_SC28_LIFT6INSIDE 5354 +#define SND_26_019 5341 +#define QU_EGTR_FATASK 5334 +#define PIC_CSR_ITN_RED 5329 +#define PIC_SC33_ZONES 5298 +#define SND_INTR_019 5220 +#define QU_HND17_BACK 5216 +#define PIC_IN1_PIPETITLE 5167 +#define SC_6 649 +#define SC_35 2069 +#define SND_INTR_008 5153 +#define SND_FIN_014 5086 +#define MV_FNFNG_MOVE 5063 +#define ANI_FN3_FINGERS 5062 +#define MV_FNHND3_SHOOT 5060 +#define SND_37_008 5013 +#define PIC_SC17_LADDER2 2749 +#define QU_SC35_TRYFLY 4984 +#define MSG_SC33_TRYKUBIK 4980 +#define QU_BRD16_FLYR 4953 +#define QU_EGG6_GOR 4935 +#define ANI_FLY 4916 +#define PIC_CSR_ARCADE2 4902 +#define SC_COMMON 321 +#define PIC_INV_PIPE_C 4847 +#define PIC_INV_LEVERHANDLE_H 4807 +#define PIC_INV_BROOM_H 4792 +#define PIC_INV_BOTTLE_H 4789 +#define MSG_MNU_EXITMENU 4633 +#define ST_SCR36_LEFT 4609 +#define ST_INV_CARPET_default 4598 +#define MV_PDV_SML_DENY 4585 +#define MV_MAN26_KNOCKMUG 4559 +#define MV_MAN26_TAKESOCK 4558 +#define SND_36_009 4533 +#define QU_SC34_SND4 4464 +#define QU_SC31_SND1 4384 +#define SND_28_017 4326 +#define QU_SC34_FROMCACTUS 4312 +#define ST_VNT34_UP2 4310 +#define MV_MAN34_TURNVENT_L 4307 +#define QU_SC17_FILLBOOT 4237 +#define SND_38_029 4196 +#define SND_38_018 4185 +#define SND_38_007 4172 +#define SND_27_029 4130 +#define SND_27_018 4119 +#define SND_27_007 4108 +#define SND_25_009 4062 +#define QU_SC23_SND4 4022 +#define QU_SC21_SND2 3956 +#define SND_19_015 3928 +#define SND_19_004 3912 +#define SND_18_005 3900 +#define SND_15_008 3810 +#define QU_SC12_SND4 3724 +#define QU_SC10_SND2 3668 +#define QU_SC8_SND2 3636 +#define QU_SC7_SND1 3606 +#define SND_7_022 3602 +#define SND_7_011 3591 +#define SND_6_034 3573 +#define SND_6_012 3549 +#define SND_6_001 3538 +#define SND_5_024 3536 +#define SND_4_025 3529 +#define SND_3_015 3522 +#define rMV_MAN25_ROWHAND 3492 +#define QU_SC25_BEARDED 3425 +#define ST_MUG17_DROP 3413 +#define ST_MAN_RIGHT 325 +#define MV_VNT26_TURNU 1931 +#define MV_CLN_DENY 2290 +#define ST_KZW14_EMPTY 3263 +#define SND_4_014 3129 +#define SND_3_004 3103 +#define SND_2_016 3098 +#define SND_2_005 3087 +#define SND_CMN_009 3079 +#define SND_1_006 3070 +#define MSG_SC4_MANTOBOTTLE 2852 +#define ST_LBN_4H 2797 +#define MV_LBN_3H 2794 +#define LIFTBTN_5 2785 +#define QU_SC17_FILLMUG 2750 +#define QU_SC9_BREAKGRIT 2723 +#define PIC_SC32_KADKABACK 2669 +#define QU_SC15_ENTER_LEFT 2651 +#define MSG_SC34_LEAVEBOARD 2576 +#define MV_MAN34_BOARD_FROM 2549 +#define MV_MAN35_TAKESTOPPER 2512 +#define QU_LEG_MOVE4 2352 +#define MV_MAN30_PUT2 2342 +#define MV_MAN30_PUT2_EMPTY 2341 +#define MV_FLG_STOPR 2265 +#define QU_SC38_ENTER_UP 2227 +#define ST_MAN29_RUNR 2140 +#define PIC_SC28_RTRUBA 2073 +#define QU_DRV_FROMLEFT 2036 +#define PIC_SC27_LTRUBA 1914 +#define MV_BRM_FALL 1764 +#define ANI_BROOM 1763 +#define ST_MSH_SIT 1756 +#define ANI_TABURETTE 1745 +#define ST_INV_SOCK_default 1700 +#define QU_SC6_SHOWHANDLE 1689 +#define QU_GRFU_CHMOKUP 1670 +#define QU_GRFU_BLINKLEFT 1666 +#define rMV_MANEGBR_EGG2BOOT 466 +#define MV_CDI_0_1 1544 +#define ST_CDI_NOSUGAR 1542 +#define ST_CDI_EMPTY 1531 +#define MSG_SC18_MANREADY 1507 +#define MV_KSL_INMAN 1504 +#define MV_KSL_JUMPGIRL 1475 +#define MV_KSL_SWINGBOY 1462 +#define MV_SMG_HANDSDOWN 1405 +#define MV_SMG_THROW 1398 +#define ANI_JETTIE 1392 +#define ST_GRL_STAND 1337 +#define ANI_WHIRLIGIG_18 829 +#define PIC_INV_FIRECAN 1315 +#define PIC_SC14_DFLOOR 1241 +#define MSG_SC13_EATGUM 1219 +#define MV_MAN5_FALL 1165 +#define MV_KCH_START 1121 +#define MSG_SC1_UTRUBACLICK 1100 +#define ST_LFT_OPEN_NEW 1071 +#define PIC_INV_POT 985 +#define MSG_SC9_FLOWN 943 +#define GRID_TEST 937 +#define MV_GLT_OPEN 927 +#define ST_INV_APPLE_default 880 +#define MV_INV_OLDHANDLE_default 796 +#define ANI_INV_HANDLE 893 +#define PIC_SCD_8 756 +#define ST_BTT_SLEEPS 748 +#define ST_BTT_CHESHET 746 +#define PIC_SC7_RTRUBA 710 +#define ST_BRD_EMPTY 693 +#define PIC_SC6_LTRUBA 667 +#define MV_MANOTM_GLASSES2BOX 629 +#define MSG_GOTOLADDER 618 +#define ST_CLK_BUTTON 593 +#define ANI_CLOCK 588 +#define ST_MAN_DOWN 479 +#define MV_EGTR_FATEAT 350 +#define MV_EGTR_SLIM2SORROW 339 +#define MV_DYAS_TOUS 311 +#define MV_EGTR_FROMSLAPPING 349 +#define MSG_RAISEPLANK 547 +#define ST_KZW_BOTTLERIGHT 574 +#define QU_KZW_GOEDGE2 576 +#define MV_KZW_JUMPUS 582 +#define MV_HND_TAKEBOTTLE 607 +#define QU_OTM_BOX_SDVIG 646 +#define QU_MOM_SITDOWN 685 +#define MV_HGN_OPENLUKE 809 +#define PIC_INV_OLDHAMMER 405 +#define MV_INV_EGG_default 870 +#define QU_PLV_BREATHE 959 +#define QU_GRD_MORG1 1005 +#define ST_HDL_UP 624 +#define ST_SC4_COIN_default 1030 +#define MV_HDL6_FALL 1041 +#define ST_LFT_OPEN 1050 +#define QU_SC3_ENTER_LIFTUP 1062 +#define QU_SWR_JUMPDOWN 1123 +#define MSG_SC11_MANTOSWING 1128 +#define ST_KCH_EMPTY 1132 +#define MV_MAN5_VNT2BOX 1162 +#define ST_STR_LEFT 1175 +#define MV_STR_TURNR 1176 +#define ST_GMS_BOOT 1270 +#define QU_SC16_ENTER_DOWN 1295 +#define QU_KAR_SPIN 1307 +#define ST_MUG_EMPTY 1298 +#define ST_MUG_FULL 1360 +#define ST_INV_BOTTLE_default 1420 +#define QU_SC17_SHOWBOTTLE 1429 +#define MSG_SC4_CLICKLADDER 1439 +#define MSG_SC18_SHOWGIRLJUMP 1496 +#define MV_HND17_1_0 1558 +#define MV_INV_EGGGLS_default 1574 +#define MV_GFA_GREET 1593 +#define MV_GFA_GREETSOCK 1594 +#define QU_GFA_CHESHETSOCK 1609 +#define PIC_SC22_FLOOR 1621 +#define PIC_SC23_DTRUBA 1626 +#define MV_GRFU_CHMOKCYCLE 1658 +#define MV_GRFU_CHMOKLEFT 1660 +#define MV_GRFU_LOOKDOWN 1688 +#define QU_DYAS_OPENBOX_LIES 1691 +#define ST_CND_9 1721 +#define PIC_SC23_BTN2 1730 +#define MV_MAN21_HANDLEDOWN 1805 +#define rMV_MAN_TOTRUBAVER2 1833 +#define QU_SC26_AUTOCLOSE3 1951 +#define MV_CHI_MOTION 1962 +#define QU_CHI_MOVE 1963 +#define QU_CHI_HIDE 1965 +#define MV_LUK23_1_2i 1976 +#define ST_GRFM_NORM 1983 +#define MSG_SC27_CLICKBET 2048 +#define MV_BTA_HILITE 2051 +#define MV_ASS_SIT 2125 +#define rMV_ASS_SIT 2127 +#define MV_SHG_HITMAN 2147 +#define MV_GLV_DRINK 2162 +#define MV_DLD_DENY 2176 +#define MV_MAN38_PUTDOMIN 2187 +#define QU_SC38_SHOWBOTTLE 2199 +#define QU_GLV_TOSMALL 2208 +#define QU_MLS_HAND 2223 +#define MV_FFT_TUBE_FLOW 2234 +#define MV_FFT_PIPE_DENY 2245 +#define ST_DMN38_NORM5 2283 +#define MSG_SC32_STOPFLAG 2311 +#define QU_SC30_ENTER_RIGHT 2357 +#define QU_GMA20_STL_BLINK 2445 +#define QU_GMA20_FLR_BLINK 2448 +#define QU_GMA20_FLR_LOOK 2449 +#define ST_CTS_GROWUP 2467 +#define ANI_VENT_34 2473 +#define QU_SC34_SHOWBOX 2501 +#define ANI_BOARD_34 2506 +#define ANI_INV_SCISSORS 2532 +#define QU_PDV_LRG_TRY 2556 +#define MSG_SC34_TESTVENT 2557 +#define QU_SC36_ENTER_RIGHT 2563 +#define QU_GRD3_BLINK1 2585 +#define ANI_INV_MUGFULL 2633 +#define MV_TST31_FLOW 2653 +#define MV_STR_PLUUAPLE 2682 +#define rMV_MAN_TAKECOIN 2695 +#define ST_MUG17_FULL 2740 +#define QU_SC14_ENTERLIFT 1225 +#define MV_MAN_TOTRUBAHOR2 2839 +#define MSG_SC4_KOZAWFALL 2858 +#define MV_EGTR_MD1_OBL 2865 +#define MV_MAN3_GIVEEGG_3 2909 +#define MV_MAN3_TAKEEGG_2 2912 +#define PIC_INV_EGGBLACK 2921 +#define MV_DRP3_DROP2 2922 +#define MV_EGTR_FATDENY 2934 +#define ANI_GRIT1 2961 +#define QU_SC8_STANDUP 2975 +#define SND_4_003 3118 +#define SND_5_002 3143 +#define SND_5_013 3154 +#define PIC_SC15_LADDER 3253 +#define MV_CLN_BLINK2 3325 +#define QU_MAN_DEF_STARTSHOES2_R 3397 +#define MV_MAN17_GIVEHMR 3431 +#define MV_GFA_DENY 3435 +#define SND_8_010 3620 +#define SND_8_021 3631 +#define QU_SC9_SND3 3647 +#define QU_SC11_SND3 3687 +#define QU_SC13_SND5 3750 +#define SND_14_009 3791 +#define SND_16_007 3827 +#define SND_16_018 3838 +#define SND_16_029 3849 +#define SND_17_006 3870 +#define SND_17_017 3881 +#define SND_17_028 3892 +#define QU_SC20_SND1 3934 +#define QU_SC22_SND3 3986 +#define QU_SC24_SND5 4040 +#define SND_26_008 4089 +#define SND_28_006 4153 +#define QU_CLN_BLINK1 4209 +#define PIC_SC28_FRAME1 4262 +#define SND_29_005 4334 +#define SND_29_016 4350 +#define QU_SC32_SND2 4398 +#define QU_SC33_SND3 4440 +#define QU_SC35_SND5 4503 +#define SND_1_017 4548 +#define QU_SC34_SHOWBOX_FLOOR 4566 +#define QU_MID_CLEANVENT 4583 +#define PIC_MLD_OK_D 4646 +#define PIC_MSV_7_L 4666 +#define SND_29_027 4757 +#define MV_SHD_CMN 4860 +#define MSG_SC35_STOPFLOW 4864 +#define PIC_CSR_ITN_INV 4894 +#define QU_BRD28_GOL 4960 +#define MSG_SC28_TRYVTORPERS 4961 +#define MV_KBK_FROMTRUBA 4970 +#define SND_32_040 4998 +#define SND_FIN_003 5009 +#define MV_FNHND1_SCRUB 5029 +#define MV_FN4MAN_ENTER 5098 +#define SC_13 1137 +#define SC_24 1549 +#define PIC_MSV_DOT_L 5189 +#define PIC_SC23_UTRUBA 1627 +#define PIC_SC24_LADDERD 1826 +#define MV_HND17_0_1 5215 +#define MV_MAN23_TRYHANDLE 5308 +#define PIC_MAP_I02 5296 +#define PIC_MAP_S09 5230 +#define PIC_MAP_I03 5395 +#define PIC_MAP_H37 5391 +#define PIC_MAP_H26 5380 +#define PIC_MAP_H15 5371 +#define PIC_MAP_H04 5360 +#define QU_SC22_ENTER_DOWNTOUP 5327 +#define MV_MAP_NORM 5322 +#define PIC_MEX_CANCEL 5302 +#define MSG_SC22_CRANEOUT_GMA 5218 +#define MSG_SC34_RETRYVENT 5210 +#define SND_CMN_070 5199 +#define SC_7 650 +#define SC_36 2070 +#define SND_INTR_009 5154 +#define MV_IN1CLK_HIDE 5131 +#define SND_FIN_015 5087 +#define MV_FNHND3_SHOW 5037 +#define MSG_FIN_STARTFINAL 5025 +#define MV_MANFIN_TAKECOIN 5020 +#define QU_TTA9_GOL 4937 +#define PIC_CSR_ARCADE6_D 4908 +#define PIC_CSR_ARCADE3 4904 +#define MSG_BRD_TURN 4877 +#define PIC_INV_COIN_C 4831 +#define PIC_INV_BOTTLE 1424 +#define PIC_INV_BOARD 1245 +#define ANI_INV_CARPET 4596 +#define QU_SC34_SND5 4465 +#define QU_SC31_SND2 4385 +#define SND_28_018 4327 +#define ST_BOX34_MAIN2 4306 +#define ST_TTA_DOWN 4288 +#define QU_SC25_MANTOTRUBA_R 4218 +#define ST_BAL14_TOGMA 3199 +#define SND_38_019 4186 +#define SND_38_008 4173 +#define SND_27_019 4120 +#define SND_27_008 4109 +#define QU_SC21_SND3 3957 +#define SND_19_005 3913 +#define SND_18_006 3906 +#define SND_15_009 3811 +#define QU_SC12_SND5 3725 +#define QU_SC10_SND3 3669 +#define QU_SC8_SND3 3637 +#define QU_SC7_SND2 3607 +#define SND_7_023 3603 +#define SND_7_012 3592 +#define SND_7_001 3581 +#define SND_6_035 3574 +#define QU_SC6_FALLHANDLE 2995 +#define SND_6_013 3550 +#define SND_6_002 3539 +#define SND_5_025 3537 +#define SND_3_016 3523 +#define MV_MAN_STANDUP 1166 +#define QU_MAN_DEF_STOPSHOES1 3381 +#define QU_MAN_DEF_SITDOWN 3377 +#define MV_BTH_2_1 3364 +#define QU_SC27_SHOWVENT 2060 +#define MV_HDLL_RAISE 3329 +#define MV_KZW14_HIDE 3269 +#define rMV_STR_DENY 3209 +#define MV_MAN38_PUTBOTTLE_FULL 3170 +#define SND_4_015 3130 +#define SND_3_005 3104 +#define SND_2_017 3099 +#define SND_2_006 3088 +#define SND_1_007 3071 +#define QU_SC8_FALLSTEP 2977 +#define ST_MOM_EMPTY 2952 +#define MSG_SC4_COINOUT 2895 +#define rMV_MAN_TAKEBOOT 2883 +#define QU_SC6_ENTERLIFT 1054 +#define ST_LBN_3H 2795 +#define MV_LBN_2H 2792 +#define LIFTBTN_6 2786 +#define MSG_LIFT_TESTDOOR 1064 +#define QU_SC3_ENTERLIFT 2779 +#define ST_LBN_9N 2777 +#define ST_GRT14_GRIT 2727 +#define MV_GRT14_FALL 2725 +#define QU_SC6_FALLGRIT 2696 +#define MSG_SC34_ONBOARD 2550 +#define QU_SC34_FROMSTOOL 2491 +#define MV_MAN20_TAKESTOOL 2462 +#define ANI_INV_POTTIE 2390 +#define PIC_SC34_UTRUBA1 2377 +#define ST_MAN32_SIT 2277 +#define ST_FLG_RIGHT 2264 +#define ST_FLG_NORM 2259 +#define rMV_MAN29_PUSHASS 2146 +#define MSG_SC29_SHOOTGREEN 2119 +#define MV_SHG_NORM 2117 +#define MSG_SC27_STARTWIPE 2057 +#define QU_MID_SWAB 2041 +#define QU_DRV_GIVEVENT 2040 +#define QU_DRV_FROMRIGHT2 2039 +#define MV_MID_SWITCHBACK 2018 +#define ANI_MAID 2015 +#define MSG_SC26_SHOWVENT 1946 +#define ST_MAN25_ROW 1881 +#define PIC_SC26_UTRUBA 1863 +#define QU_MSH_MOVE 1812 +#define QU_MSH_CRANEOUT 1811 +#define ST_HDL22_EMPTY 1761 +#define MSG_SC23_SPINWHEEL1 1740 +#define QU_GRFB_TAIL 1642 +#define ST_GRFB_HANG 1638 +#define PIC_SC23_FLOOR 1631 +#define MV_CDI_DRYG 1534 +#define QU_GRD_LOOKRIGHT 998 +#define ST_GRL18_WALKFROM 1487 +#define ANI_BRIDGE 1378 +#define MSG_SC16_MUGCLICK 1366 +#define MV_BOY_GOOUT 1334 +#define ST_INV_FIRECAN_default 1314 +#define ST_HDLR_DOWN 1199 +#define ST_SWR_SWING 1115 +#define ANI_KACHELI 1094 +#define PIC_SCD_9 907 +#define PIC_INV_EGG 859 +#define PIC_INV_HAMMER 864 +#define ST_INV_OLDEGG_default 366 +#define PIC_INV_GLASSES 865 +#define ANI_INV_OLDHAMMER 399 +#define ST_INV_OLDBOOT_default 398 +#define ST_INV_OLDAPPLE_default 395 +#define MV_SLN_POT_MOVEBACK 844 +#define QU_HGN_PLUU 815 +#define SC_DBGMENU 726 +#define ANI_HAND 601 +#define MV_MAN_LOOKPLANK 554 +#define MSG_LOWERPLANK 540 +#define MV_MAN_TURN_RD 489 +#define MV_MAN_TURN_RU 485 +#define rMV_MAN_GOR 329 +#define MV_INV_OLDHAMMER_default 400 +#define MV_EGTR_FATOBL 372 +#define MV_EGTR_GIVESMONEY 353 +#define MV_OTM_2_4 438 +#define TrubaLeft 474 +#define MV_KZW_JUMP 558 +#define MV_KZW_TURN 562 +#define MV_KZW_GOR 564 +#define rMV_KZW_GOR 566 +#define PIC_SC4_BOTTLE 568 +#define MV_KZW_JUMPEDGE 581 +#define MV_HDL_MOVEDOWN 623 +#define QU_SC1_ENTER_UP 704 +#define QU_CST_SPINHEADUP 725 +#define QU_BTT_EAT 759 +#define MV_MAN8_DRYGUP 768 +#define PIC_SC12_RTRUBA 855 +#define MV_INV_HAMMER_default 885 +#define PIC_SC2_DTRUBA 841 +#define PIC_SC9_LTRUBA 900 +#define MV_VSN_CYCLE 905 +#define ANI_NADUVATEL 944 +#define MV_GRD_MORG 997 +#define MSG_SC8_ARCADENOW 1044 +#define PIC_SC11_LTRUBA 1119 +#define MSG_SC5_MAKEOTMFEEDBACK 1169 +#define QU_STR_TURNL 1184 +#define MSG_SC16_HIDEMAN 1357 +#define ST_JTI_EMPTY2 1395 +#define QU_GFA_START 1612 +#define ST_GRFU_UP 1648 +#define MV_GRFU_CHMOKUP 1659 +#define MV_GRFG_SHOW 1673 +#define ST_GRFG_EMPTY 1674 +#define ST_GRFG_BALD 1675 +#define MV_CND_8_9 1720 +#define PIC_SC23_BTN3 1731 +#define QU_CLN_ZHMUR 1790 +#define MV_MAN22_FROMSTOOL 1794 +#define MV_MAN21_HANDLEUP 1806 +#define MV_MAN25_TRUBATOBOARD 1892 +#define QU_SC25_MANTOTRUBA 1905 +#define rMV_MAN25_ONBOARD 1966 +#define MSG_SC26_HIDECHI 1967 +#define ST_LUK23_WHANDLE2 1977 +#define QU_GRFM_ASS 1986 +#define MV_MAN27_FLOW 1990 +#define MV_VNT27_LIES 2059 +#define QU_SC25_BACKTOTRUBA 2061 +#define QU_ASS_TAIL 2133 +#define ANI_GLAVAR 2154 +#define MV_MLS_POINT 2183 +#define QU_GLV_LOOKMAN 2212 +#define ANI_FIREFIGHTER 2229 +#define MV_FFT_PIPE_STOPFLOW 2246 +#define MSG_SC32_STARTFLAGLEFT 2310 +#define ST_RHT_CLOSED 2364 +#define ST_POTTIE_default 2392 +#define ANI_HDL32 2394 +#define PIC_SC35_LTRUBA 2406 +#define MV_HZE_FLOW 2425 +#define ST_GMA20_STOOL 2432 +#define ST_STL20_NORM 2465 +#define ST_BRD34_LEFT 2508 +#define ST_BRD34_RIGHT 2509 +#define ST_LUK34_OPEN 2544 +#define MV_PDV_SML_TRY 2552 +#define PIC_SC36_RTRUBA 2560 +#define MV_GRD3_BLINK 2580 +#define MV_GRD3_LOOKL 2583 +#define MV_GRD37_BLINK 2591 +#define MV_GRD37_LOOKL 2593 +#define ANI_GRANDMA_22 2609 +#define MV_VNT33_TURNR 2641 +#define QU_SC35_SHOWHOZECUT 2679 +#define QU_SC9_TEST1 2701 +#define ANI_TUBE_33 2715 +#define MSG_SC29_SHOWLASTRED 2731 +#define PIC_SC3_BORDER 2729 +#define MV_EGTR_MD2_OBL 2870 +#define MV_MAN3_TAKEEGG_3 2911 +#define MV_MAN3_GIVEEGG_4 2913 +#define MV_MAN_TOTRUBAHOR3 2982 +#define MV_MAN_FALLPOPA2 2983 +#define PIC_SC9_URTRUBA 2984 +#define QU_SC9_MANFALL 2986 +#define MV_BTN6_HILITE 2992 +#define MV_NDV_DENY_NOGUM 3022 +#define PIC_CMN_LOAD 3035 +#define SND_4_004 3119 +#define SND_5_003 3144 +#define SND_5_014 3155 +#define ANI_DROP_7 3185 +#define MV_DRP7_DROP 3186 +#define ANI_GRIT2 3189 +#define ST_GRIT2_STUCCO 3191 +#define MSG_SC15_LADDERTOBACK 3259 +#define ST_BTL_EMPTY 3306 +#define MV_DMS_0_1 3318 +#define QU_CLN_BLINK2 3326 +#define MV_MAN11_GIVEGUM_2 3430 +#define MV_MAN22_TRYBOOT 3433 +#define QU_MAN_DEF_SNEEZE 3464 +#define MV_GRFU_KISSOPEN 3477 +#define QU_SC6_SND1 3576 +#define SND_8_011 3621 +#define SND_8_022 3632 +#define QU_SC9_SND4 3648 +#define SND_9_010 3654 +#define QU_SC11_SND4 3688 +#define SND_16_008 3828 +#define SND_16_019 3839 +#define SND_17_007 3871 +#define SND_17_018 3882 +#define SND_17_029 3893 +#define QU_SC20_SND2 3935 +#define QU_SC22_SND4 3987 +#define SND_26_009 4090 +#define SND_28_007 4154 +#define ST_SHD01_0 4204 +#define QU_SC17_SHOWBOOT 4225 +#define ST_BRM_STAND 4226 +#define ST_LFT28_OPEN 4241 +#define QU_SC28_LIFT1_SHOWAFTER 4260 +#define MSG_SC28_TURNON_6 4272 +#define SND_29_006 4340 +#define SND_29_017 4351 +#define QU_SC30_SND1 4364 +#define MV_MAN30_ITCHBROOM 4374 +#define SND_30_010 4375 +#define QU_SC32_SND3 4399 +#define SND_32_030 4426 +#define QU_SC33_SND4 4441 +#define MV_MAN33_PUTMUGFULL 4453 +#define MV_GLV_PUTDOMINO 2158 +#define MV_MAN36_PUTCARPET 4604 +#define PIC_MNU_DEBUG_D 4631 +#define PIC_MSV_8_L 4667 +#define MV_WTR24_FLOWLOWER 1844 +#define PIC_SC11_WND1 4704 +#define ANI_EYE_30 4712 +#define SND_29_028 4758 +#define MSG_SC22_CHECKGMABOOT 4782 +#define PIC_TEST1 4783 +#define QU_LUK26_HIT 4890 +#define MV_KBK_TOTRUBA 4971 +#define SND_19_016 4995 +#define SND_FIN_004 5010 +#define QU_FN4_DOFINAL 5108 +#define ST_IN1MAN_FROM 5123 +#define SC_14 1138 +#define SC_25 1550 +#define SC_TITLES 5166 +#define PIC_SC24_LADDERUP 1827 +#define PIC_SC23_LADDER 1628 +#define PIC_SC1_OSK 1018 +#define PIC_MAP_H38 5392 +#define PIC_MAP_H27 5381 +#define PIC_MAP_H16 5372 +#define PIC_MAP_H05 5361 +#define QU_SC22_ENTER_UPTODOWN 5326 +#define MV_MOM_SITDOWN 657 +#define SC_8 651 +#define SC_37 2071 +#define QU_INTR_GETUPMAN 5136 +#define SND_FIN_016 5088 +#define MV_FNHND4_SCRUB 5049 +#define rMV_EGI_GOR 4932 +#define MV_EGI_GOR 4930 +#define PIC_CSR_ARCADE7_D 4910 +#define PIC_CSR_ARCADE4 4905 +#define PIC_INV_EGGBLACK_C 4834 +#define PIC_INV_BOOT_C 4825 +#define SND_31_010 4752 +#define SND_30_011 4376 +#define PIC_MSV_0_D 4643 +#define PIC_MSV_FULL_D 4641 +#define QU_SC31_SND3 4386 +#define SND_28_019 4328 +#define MV_TTA_GOL 4293 +#define ST_STR_GLASSES 3114 +#define MSG_SC9_FROMLADDER 4207 +#define SND_38_009 4174 +#define SND_27_009 4110 +#define QU_SC21_SND4 3958 +#define SND_19_006 3919 +#define QU_SC10_SND4 3670 +#define QU_SC8_SND4 3638 +#define QU_SC7_SND3 3608 +#define SND_7_024 3604 +#define SND_7_013 3593 +#define SND_7_002 3582 +#define SND_6_036 3575 +#define SND_6_025 3564 +#define SND_6_014 3551 +#define SND_6_003 3540 +#define SND_3_017 3533 +#define SND_4_027 3530 +#define SND_2_018 3512 +#define ST_MID_SPADE 3489 +#define MV_MAN_STOPSHOES_1 3376 +#define MV_BTH_GODOWN 3350 +#define QU_CDI_EYE 3314 +#define MV_MAN16_TAKEBOOT 3289 +#define QU_KZW14_HIDE 3274 +#define QU_SC5_SND1 3240 +#define MV_MAN13_THROWGLASSES 3197 +#define SND_4_016 3131 +#define SND_3_006 3105 +#define SND_1_008 3072 +#define QU_STR_HIDE_L 3060 +#define rMV_STR_TURNR 3051 +#define ST_MID11_SWAB 3030 +#define ST_MOM_CYCLEBK 3011 +#define ST_CLK8_NORM 2991 +#define MV_MOM_OPENEMPTY 2946 +#define QU_SC4_MANFROMBOTTLE 2851 +#define QU_SC38_EXITLIFT 2837 +#define ST_LBN_2H 2793 +#define MV_LBN_1H 2790 +#define LIFTBTN_7 2787 +#define ST_LBN_8N 2774 +#define QU_SC11_PUTBOOT1 2709 +#define QU_SC32_FLOWB 2667 +#define QU_SC33_ENTER_LEFT 2620 +#define PIC_SC34_SHADOW 2538 +#define ANI_STOPPER 2515 +#define QU_SC34_ENTER_DOWN 2379 +#define PIC_SC34_UTRUBA2 2378 +#define MSG_SC30_LEAVESCENE 2373 +#define QU_LEG_SHOW1 2347 +#define ST_LEG_UP 2324 +#define MV_MAN38_PUTBOTTLE 2285 +#define MV_ASS_HITGREEN 2138 +#define QU_SC29_MANTO_L 2103 +#define MV_MAN29_RUN 2095 +#define MV_MAN29_FROMPORTER 2094 +#define MV_MAN29_STANDUP 2092 +#define QU_DRV_PUSHBUTTON 2056 +#define ST_MID_SWAB 2017 +#define MV_DRV_FROMLEFT 2012 +#define MV_DRV_GIVEVENT 2006 +#define MV_DRV_TORIGHT 2001 +#define MV_INV_VENT_default 1969 +#define MV_BRD25_RIGHT 1899 +#define QU_WTR24_FLOWLOWER 1953 +#define ST_WTR25_FLOW 1858 +#define ST_LUK23_OPEN 1816 +#define MSG_SC23_SPINWHEEL2 1741 +#define MV_CDI_SHOW 1530 +#define MV_KSL_JUMPMAN 1509 +#define MV_GRL18_JUMPTO 1488 +#define ST_BOY18_WALK 1480 +#define ST_KSL_BOY 1463 +#define MV_SMG_SPINHEAD 1400 +#define rMV_MAN_STANDUP 1291 +#define QU_GRD2_LOOKLEFT 1289 +#define QU_GRD2_BLINK 1287 +#define PIC_SC15_WALL 1286 +#define MV_MAN14_KICKAIR 1256 +#define MSG_SC14_SHOWBALLFLY 1253 +#define MV_MAN14_FALL 1236 +#define MV_SWR_JUMPDOWN 1116 +#define MV_MAN_GOR 327 +#define MSG_SC4_COINPUT 1032 +#define ST_HDL6_default 1011 +#define MV_INV_POT_default 987 +#define ANI_INV_POT 986 +#define MV_BALL9_default 934 +#define MSG_SC5_HANDLEUP 915 +#define SC_LDR 635 +#define MV_INV_DOMINO_default 873 +#define ST_INV_HANDLE_default 895 +#define QU_SLN_POT_MORG 849 +#define MSG_SC7_HIDEBOX 817 +#define MV_BTT_23 747 +#define MV_BTT_12 745 +#define MV_BTT_01 744 +#define PIC_SC5_UTRUBA 701 +#define QU_EGTR_FATOBLRV 534 +#define MV_MAN_TOTRUBAVER 517 +#define ST_MAN_EMPTY 476 +#define MV_OTM_GLS_TURNL 424 +#define ST_EGBR_HEADRAISED 379 +#define ST_DYAS_SITS 308 +#define MV_INV_OLDDOMINO_default 368 +#define PIC_SC2_LADDER 412 +#define MV_MANEGTR_GIVESEGGFAT 417 +#define ST_OTM_VNT_LEFT 434 +#define PIC_TEST2 509 +#define MSG_KOZAWRESTART 546 +#define ST_PNK_WEIGHTLEFT 503 +#define GRID_SC4_LADDER 565 +#define QU_SC4_CLICKBUTTON 610 +#define MSG_UPDATEBOTTLE 613 +#define ANI_HANDLE 622 +#define MV_MOM_PUTBALL 666 +#define QU_BTT_SLEEP 763 +#define MSG_SC8_RESUMEFLIGHT 784 +#define MV_MAN8_TOJUMP 782 +#define ST_LUK_OPEN 806 +#define QU_CST_MORG 818 +#define PIC_INV_OLDDOMINO 371 +#define MV_VSN_TURNRIGHT 955 +#define QU_SC9_ENTER_LEFT 962 +#define MSG_SC9_PLVCLICK 965 +#define MSG_SC6_INSTHANDLE 1012 +#define MV_MAN_LIFTUP 1051 +#define QU_SC6_ENTER_LIFTUP 1069 +#define MV_MAN_STOPD 482 +#define MV_MAN_STOPU 477 +#define rMV_MAN_STOPR 331 +#define PIC_INV_VANTUZ 1161 +#define ANI_STOROZH 1172 +#define ANI_HANDLE_R 1196 +#define ST_GMA_EMPTY 1235 +#define PIC_SC15_RTRUBA 1262 +#define ANI_GRANDMA_ASS 1265 +#define ST_GRD2_STAND 1281 +#define MV_MAN16_DRINK 1354 +#define MSG_HIDEMAN 1356 +#define MV_HND17_TOCYCLE 1450 +#define QU_SC19_ENTER_WHIRLIGIG 1470 +#define MV_INV_EGGDOM_default 1562 +#define ST_GFA_SIT 1590 +#define ST_GRFU_CHMOK 1656 +#define MV_GRFU_TOKISS 1661 +#define MV_GRFG_BLINKBALD 1678 +#define MV_CND_0_1 1703 +#define PIC_SC23_BTN4 1732 +#define ST_CLN_BROOM 1771 +#define QU_SC22_FALLLEVER 1787 +#define PIC_SC24_FLOOR 1825 +#define MV_INV_LOPAT_default 1921 +#define ST_INV_LOPAT_default 1922 +#define MV_MAN25_TAKESPADE 1926 +#define PIC_SC29_LFLOOR 2142 +#define ST_SHG_EMPTY 2148 +#define MV_GLV_DRINK_NOHMR 2163 +#define ST_DLD_SIT2 2173 +#define MV_DLD_BLINK 2175 +#define ST_MLS_RIGHT 2180 +#define QU_SC38_SHOWDOMINO 2203 +#define MV_FFT_PIPE_FLOW 2242 +#define MV_FFT_PIPE_OPENEYE 2243 +#define QU_FFT_PIPE_START 2296 +#define MSG_SC32_STARTFLAGRIGHT 2309 +#define ST_INV_PIPE_default 2319 +#define MV_MAN36_GOIN 2366 +#define ST_GMA20_FLOOR 2429 +#define MV_GMA20_STD_LOOKTRUBA 2438 +#define PIC_SC20_RTRUBA 2439 +#define PIC_SC31_DTRUBA 2441 +#define PIC_SC31_UTRUBA 2442 +#define MV_MAN20_BOOTTOSTOOL 2443 +#define MV_GMA_0_1 2444 +#define QU_SC35_MANRETIRE 2539 +#define MV_GRD3_BLINK1 2581 +#define QU_GRD3_BLINK 2584 +#define QU_GRD3_LOOKL 2586 +#define ANI_RING 2604 +#define QU_SC22_FROMSTOOL_GMA 2612 +#define MV_MUG33_FILL 2624 +#define ST_JTI33_EMPTY 2629 +#define ST_VNT33_RIGHT 2639 +#define ANI_SCISSORS_36 2647 +#define MV_MAN36_TAKESCISSORS 2650 +#define PIC_SC32_VESSELS 2665 +#define MV_HZE_UNCUT 2677 +#define QU_SC3_RELEASEEGG 2680 +#define MSG_SC3_RELEASEEGG 2681 +#define MV_GRT6_BREAK 678 +#define MV_MAN17_PUTMUG 2741 +#define QU_SC17_SHOWMUG 2742 +#define QU_SC35_ENTER_LIFTDOWN 2818 +#define MV_EGTR_MD2_BOLTLEGS 2868 +#define MSG_SC6_JUMPBK 2900 +#define MV_MAN3_TAKEEGG_4 2910 +#define ST_STP8_EMPTY 2981 +#define ANI_BUTTON_6 2988 +#define MV_PCH2_NORM 3020 +#define QU_SC8_ENTER_UP 3036 +#define SND_2_007 3089 +#define SND_4_005 3120 +#define SND_5_004 3145 +#define SND_5_015 3156 +#define ST_DRP7_EMPTY 3187 +#define QU_BTT_CLOCK_SPOON 3196 +#define MV_MAN13_PUTHAMMER 3206 +#define MSG_SC18_CLICKBOARD 3297 +#define MV_DMS_THREE 3321 +#define MV_MAN22_TRYTAKESOCK 3330 +#define MSG_SC23_ONSTOOL 3334 +#define QU_SC23_FROMSTOOL 3338 +#define MSG_SC23_FROMSTOOL 3339 +#define ST_DRP26_NORM 3347 +#define QU_MAN_DEF_STOPSHOES1_DEF 3393 +#define QU_MAN_DEF_STOPSHOES2 3396 +#define PIC_SC26_LADDER 3403 +#define ST_MAN_LADDERDOWN_R 3419 +#define QU_WMN_SHOWAFTER 3457 +#define MV_DRP24_TOFLOOR 3508 +#define QU_DRP24_TOWATER 3509 +#define QU_SC6_SND2 3577 +#define SND_8_001 3611 +#define SND_8_012 3622 +#define SND_8_023 3633 +#define QU_SC9_SND5 3649 +#define SND_9_011 3655 +#define QU_SC11_SND5 3689 +#define SND_16_009 3829 +#define SND_17_008 3872 +#define SND_17_019 3883 +#define QU_SC20_SND3 3936 +#define SND_20_010 3943 +#define QU_SC22_SND5 3988 +#define SND_22_030 4013 +#define SND_28_008 4155 +#define ST_SHD01_1 4205 +#define MV_MAN17_PUTBOOT 4223 +#define MV_LFT28_CLOSE 4242 +#define MV_CTS34_FALLRIGHT 4315 +#define ST_VNT34_RIGHT3 4318 +#define SND_29_007 4341 +#define SND_29_018 4352 +#define QU_SC30_SND2 4365 +#define QU_SC32_SND4 4400 +#define SND_32_020 4416 +#define SND_32_031 4427 +#define QU_SC33_SND5 4442 +#define PIC_MNU_CONTINUE_L 4626 +#define PIC_MSV_9_L 4668 +#define MV_LFT_TRY 4671 +#define ANI_BEARDED_28 4679 +#define PIC_SC11_WND2 4705 +#define MV_EYE30_SHOW 4713 +#define QU_EYE30_BLINK 4721 +#define MSG_SC15_STOPCHANTING 4753 +#define SND_29_029 4759 +#define SND_11_030 4885 +#define MV_GMA20_STD_DENY 4887 +#define SND_CMN_060 4921 +#define MV_BRDCMN_STOPR 4944 +#define rMV_KBK_TOTRUBA 4974 +#define MV_KBK_TURN_RL 4975 +#define SND_FIN_005 5011 +#define ST_FNFNG_BEFORE 5064 +#define MV_IN1MAN_0_1 5122 +#define SC_15 1139 +#define SC_26 1551 +#define PIC_SC8_LADDERD 1106 +#define MV_MAN22_TRYBOX 5303 +#define SND_5_026 5316 +#define SND_CMN_071 5317 +#define PIC_SC11_HINT 5170 +#define PIC_MAP_H17 5373 +#define PIC_MAP_H28 5382 +#define PIC_MAP_H06 5362 +#define SND_CMN_072 5352 +#define MV_EGTR_FATASK 5332 +#define PIC_CSR_ITN_GREEN 5330 +#define SND_11_031 5171 +#define SC_9 652 +#define SC_38 2072 +#define SND_FIN_017 5089 +#define PIC_CSR_ARCADE5 4906 +#define PIC_INV_POT_C 4848 +#define PIC_INV_SUGAR_H 4818 +#define PIC_INV_POTTIE_H 4814 +#define PIC_INV_MUG_H 4809 +#define PIC_INV_GUM_H 4803 +#define PIC_INV_BOTTLEFULL_H 4790 +#define PIC_TEST3 4784 +#define ST_TBE36_NORM 4751 +#define QU_SC28_LIFT0_START 4676 +#define MV_PDV_CUT_DENY 4586 +#define SND_34_030 4490 +#define QU_SC31_SND4 4387 +#define PIC_SC28_FRAME4 4264 +#define QU_SC28_LIFT1_START 4254 +#define ANI_MAN_28 4247 +#define SND_22_031 4002 +#define SND_21_021 3975 +#define SND_21_010 3964 +#define QU_SC21_SND5 3959 +#define SND_19_007 3920 +#define SND_18_008 3908 +#define SND_10_010 3676 +#define QU_SC10_SND5 3671 +#define QU_SC8_SND5 3639 +#define QU_SC7_SND4 3609 +#define SND_7_025 3605 +#define SND_7_014 3594 +#define SND_7_003 3583 +#define SND_6_026 3565 +#define SND_6_015 3552 +#define SND_6_004 3541 +#define SND_3_018 3534 +#define SND_4_028 3531 +#define SND_2_019 3513 +#define QU_SC25_TRYROWHAND_R 3494 +#define QU_MID_SPADE 3490 +#define MV_MAN27_SWAB2SPADE 3487 +#define ANI_BEARDED_CMN 3420 +#define MV_BTH_3_2 3362 +#define ST_VNT26_UP2 1948 +#define ST_GMS_BOOTLESS2 3316 +#define ST_BOY_TEMP 3283 +#define ANI_KOZAWKA_14 3261 +#define QU_SC5_SND2 3241 +#define QU_SC4_SND1 3235 +#define SND_4_017 3132 +#define SND_3_007 3106 +#define SND_2_008 3090 +#define SND_1_009 3073 +#define MSG_SC13_OPENBRIDGE 3064 +#define QU_STR_LTOR 3054 +#define rMV_STR_SHOW 3049 +#define MSG_SC11_HITMAN 3019 +#define MV_MOM_STOPBK 3013 +#define MSG_SC10_LADDERTOFORE 3004 +#define MV_MAN8_SITDOWN 2968 +#define ANI_MAMASHA_4 660 +#define ST_PMS_MINUS 2942 +#define MV_MAN_TOLADDER2 2841 +#define MV_LBN_0H 2834 +#define QU_SC30_ENTER_LIFTUP 2825 +#define ST_LBN_1H 2791 +#define LIFTBTN_8 2788 +#define ST_LBN_9P 2778 +#define ST_LBN_7N 2771 +#define ANI_LIFTBUTTON 2751 +#define QU_SC11_PUTBOOT2 2710 +#define ST_NBL_EMPTY 1078 +#define MV_NBL_OUT 1077 +#define ST_NBL_NORM 1076 +#define QU_SC34_LEAVEBOARD 2575 +#define ST_SPR_NORM 2517 +#define MSG_SC34_UNCLIMB 2492 +#define QU_CTS_BACK 2415 +#define MV_FLG_CYCLEL 2262 +#define QU_LEG_HIDE 2353 +#define QU_LEG_SHOW2 2348 +#define MV_LEG_POT0_MOVE1 2326 +#define MV_MAN29_STANDUP_NORM 2093 +#define MV_MAN29_TOPORTER_L 2087 +#define PIC_SC29_UTRUBA 2080 +#define QU_DRV_LOOKRIGHT 2033 +#define MV_DRV_FROMRIGHT_V 2013 +#define QU_SC26_OPEN1 1935 +#define PIC_SC25_STEP 1894 +#define rMV_MAN25_STARTROW 1889 +#define PIC_SC25_LADDERDOWN 1855 +#define ST_WTR24_FLOW 1836 +#define ST_JET24_FLOW 1839 +#define MV_MSH_CRANEOUT 1757 +#define ANI_MESHOK 1754 +#define MSG_SC23_SPINWHEEL3 1742 +#define ST_GRFB_SIT 1687 +#define PIC_SC22_LTRUBA 1584 +#define ANI_CORDIE 1529 +#define QU_SC19_MANJUMP1 1516 +#define MV_KSL_INBOY 1491 +#define ST_BOY18_WALKTO 1482 +#define MV_KSL_SWINGGIRL 1464 +#define QU_SMG_STARTFINGERS 1406 +#define MV_SMG_DENIES 1401 +#define MSG_SC16_HIDEWIRE 1349 +#define MV_GRL_LAUGH 1343 +#define MV_BOY_GOIN 1329 +#define MV_BAL14_FALL 1258 +#define ST_INV_BALL_default 1244 +#define MSG_SC13_UNEATGUM 1218 +#define QU_SC13_CLOSEBRIDGE 1214 +#define MV_SWR_1_2 1146 +#define ANI_SWINGER 1113 +#define MV_MAN_STOPLADDER 454 +#define MV_MAN9_SHOOT 922 +#define MV_PLV_BREATHE 920 +#define ST_BLK_OPEN 913 +#define PIC_INV_DOMINO 860 +#define ANI_INV_EGG 869 +#define ANI_INV_OLDDOMINO 367 +#define PIC_INV_OLDGLASSES 408 +#define QU_SLN_BOOT_KICK 846 +#define ANI_SLONIK 827 +#define MSG_SC7_SHOWBOX 816 +#define MV_MAN8_DRYGLADDER 787 +#define PIC_SC8_UTRUBA 753 +#define MV_HND_POINT 602 +#define ST_BTN_UP 600 +#define QU_EGTR_FATBOLTLEGS 533 +#define QU_EGTR_SLIMOBL 527 +#define QU_EGTR_SLIMTRAIN 525 +#define QU_EGTR_SLIMTOSORROW 524 +#define rMV_EGBR_KACHAET 461 +#define MV_MANEGTR_TAKESEGG 415 +#define MV_MANDYAS_GIVESCOIN 361 +#define MV_OTM_VNT_BOLTHEAD 433 +#define MV_MANEGBR_EGG2GLASSES 442 +#define QU_SC1_ENTER 320 +#define ST_KZW_PLANK 499 +#define MV_KZW_WALKPLANK 500 +#define MV_KZW_JUMPROTATE 561 +#define MV_KZW_STANDUP 563 +#define QU_OTM_GLS_MORGLEFT 638 +#define QU_OTM_BOX_MORGL 642 +#define QU_OTM_BOX_TURNR 644 +#define ST_MAN8_HANDSUP 773 +#define ST_MAN8_STAND 774 +#define MV_MAN7_BOX2HANDLE 801 +#define MV_VSN_DRYG 957 +#define PIC_SC10_DTRUBA 974 +#define PIC_SC10_LADDER 995 +#define MSG_SC1_SHOWOSK 1019 +#define MV_MAN_TURN_SDL 1084 +#define MV_MAN_TURN_SUL 1087 +#define QU_SWR_SWING 1118 +#define QU_SC13_ENTER_UP 1183 +#define MSG_SC13_SHOWGUM 1215 +#define ST_MAN14_KICK 1238 +#define QU_GMA_BLINK 1252 +#define MV_GMS_0_1 1271 +#define MSG_SC16_SHOWMAN 1358 +#define MSG_SC16_TESTMUG 1359 +#define MV_WHR19_SPIN 1317 +#define QU_SC14_STARTARCADE 1390 +#define ST_HND17_ATTRACT 1451 +#define QU_HND17_ATTRACT 1455 +#define PIC_SC18_RTRUBA 1520 +#define QU_SC21_ENTER_LEFT 1556 +#define ST_INV_EGGGLS_default 1575 +#define MV_GFA_BREATHESOCK 1591 +#define MV_GFA_SWINGSOCK 1597 +#define MV_GFA_TOSWING 1599 +#define QU_SC22_ENTER_DOWN 1620 +#define ST_GRFU_LEFT 1647 +#define QU_SC23_FROMCALENDAREXIT 1735 +#define MV_MAN21_BROOMTOCOIN 1772 +#define PIC_INV_LEVERHANDLE 1784 +#define MSG_SC22_HANDLEDOWN 1796 +#define QU_SC24_ENTER_UP 1830 +#define QU_SC25_TRYWATER 1906 +#define ANI_GIRAFFE_MIDDLE 1981 +#define MV_MAN27_THROWBET 1989 +#define ANI_VENT27 2058 +#define MV_PTR_MOVE 2083 +#define MSG_SC29_ENABLERIDEBACK 2105 +#define MV_STR1_SHOOT 2109 +#define ST_STR1_STAND 2110 +#define ST_ASS_EMPTY 2124 +#define QU_SC29_ESCAPE 2129 +#define ANI_SHELL_RED 2130 +#define MV_GLV_TOSMALL 2160 +#define MV_GLV_LOOKMAN 2167 +#define MV_BTL38_NORM 2189 +#define ANI_DOMINO38 2200 +#define QU_GLV_DRINK_NOHMR 2211 +#define QU_GLV_LOOKMAN_NOHMR 2213 +#define MSG_SC38_POINT 2226 +#define ST_FFT_PIPE 2240 +#define MV_FFT_LOOKFLAG 2247 +#define ST_CTS_EMPTY 2269 +#define MV_LEG_0_1 2343 +#define ANI_ROTOHRUST 2360 +#define MV_MAN32_STARTSPIN 2401 +#define ST_MAN32_SPIN 2402 +#define QU_CTS_GROWMAN 2417 +#define MV_GMA20_STL_NOSE 2433 +#define MV_CTS_CYCLEUP 2469 +#define MV_PDV_CUT_BREATHE 2526 +#define ST_INV_STOPPER_default 2537 +#define ST_GRD3_STAND 2579 +#define ANI_GUARD_37 2588 +#define PIC_INV_MUGFULL 2632 +#define MV_INV_MUGFULL_default 2634 +#define ST_TSTO_NORM 2658 +#define MSG_SC29_SHOWLASTGREEN 2730 +#define MV_MAN17_DRINK 2743 +#define QU_SC4_MANTOBOTTLE 2850 +#define MV_EGTR_MD2_DENY 2871 +#define ST_MOM_LIFT 2894 +#define QU_MOM_STANDUP 2899 +#define QU_VSN_FROML 2999 +#define MV_SWR_SPOLZING_NOVNT 3005 +#define ST_PCH_NORM 980 +#define SND_4_006 3121 +#define SND_5_005 3146 +#define SND_5_016 3157 +#define MV_MAN5_VNT2GLS 3184 +#define MV_MAN6_LOOK 3210 +#define rMV_MAN22_TAKETABUR 3337 +#define MSG_SC27_HANDLERTOFRONT 3371 +#define MV_MAN_STOPSHOES_2 3388 +#define MV_GFA_DENY_NOSOCK 3436 +#define QU_MAN_DEF_CLEAN_R 3463 +#define ST_GRFM_AFTER 3472 +#define QU_GRFU_OPENEYES 3478 +#define MSG_SC26_SHOWCHI 3495 +#define QU_SC6_SND3 3578 +#define SND_8_002 3612 +#define SND_8_013 3623 +#define SND_8_024 3634 +#define SND_9_001 3640 +#define SND_9_012 3656 +#define SND_11_020 3704 +#define SND_17_009 3873 +#define QU_SC20_SND4 3937 +#define SND_20_011 3944 +#define SND_28_009 4156 +#define ST_BRM_LIES2 4227 +#define ST_BOT1_NORM 4233 +#define ANI_LIFT_28 4238 +#define MSG_SC34_SHOWVENT 2481 +#define SND_29_008 4342 +#define SND_29_019 4353 +#define SND_30_001 4359 +#define QU_SC30_SND3 4366 +#define QU_SC32_SND5 4401 +#define SND_32_010 4406 +#define SND_32_021 4417 +#define SND_32_032 4428 +#define QU_SC33_SHOWMUGFULL 4454 +#define ST_BOX34_FLOOR 4565 +#define SC_MAINMENU 4620 +#define PIC_MNU_EXIT_L 4622 +#define PIC_MLD_CANCEL_D 4648 +#define PIC_MSV_1_D 4651 +#define PIC_SC28_DARK0 4675 +#define QU_EYE30_SHOW 4719 +#define MV_LEG31_HIDE 4724 +#define MV_BRDCMN_GOR 4735 +#define SND_CMN_050 4745 +#define MV_BOT15_NORM 4780 +#define PIC_CSR_ITN 4893 +#define SND_CMN_061 4922 +#define rMV_KBK_TURN_RL 4976 +#define SC_FINAL1 4999 +#define SND_FIN_006 5012 +#define ST_FNHND6_AFTER2 5070 +#define SND_FIN_028 5103 +#define MV_IN1MAN_GODOWN 5124 +#define SC_16 1140 +#define SC_27 1552 +#define PIC_MSV_SPACE_D 5190 +#define PIC_SC23_LADDERU 3411 +#define PIC_SC34_DTRUBA 2376 +#define QU_CTS34_FALLRIGHT 4317 +#define PIC_MAP_S31_1 5253 +#define PIC_MAP_H18 5394 +#define PIC_MAP_H29 5383 +#define PIC_MAP_H07 5363 +#define SND_CMN_073 5353 +#define PIC_MOV_OK 5344 +#define SC_MAP 5222 +#define QU_INTR_DUMMY 5168 +#define ST_IN1HAND_AFTER 5116 +#define ANI_IN1MAN 5110 +#define ANI_FN4MAN 5097 +#define SND_FIN_018 5090 +#define SND_FIN_007 5079 +#define ST_FNHND6_AFTER3 5076 +#define QU_FN3_DOFINAL 5072 +#define ST_FNHND5_BEFORE 5054 +#define ST_FCN_NORM 5017 +#define ST_FCN_EMTY 5016 +#define QU_BRD16_TURNR 4949 +#define MSG_SC9_STARTTIOTIA 4942 +#define ANI_EGGIE 4929 +#define SND_CMN_062 4927 +#define PIC_CSR_ARCADE6 4907 +#define SND_8_025 4870 +#define PIC_INV_STOOL_C 4852 +#define PIC_INV_EGGGLS_C 4838 +#define PIC_INV_EGGAPL_C 4833 +#define PIC_INV_APPLE 862 +#define QU_MAN_DEF_LOOKUP 4776 +#define ANI_TUBE_36 4749 +#define QU_LEG31_HIDE 4728 +#define MSG_SC28_TURNOFF_0 4678 +#define QU_DRV_PUSHBUTTON_NOVENT 4578 +#define SND_34_031 4491 +#define SND_34_020 4480 +#define SND_33_010 4447 +#define QU_SC31_SND5 4388 +#define SND_31_001 4377 +#define QU_SC28_LIFT6_START2 4295 +#define MV_MAN28_STOPWASH 4252 +#define MV_MAN28_WASH 4251 +#define QU_SC28_LIFT2_START 4246 +#define QU_SC25_TRYHAND 4219 +#define MSG_SC25_ENTERTRUBA 4214 +#define SND_21_022 3976 +#define SND_21_011 3965 +#define SND_19_008 3921 +#define SND_18_009 3909 +#define SND_13_030 3775 +#define SND_12_020 3740 +#define SND_10_011 3677 +#define QU_SC7_SND5 3610 +#define SND_7_015 3595 +#define SND_7_004 3584 +#define SND_6_027 3566 +#define SND_6_016 3553 +#define SND_6_005 3542 +#define SND_4_029 3535 +#define QU_SC25_TRYSPADE 3498 +#define MV_CHI_NORM 3484 +#define ST_WMN_AFTER 3455 +#define QU_SC28_ENTERWMN 3451 +#define MV_BTH_GOUP_5 3356 +#define ANI_BITAHANDLER 3349 +#define MV_CDI_LOOK 3312 +#define ST_BT16_NORM 3287 +#define ST_WR16_NORM 3284 +#define QU_GRL_FALL 3280 +#define QU_SC5_SND3 3242 +#define QU_SC4_SND2 3236 +#define QU_SC3_SND1 3230 +#define MV_MAN14_KICKGMA 3211 +#define QU_STR_THROWGLASSES_L 3203 +#define MV_STR_0_1 3198 +#define SND_4_018 3133 +#define SND_4_007 3122 +#define SND_3_008 3107 +#define SND_2_009 3091 +#define QU_STR_NOSE_L 3057 +#define SND_DBGMENU_001 2929 +#define QU_SC6_DROPS 2898 +#define ANI_FIRECAN_17 2860 +#define ST_MAN_GOLADDER2 2843 +#define ST_LBN_0H 2835 +#define MV_LBN_0 2831 +#define LIFTBTN_9 2789 +#define ST_LBN_8P 2775 +#define ST_LBN_6N 2768 +#define ST_KDK_NORM 2672 +#define PIC_SC37_MASK 2608 +#define MV_MAN34_BOARD_BUMP2 2571 +#define PIC_SC35_OUTLET 2518 +#define QU_SC34_SHOWSTOOL 2496 +#define MV_MAN20_PUTSTOOL 2461 +#define ANI_PUZODUV 2418 +#define MV_LEG_POT2_MOVE1 2335 +#define MV_LEG_POT1_MOVE2 2331 +#define MV_LEG_POT0_MOVE2 2327 +#define ST_LEG_DOWN 2325 +#define MV_ASS_HITRED 2139 +#define MSG_SC29_STOPRIDE 2107 +#define QU_SC29_MANFROM_L 2101 +#define PIC_SC28_FLOOR 2075 +#define ST_BTA_FALL 2054 +#define ST_DRV_SITNOVENT 1999 +#define ST_DRV_VENT 1996 +#define rMV_BRD25_RIGHT 1903 +#define QU_SC26_OPEN2 1937 +#define MV_MAN26_TURNVENT_L 1933 +#define ST_LUK23U_OPEN 1820 +#define ANI_LUK23_U 1817 +#define ANI_LUK23_D 1813 +#define PIC_SC22_MONETOPR 1809 +#define QU_SC22_FALLSACK 1791 +#define MV_MAN22_FALL 1751 +#define MV_MAN22_PUTTABUR 1748 +#define MSG_SC23_SPINWHEEL4 1743 +#define QU_GRFG_BLINKHAIR 1686 +#define QU_GRFG_SHOWHAIR 1685 +#define QU_GRFU_TURN_UL 1662 +#define rMV_MANEGBR_EGG2GLASSES 469 +#define QU_SC19_MANJUMP2 1517 +#define MSG_SC18_SHOWBOYJUMPTO 1497 +#define MV_MAN17_PUTSUGAR 1414 +#define PIC_SC17_BOX 1409 +#define ANI_WHIRLGIG_13 1383 +#define MV_BOY_DRINK 1333 +#define QU_WHR19_SPIN 1316 +#define MV_WHR18_SPIN 1300 +#define MV_MAN13_PUTFIRECAN 1311 +#define ANI_INV_BALL 1242 +#define MV_GMA_JUMPBK 1231 +#define QU_SC14_ENTER_RIGHT 1223 +#define MV_MAN13_HANDLEDOWN 1202 +#define MV_MAN13_THROWGUM 1194 +#define MV_SWR_SPOLZING 1148 +#define MSG_SC5_MAKEMANFLIGHT 1136 +#define QU_SC5_ENTER_UP 1135 +#define MV_MAN_HMRKICK 1028 +#define MV_SC2_BOX_default 1021 +#define MV_HDL6_default 1010 +#define MSG_SC10_CLICKGUM 992 +#define MSG_SC9_SHOWBALL 936 +#define ANI_PBAR 896 +#define ST_INV_HAMMER_default 886 +#define MV_INV_COIN_default 876 +#define ANI_INV_OLDGLASSES 402 +#define QU_SLN_POT_TURNBACK 852 +#define MV_SLN_POT_MORG 836 +#define MSG_TAKEBOTTLE 614 +#define MV_KZW_JUMPOUT 586 +#define MV_SPR_LOWER 543 +#define QU_SC3_ENTER 473 +#define QU_SC2_ENTER 472 +#define MV_DYAS_GIVESEGG 314 +#define ST_EGTR_SLAPPIN 346 +#define MV_EGTR_SLIMOBL 337 +#define MV_EGTR_TOSLAP 345 +#define MV_MANDYAS_GIVESBOOT 358 +#define MV_MANDYAS_GIVESDOM 375 +#define ST_MAN_INTRUBAHOR 446 +#define PIC_SC1_LTRUBA 470 +#define MV_MAN_FROMLADDERD 494 +#define QU_SC3_ENTER_RIGHT 705 +#define QU_BTT_CHESHET 757 +#define MV_BRD_DROPBALL 694 +#define ANI_LUKE 803 +#define PIC_INV_OLDHANDLE 798 +#define ST_INV_DOMINO_default 874 +#define MV_NDV_EAT 945 +#define QU_SC9_ENTER_RIGHT 963 +#define ANI_GUARD1 996 +#define ST_SC4_BOOT_default 1037 +#define ST_HDL6_LIES 1042 +#define MV_MAN_LIFTDOWN 1052 +#define MV_MAN_TURN_SLD 1079 +#define MV_MAN_TURN_SLU 1080 +#define PIC_SC8_LADDER 754 +#define MV_INV_GUM_default 1155 +#define PIC_SC13_UTRUBA 1170 +#define MV_STR_HIDE 1181 +#define MV_GMA_THROW 1232 +#define MV_GMS_DRYG 1269 +#define QU_SC17_ENTER_RIGHT 1325 +#define ANI_WIRE16 1344 +#define ST_INV_MUG_default 1372 +#define MSG_SC16_SHOWMUGFULL 1396 +#define QU_HND_TAKE0 1440 +#define MV_HND17_ASK 1447 +#define MV_MAN_TOLADDERD 1524 +#define ANI_INV_EGGDOM 1561 +#define ST_INV_EGGDOM_default 1563 +#define PIC_INV_EGGAPL 1578 +#define PIC_INV_EGGGLS 1580 +#define ANI_GRANDFA 1588 +#define QU_GFA_BREATHESOCK 1611 +#define MV_GRFU_BLINKDOWN 1652 +#define ANI_CALENDWHEEL 1702 +#define MV_CND_1_2 1706 +#define MSG_SC23_CLICKBTN1 1736 +#define MV_INV_LEVERHANDLE_default 1778 +#define PIC_INV_STOOL 1785 +#define QU_SC22_TOSTOOL 1801 +#define MV_INV_SWAB_default 1918 +#define MV_MAN26_OPENLUK 1934 +#define QU_GRFM_NECK 1988 +#define ST_DRV_RIGHT 2010 +#define PIC_SC27_FLOOR 2053 +#define MV_STR2_SHOOT 2112 +#define ST_STR2_STAND 2113 +#define MV_MAN38_PUTDOMINO 2186 +#define ANI_BOTTLE38 2188 +#define MV_DMN38_NORM2 2204 +#define QU_DLD_GLOT 2217 +#define MV_FFT_TUBE_OPENEYE 2235 +#define QU_GLV_PROPOSE 2280 +#define ST_MLS_LEFT2 2291 +#define MV_FFT_PIPE_FLOWOPEN 2300 +#define QU_FFT_TUBE_FLOWOPEN 2306 +#define ST_INV_TUBE_default 2316 +#define ANI_INV_PIPE 2317 +#define QU_SC30_ENTER_LEFT 2356 +#define ST_RHT_OPEN 2362 +#define MV_LEG_POT0_OUT 2374 +#define MV_MAN32_STOPSPIN 2404 +#define MV_MAN35_JUMPOUT 2411 +#define MV_GMA_1_2 2455 +#define ST_CTS31_EMPTY 2458 +#define QU_SC31_ENTER_DOWN 2459 +#define MSG_SC34_SHOWBOX 2497 +#define ST_PDV_CUT 2522 +#define QU_PDV_CUT_TRY 2529 +#define MV_INV_SCISSORS_default 2533 +#define ST_RNG_OPEN 2606 +#define ST_RNG_CLOSED 2607 +#define ST_GMA22_EMPTY 2611 +#define ST_VNT33_DOWN 2640 +#define MV_VNT33_TURND 2638 +#define ANI_TESTO_31 2652 +#define MV_TEST 2683 +#define MV_MAN11_PUTBOOT1 2702 +#define MV_BTS11_DOUBLE 2705 +#define QU_SC32_ENTER_UP 2714 +#define ANI_JET_17 2746 +#define QU_SC35_ENTERLIFT 2815 +#define QU_SC35_EXITLIFT 2816 +#define QU_SC32_ENTERLIFT 2827 +#define MV_EGTR_MD1_DENY 2866 +#define MV_EGTR_0_1 2918 +#define ANI_INV_EGGBLACK 357 +#define MV_EGTR_SLIMDENY 2933 +#define MSG_SC15_PULL 2940 +#define MSG_SC37_PULL 2945 +#define MV_MAN1_EGG2DOM 443 +#define ST_GRT1_NORM 2963 +#define MV_SWR_STAND 948 +#define QU_NTL_MOVE 3027 +#define MV_HDLR_RISE 3043 +#define SND_5_006 3147 +#define SND_5_017 3158 +#define MV_GLV_PUTDOMINO_NOHMR 3180 +#define PIC_SC17_PIPE 3292 +#define ST_MLS_RIGHT2 3323 +#define MV_MAN_SNEEZE 3386 +#define QU_SC6_SND4 3579 +#define SND_8_003 3613 +#define SND_8_014 3624 +#define SND_9_002 3641 +#define SND_9_013 3657 +#define SND_11_010 3694 +#define SND_11_021 3705 +#define SND_20_001 3929 +#define QU_SC20_SND5 3938 +#define SND_20_012 3945 +#define SND_22_010 3993 +#define SND_CMN_040 4033 +#define SND_22_032 1765 +#define MV_MAN25_STOPROW 1883 +#define PIC_SC28_DARK1 4266 +#define SND_29_009 4343 +#define SND_30_002 4360 +#define QU_SC30_SND4 4367 +#define SND_30_013 4378 +#define SND_32_011 4407 +#define SND_32_022 4418 +#define SND_32_033 4429 +#define SND_3_019 4549 +#define ANI_TEST 4552 +#define PIC_MSV_OK_D 4635 +#define PIC_MSV_CANCEL_D 4637 +#define PIC_MSV_2_D 4652 +#define QU_TBL_GOL 4708 +#define MV_EYE30_LOOK 4716 +#define ST_LEG31_NORM 4725 +#define SND_CMN_051 4746 +#define PIC_TEST4 4785 +#define PIC_CSR_GOL 4897 +#define SC_FINAL2 5000 +#define SND_FIN_029 5104 +#define ST_IN1GLS_NORM 5121 +#define ST_IN2BOOT_NORM 5142 +#define SC_17 1141 +#define SC_28 2062 +#define MSG_SC32_TRUBATOFRONT 5180 +#define PIC_SC2_LADDER2 5205 +#define QU_SC21_SND6 5214 +#define PIC_MAP_P10 5286 +#define ST_BTN32_OFF 5349 +#define PIC_HLP_BGR 3562 +#define PIC_MAP_S31_2 5254 +#define PIC_MAP_S32_1 5255 +#define PIC_MAP_H08 5364 +#define PIC_MOV_CANCEL 5345 +#define PIC_SC36_MASK 5221 +#define QU_MSH_CRANEOUT_GMA 5219 +#define SND_FIN_019 5091 +#define SND_FIN_008 5080 +#define QU_FN3_SHOWHMR 5073 +#define MSG_SC35_TRYFLY 4985 +#define QU_BRD16_GOR 4951 +#define ST_EGI_GOR 4931 +#define SND_CMN_063 4928 +#define PIC_CSR_ARCADE7 4909 +#define PIC_INV_GUM2_C 4858 +#define PIC_INV_VANTUZ_C 4856 +#define PIC_INV_TUBE_C 4855 +#define PIC_INV_SOCK_C 4851 +#define PIC_INV_PIPE_H 4812 +#define PIC_INV_MUG_H2 4810 +#define PIC_INV_BOTTLEFULL 1425 +#define PIC_SCD_RESTART 4766 +#define MSG_SC35_CHECKPIPESOUND 4761 +#define rMV_BRDCMN_GOR 4739 +#define ST_TBL_L 4701 +#define ANI_TENNBALL 4699 +#define MV_EGTR_MD2_SHOW 4695 +#define MV_BOT34_NORM 4561 +#define SND_34_032 4492 +#define SND_34_021 4481 +#define SND_34_010 4470 +#define SND_33_011 4448 +#define SND_31_002 4380 +#define ST_TTA_GOL 4292 +#define MV_TTA_TURN_DL 4291 +#define MSG_SC28_STARTWORK1 4255 +#define ST_MAN28_RIGHT 4249 +#define QU_SC28_LIFT3_START 4245 +#define SND_21_023 3977 +#define SND_21_012 3966 +#define SND_21_001 3950 +#define SND_19_009 3922 +#define SND_13_031 3776 +#define SND_13_020 3765 +#define SND_12_010 3730 +#define SND_10_012 3678 +#define SND_10_001 3662 +#define SND_7_016 3596 +#define SND_7_005 3585 +#define SND_6_028 3567 +#define SND_6_017 3556 +#define SND_6_006 3543 +#define SND_CMN_030 3470 +#define QU_SC28_WMN_END 3453 +#define MV_WMN28_IN_1 3443 +#define MV_BTH_4_3 3360 +#define MV_CDI_HIDEEYE 3313 +#define MV_MAN16_PUTBOOT 3288 +#define MV_BT16_FILL 3286 +#define QU_GRL_DRYG 3282 +#define MSG_SC14_STARTARCADE 3252 +#define QU_SC5_SND4 3243 +#define QU_SC4_SND3 3237 +#define QU_SC3_SND2 3231 +#define MV_STR_THROWGLASSES 3200 +#define MV_BTL38_FULL 3171 +#define SND_4_019 3134 +#define SND_4_008 3123 +#define SND_3_009 3108 +#define MV_HDLL_LOWER 3061 +#define MV_MID11_LOOK 3031 +#define QU_SC10_ENTER_DOWN 3003 +#define MV_BOT4_LEFT 2881 +#define MV_NDV_BLOW2 2855 +#define QU_SC38_ENTERLIFT 2836 +#define QU_SC10_ENTERLIFT 1067 +#define ST_LBN_5N 2765 +#define MSG_LIFT_GO 1065 +#define ST_LBN_7P 2772 +#define MV_LBN_1 2752 +#define ST_GRT9_GRIT 2722 +#define MV_PDV_GROW 2419 +#define PIC_SCD_30 2359 +#define ST_DMN38_6 2288 +#define MV_DMN38_NORM3 2250 +#define ST_PTR_NORM 2084 +#define QU_DRV_LOOKLEFT2 2034 +#define ST_BTA_NORM 2028 +#define MV_MID_LOOK 2023 +#define MV_MID_BROOM 2021 +#define MV_DRV_TORIGHT_V 2009 +#define ST_DRV_LEFT 2008 +#define ST_DRV_DRIVE 1997 +#define QU_SC26_OPEN3 1939 +#define ANI_GIRAFFE_TOP 1645 +#define ST_MSH_EMPTY 1758 +#define MV_MAN23_PUSH1 1724 +#define MV_GRFU_KISS 1682 +#define QU_GRFU_TURN_LU 1663 +#define MV_GRFB_0_1 1637 +#define PIC_SC21_UTRUBA 1554 +#define ST_CDI_EMPTY2 1543 +#define QU_SC19_MANJUMP3 1518 +#define ANI_BOY18 1477 +#define MV_KSL_JUMPBOY 1473 +#define MSG_SC17_FILLBOTTLE 1436 +#define QU_SC16_SHOWMUG 1361 +#define QU_SC13_SPIN 1386 +#define ANI_GUARD2 1279 +#define QU_GMA_JUMPBK 1251 +#define MV_INV_GUM2_default 1205 +#define MV_SWR_2_3 1152 +#define MV_MAN_GOD 481 +#define MV_MAN_STARTLADDER 452 +#define MV_TEST_JUMPFW 1074 +#define MSG_SC2_PUTMANUP 1026 +#define MSG_SC6_BTNPUSH 1017 +#define QU_NDV_MORG 971 +#define ANI_INV_COIN 875 +#define PIC_INV_HANDLE 867 +#define ST_INV_OLDGLASSES_default 404 +#define ANI_INV_OLDHANDLE 795 +#define ANI_INV_OLDEGG 364 +#define PIC_INV_SEL 868 +#define QU_SLN_BOOT_MORG 847 +#define MV_SLN_BOOT_LOOK 833 +#define PIC_SCD_SEL 734 +#define GRID_SC6_MAMASHA 684 +#define MV_MAN_JUMPONPLANK 551 +#define QU_SC4_ENTER 539 +#define QU_EGTR_SLIMBOLTLEGS 523 +#define ANI_PLANK 501 +#define MV_MAN_GOU 460 +#define ST_MAN_GOR 326 +#define rMV_EGBR_LOWERHEAD 462 +#define ST_MAN_GOLADDERD 456 +#define MV_MAN_GOLADDERDOWN 455 +#define ST_OTM_GLS_RIGHT 423 +#define MV_EGBR_BRK_GLASSES 387 +#define ST_DYAS_SITSOPEN 309 +#define ST_DYAS_SITSTOUS 312 +#define MV_DYAS_OPENBOX_LIES 323 +#define rMV_MAN_TOTRUBAHOR 447 +#define PIC_SC4_LTRUBA 506 +#define QU_SC4_GOCLOCK 595 +#define MV_MOM_SHAKE 663 +#define QU_SC6_ENTER_LEFT 708 +#define QU_BTT_DRINK 758 +#define ST_HGN_LOOK 811 +#define QU_SC9_EATBALL 942 +#define ST_VSN_LEFT 954 +#define PIC_SC10_RTRUBA 973 +#define MSG_SC2_HIDELADDER 1023 +#define QU_STR_PLUU 1189 +#define MV_HDLL_0_1 1210 +#define QU_SC16_ENTER_LEFT 1294 +#define MSG_SC16_STARTLAUGH 1374 +#define MV_MUG_0_1 1297 +#define ST_BOTTLE_FULL 1431 +#define QU_HND_TAKE1 1441 +#define QU_SC21_ENTER_UP 1629 +#define MV_GRFU_TURN_UL 1653 +#define MV_GRFU_STARTCHMOK 1657 +#define MSG_SC23_CLICKBTN2 1737 +#define MV_MAN22_HANDLEDOWN 1795 +#define PIC_SC21_DTRUBA 1823 +#define QU_SC25_LADDERUP 1925 +#define MV_CHI_SHOW 1958 +#define PIC_SC27_HITZONE 2055 +#define ANI_SHOOTER1 2108 +#define QU_DLD_ICK 2219 +#define MV_FFT_TUBE_STOP 2238 +#define MV_FFT_PIPE_BLINK 2248 +#define ANI_CACTUS 2267 +#define MV_LEG_1_2 2344 +#define PIC_SC30_LTRUBA 2354 +#define MV_LEG_POT1_OUT 2369 +#define PIC_SC31_RTRUBA 2440 +#define ANI_CACTUS_31 2456 +#define QU_SC20_SHOWSTOOL 2466 +#define ST_CTS31_GROWN2 2472 +#define MV_STL34_PUTBOX 2487 +#define MSG_SC35_STARTFLOW 2523 +#define ANI_LUK_34 2541 +#define ST_GRD37_STAND 2590 +#define QU_GRD37_LOOKR 2598 +#define PIC_SC37_WALL1 2600 +#define MV_MAN33_PUTMUG 2621 +#define ST_MUG33_FULL 2626 +#define rMV_MAN_HMRKICK 2694 +#define MV_MAN11_PUTBOOT2 2703 +#define QU_SC11_SHOWBOOT 2708 +#define ANI_DOMINO_3 2732 +#define ST_MUG17_EMPTY 2739 +#define QU_SC32_ENTER_LIFTUP 2829 +#define MSG_SC6_TESTNUMBALLS 2904 +#define MV_MAN3_GIVEBLACK_1 2914 +#define MSG_SC8_STANDUP 2976 +#define ST_BTN6_ON 2994 +#define QU_VSN_TURNR 2998 +#define MV_SWR_SPOLZING_BALD 3006 +#define MSG_SC13_CLOSEBRIDGE 3046 +#define SND_5_007 3148 +#define SND_5_018 3159 +#define MV_RPE15_NORM 3256 +#define QU_SC38_SHOWHMR 2197 +#define MV_CLN_TUZH 3324 +#define MV_MAN22_STANDTABUR_R 3331 +#define QU_SC23_SHOWSTOOL 3335 +#define MSG_SC26_CLICKVENT 1947 +#define QU_MAN_DEF_STOPSHOES2_R 3402 +#define MV_SWR_DENY_BALD 3429 +#define MV_MAN22_TRYBOOT_NOSOCK 3434 +#define QU_SC6_SND5 3580 +#define SND_8_004 3614 +#define SND_8_015 3625 +#define SND_9_003 3642 +#define SND_9_014 3658 +#define SND_11_011 3695 +#define SND_11_022 3706 +#define SND_20_002 3930 +#define SND_20_013 3946 +#define SND_22_011 3994 +#define SND_22_022 4005 +#define SND_CMN_041 4034 +#define SND_22_033 1766 +#define MV_MAN1_FALL 4228 +#define PIC_SC28_FRAME6 4263 +#define PIC_SC28_DARK2 4267 +#define MSG_SC28_TURNOFF_1 4279 +#define SND_30_003 4361 +#define QU_SC30_SND5 4368 +#define SND_30_014 4379 +#define SND_32_001 4392 +#define SND_32_012 4408 +#define SND_32_023 4419 +#define SND_32_034 4430 +#define SND_35_020 4518 +#define MV_MAN34_STANDBOX_FLOOR 4569 +#define MV_CPT36_NORM 4601 +#define MV_RHT_CLOSE 2363 +#define MV_MAN34_PUTSTOOL_BOX 4613 +#define PIC_MNU_LOAD_D 4627 +#define PIC_MSV_EMPTY_L 4640 +#define PIC_MSV_3_D 4653 +#define PIC_MSV_DOTS_L 4669 +#define MV_TBL_WALKR 4706 +#define MV_EYE30_BLINK 4717 +#define QU_EYE30_LOOK 4720 +#define SND_CMN_052 4747 +#define PIC_TEST5 4786 +#define QU_BALL_WALKL 4920 +#define QU_BRD16_TRY 4955 +#define SC_FINAL3 5001 +#define ANI_FN2_HAND1 5028 +#define MV_IN2BOOT_FALL 5141 +#define SC_18 1142 +#define SC_29 2063 +#define SND_25_030 5175 +#define MSG_LIFT_CLOSEDOOR 5194 +#define MV_MAN23_TRYBROOM 5307 +#define PIC_MAP_P11 5287 +#define QU_SC23_ENTER_DOWNTOUP 5328 +#define PIC_MAP_H19 5393 +#define PIC_MAP_S30 5252 +#define PIC_MAP_S32_2 5256 -- cgit v1.2.3 From 26e6f5086046ad824c6338fc78ea49f9d71f0dbd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 1 May 2013 14:30:38 +0300 Subject: FULLPIPE: Initial engine skeleton with detection --- engines/fullpipe/detection.cpp | 112 +++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/fullpipe.cpp | 81 +++++++++++++++++++++++++++++ engines/fullpipe/fullpipe.h | 80 +++++++++++++++++++++++++++++ 3 files changed, 273 insertions(+) create mode 100644 engines/fullpipe/detection.cpp create mode 100644 engines/fullpipe/fullpipe.cpp create mode 100644 engines/fullpipe/fullpipe.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/detection.cpp b/engines/fullpipe/detection.cpp new file mode 100644 index 0000000000..4cb46ba1c5 --- /dev/null +++ b/engines/fullpipe/detection.cpp @@ -0,0 +1,112 @@ +/* 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. + * + */ + +#include "base/plugins.h" + +#include "engines/advancedDetector.h" +#include "common/file.h" + +#include "fullpipe/fullpipe.h" + + +namespace Fullpipe { + +const char *FullpipeEngine::getGameId() const { + return _gameDescription->gameid; +} + +} + +static const PlainGameDescriptor fullpipeGames[] = { + {"fullpipe", "Full Pipe"}, + {0, 0} +}; + +namespace Fullpipe { + +static const ADGameDescription gameDescriptions[] = { + + // Fullpipe Russian version + { + "fullpipe", + 0, + AD_ENTRY1s("0654.sc2", "099f54f86d33ad2395f3b854b7e05058", 2272), + Common::RU_RUS, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO1(GUIO_NONE) + }, + + // Fullpipe German version + { + "fullpipe", + 0, + AD_ENTRY1s("0654.sc2", "d8743351fc53d205f42d91f6d791e51b", 2272), + Common::RU_RUS, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO1(GUIO_NONE) + }, + + AD_TABLE_END_MARKER +}; + +} // End of namespace Fullpipe + +class FullpipeMetaEngine : public AdvancedMetaEngine { +public: + FullpipeMetaEngine() : AdvancedMetaEngine(Fullpipe::gameDescriptions, sizeof(ADGameDescription), fullpipeGames) { + _singleid = "fullpipe"; + } + + virtual const char *getName() const { + return "Fullpipe Engine"; + } + + virtual const char *getOriginalCopyright() const { + return "Fullpipe Engine (C) Pipe Studio"; + } + + virtual bool hasFeature(MetaEngineFeature f) const; + virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; +}; + +bool FullpipeMetaEngine::hasFeature(MetaEngineFeature f) const { + return false; +} + +bool Fullpipe::FullpipeEngine::hasFeature(EngineFeature f) const { + return false; +} + +bool FullpipeMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const { + if (desc) { + *engine = new Fullpipe::FullpipeEngine(syst, desc); + } + return desc != 0; +} + +#if PLUGIN_ENABLED_DYNAMIC(FULLPIPE) + REGISTER_PLUGIN_DYNAMIC(FULLPIPE, PLUGIN_TYPE_ENGINE, FullpipeMetaEngine); +#else + REGISTER_PLUGIN_STATIC(FULLPIPE, PLUGIN_TYPE_ENGINE, FullpipeMetaEngine); +#endif diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp new file mode 100644 index 0000000000..23bae97f1e --- /dev/null +++ b/engines/fullpipe/fullpipe.cpp @@ -0,0 +1,81 @@ +/* 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. + * + */ + +#include "base/plugins.h" + +#include "common/config-manager.h" + +#include "engines/util.h" + +#include "fullpipe/fullpipe.h" + +namespace Fullpipe { + +FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { + // Setup mixer + if (!_mixer->isReady()) { + warning("Sound initialization failed."); + } + + _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); + + _rnd = new Common::RandomSource("fullpipe"); + +} + +FullpipeEngine::~FullpipeEngine() { + delete _rnd; +} + +Common::Error FullpipeEngine::run() { + // Initialize backend + initGraphics(800, 600, true); + + _isSaveAllowed = false; + + return Common::kNoError; +} + +void FullpipeEngine::updateEvents() { + Common::Event event; + Common::EventManager *eventMan = _system->getEventManager(); + + while (eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_KEYDOWN: + _keyState = event.kbd.keycode; + break; + case Common::EVENT_KEYUP: + _keyState = Common::KEYCODE_INVALID; + break; + case Common::EVENT_MOUSEMOVE: + _mouseX = event.mouse.x; + _mouseY = event.mouse.y; + break; + default: + break; + } + } +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h new file mode 100644 index 0000000000..f9b0368659 --- /dev/null +++ b/engines/fullpipe/fullpipe.h @@ -0,0 +1,80 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_H +#define FULLPIPE_H + +#include "common/scummsys.h" +#include "common/events.h" +#include "common/keyboard.h" +#include "common/random.h" +#include "common/savefile.h" +#include "common/system.h" + +#include "audio/mixer.h" + +#include "graphics/surface.h" + +#include "engines/engine.h" + +struct ADGameDescription; + +namespace Fullpipe { + +enum FullpipeGameFeatures { +}; + +class FullpipeEngine : public ::Engine { +protected: + + Common::Error run(); + +public: + FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc); + virtual ~FullpipeEngine(); + + // Detection related functions + const ADGameDescription *_gameDescription; + const char *getGameId() const; + Common::Platform getPlatform() const; + bool hasFeature(EngineFeature f) const; + + Common::RandomSource *_rnd; + + int _mouseX, _mouseY; + Common::KeyCode _keyState; + uint16 _buttonState; + + void updateEvents(); + +public: + + bool _isSaveAllowed; + + bool canLoadGameStateCurrently() { return _isSaveAllowed; } + bool canSaveGameStateCurrently() { return _isSaveAllowed; } + +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_H */ -- cgit v1.2.3 From c69415112f790091ba1a9545462078ae3960c72a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 1 May 2013 15:15:08 +0300 Subject: FULLPIPE: Implemented NMI archive parser --- engines/fullpipe/fullpipe.cpp | 4 + engines/fullpipe/ngiarchive.cpp | 181 ++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/ngiarchive.h | 42 ++++++++++ 3 files changed, 227 insertions(+) create mode 100644 engines/fullpipe/ngiarchive.cpp create mode 100644 engines/fullpipe/ngiarchive.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 23bae97f1e..5be5338f86 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -22,11 +22,13 @@ #include "base/plugins.h" +#include "common/archive.h" #include "common/config-manager.h" #include "engines/util.h" #include "fullpipe/fullpipe.h" +#include "fullpipe/ngiarchive.h" namespace Fullpipe { @@ -53,6 +55,8 @@ Common::Error FullpipeEngine::run() { _isSaveAllowed = false; + Common::Archive *arch = makeNGIArchive("3896.nl"); + return Common::kNoError; } diff --git a/engines/fullpipe/ngiarchive.cpp b/engines/fullpipe/ngiarchive.cpp new file mode 100644 index 0000000000..801d020495 --- /dev/null +++ b/engines/fullpipe/ngiarchive.cpp @@ -0,0 +1,181 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" +#include "common/archive.h" + +#include "common/file.h" +#include "common/hash-str.h" +#include "common/memstream.h" +#include "common/bufferedstream.h" +#include "common/textconsole.h" + +#include "fullpipe/ngiarchive.h" + +namespace Fullpipe { + +#define NGI_FILENAME_MAX 13 + +struct NgiHeader { + int32 pos; + int32 extVal; + int32 flags; + int32 size; + char filename[NGI_FILENAME_MAX]; +}; + +typedef Common::HashMap NgiHeadersMap; + +class NGIArchive : public Common::Archive { + NgiHeadersMap _headers; + Common::String _ngiFilename; + +public: + NGIArchive(const Common::String &name); + virtual ~NGIArchive(); + + // Archive implementation + virtual bool hasFile(const Common::String &name) const; + virtual int listMembers(Common::ArchiveMemberList &list) const; + virtual const Common::ArchiveMemberPtr getMember(const Common::String &name) const; + virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const; +}; + +NGIArchive::NGIArchive(const Common::String &filename) : _ngiFilename(filename) { + Common::File ngiFile; + + if (!ngiFile.open(_ngiFilename)) { + warning("NGIArchive::NGIArchive(): Could not find the archive file"); + return; + } + + ngiFile.seek(4, SEEK_SET); + + unsigned int count = ngiFile.readUint16LE(); // How many entries? + + ngiFile.seek(20, SEEK_SET); + + unsigned int key = ngiFile.readUint16LE(); + + byte key1, key2; + + key1 = key & 0xff; + key2 = (key >> 8) & 0xff; + + int fatSize = count * 32; + + ngiFile.seek(32, SEEK_SET); + + byte *fat = (byte *)calloc(fatSize, 1); + + ngiFile.read(fat, fatSize); + + for (int i = 0; i < fatSize; i++) { + key1 = (key1 << 1) ^ key2; + key2 = (key2 >> 1) ^ key1; + + fat[i] ^= key1; + } + + NgiHeader header; + NgiHeader *head; + + for (uint i = 0; i < count; i++) { + memcpy(header.filename, &fat[i * 32], 12); + header.filename[12] = 0; + header.flags = READ_LE_UINT32(&fat[i * 32 + 16]); + header.extVal = READ_LE_UINT32(&fat[i * 32 + 20]); + header.pos = READ_LE_UINT32(&fat[i * 32 + 24]); + header.size = READ_LE_UINT32(&fat[i * 32 + 28]); + + if (header.flags & 0x1e0) { + warning("File has flags: %.8x\n", header.flags & 0x1e0); + } + + head = new NgiHeader(header); + + _headers[header.filename] = head; + } + + free(fat); + + debug(0, "NGIArchive::NGIArchive(%s): Located %d files", filename.c_str(), _headers.size()); +} + +NGIArchive::~NGIArchive() { + debug(0, "NGIArchive Destructor Called"); + NgiHeadersMap::iterator it = _headers.begin(); + for ( ; it != _headers.end(); ++it) { + delete it->_value; + } +} + +bool NGIArchive::hasFile(const Common::String &name) const { + return _headers.contains(name); +} + + int NGIArchive::listMembers(Common::ArchiveMemberList &list) const { + int matches = 0; + + NgiHeadersMap::const_iterator it = _headers.begin(); + for ( ; it != _headers.end(); ++it) { + list.push_back(Common::ArchiveMemberList::value_type(new Common::GenericArchiveMember(it->_value->filename, this))); + matches++; + } + + return matches; +} + +const Common::ArchiveMemberPtr NGIArchive::getMember(const Common::String &name) const { + if (!hasFile(name)) + return Common::ArchiveMemberPtr(); + + return Common::ArchiveMemberPtr(new Common::GenericArchiveMember(name, this)); +} + +Common::SeekableReadStream *NGIArchive::createReadStreamForMember(const Common::String &name) const { + if (!_headers.contains(name)) { + return 0; + } + + NgiHeader *hdr = _headers[name]; + + Common::File archiveFile; + archiveFile.open(_ngiFilename); + archiveFile.seek(hdr->pos, SEEK_SET); + + // TODO: It would be good if ArjFile could decompress files in a streaming + // mode, so it would not need to pre-allocate the entire output. + byte *data = (byte *)malloc(hdr->size); + assert(data); + + int32 len = archiveFile.read(data, hdr->size); + assert(len == hdr->size); + + return new Common::MemoryReadStream(data, hdr->size, DisposeAfterUse::YES); +} + +Common::Archive *makeNGIArchive(const Common::String &name) { + return new NGIArchive(name); +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/ngiarchive.h b/engines/fullpipe/ngiarchive.h new file mode 100644 index 0000000000..ee977c6140 --- /dev/null +++ b/engines/fullpipe/ngiarchive.h @@ -0,0 +1,42 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_NGIARCHIVE_H +#define FULLPIPE_NGIARCHIVE_H + +#include "common/str.h" + +namespace Fullpipe { + +class Archive; + +/** + * This factory method creates an Archive instance corresponding to the content + * of the NGI compressed file with the given name. + * + * May return 0 in case of a failure. + */ +Common::Archive *makeNGIArchive(const Common::String &name); + +} // End of namespace Fullpipe + +#endif -- cgit v1.2.3 From 7e1736cd7080f5a745d657b7edd37898a30a2da4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 3 May 2013 19:34:56 +0300 Subject: FULLPIPE: Added constants for object names and partial translation --- engines/fullpipe/objectnames.h | 233 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) create mode 100644 engines/fullpipe/objectnames.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h new file mode 100644 index 0000000000..a952002e8e --- /dev/null +++ b/engines/fullpipe/objectnames.h @@ -0,0 +1,233 @@ +/* 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. + * + */ + +// This file is used in order to avoid usage of constants in Russian accross the code + +#define sO_ "\xc1\xe0\xe1\xf3\xeb\xff" // "Бабуля" +#define sO_Pool "\xc1\xe0\xf1\xf1\xe5\xe9\xed" // "Бассейн" +#define sO_ "\xc1\xe0\xf2\xf3\xf2\xe0" // "Батута" +#define sO_WithoutBoot "\xc1\xe5\xe7 \xe1\xee\xf2\xe8\xed\xea\xe0" // "Без ботинка" +#define sO_ "\xc1\xe5\xe7 \xe3\xee\xf0\xf8\xea\xee\xe2" // "Без горшков" +#define sO_ "\xc1\xe5\xe7 \xea\xee\xe2\xf0\xe8\xea\xe0" // "Без коврика" +#define sO_WithoutCoin "\xc1\xe5\xe7 \xec\xee\xed\xe5\xf2\xfb" // "Без монеты" +#define sO_WithNothing "\xc1\xe5\xe7 \xed\xe8\xf7\xe5\xe3\xee" // "Без ничего" +#define sO_WithoutHandle "\xc1\xe5\xe7 \xf0\xf3\xf7\xea\xe8" // "Без ручки" +#define sO_WithoutStool "\xc1\xe5\xe7 \xf2\xe0\xe1\xf3\xf0\xe5\xf2\xea\xe8" // "Без табуретки" +#define sO_WithoutBox "\xc1\xe5\xe7 \xff\xf9\xe8\xea\xe0" // "Без ящика" +#define sO_Blocked "\xc1\xeb\xee\xea\xe8\xf0\xee\xe2\xe0\xed" // "Блокирован" +#define sO_BlockedShe "\xc1\xeb\xee\xea\xe8\xf0\xee\xe2\xe0\xed\xe0" // "Блокирована" +#define sO_Awaken "\xc1\xee\xe4\xf0\xf1\xf2\xe2\xf3\xe5\xf2" // "Бодрствует" +#define sO_Boot_15 "\xc1\xee\xf2\xe8\xed\xee\xea_15" // "Ботинок_15" +#define sO_Bottle_38 "\xc1\xf3\xf2\xfb\xeb\xea\xe0_38" // "Бутылка_38" +#define sO_InSmokeRoom "\xc2 \xea\xf3\xf0\xe8\xeb\xea\xe5" // "В курилке" +#define sO_InSock "\xc2 \xed\xee\xf1\xea\xe5" // "В носке" +#define sO_InGlasses "\xc2 \xee\xf7\xea\xe0\xf5" // "В очках" +#define sO_ "\xc2_14" // "В_14" +#define sO_ "\xc2_32 \xeb\xe5\xe6\xe8\xf2" // "В_32 лежит" +#define sO_ "\xc2_32 \xf2\xee\xf0\xf7\xe8\xf2" // "В_32 торчит" +#define sO_ "\xc2_7" // "В_7" +#define sO_Valve1_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc1_26" // "Вентиль1_26" +#define sO_Valve2_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc2_26" // "Вентиль2_26" +#define sO_Valve3_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc3_26" // "Вентиль3_26" +#define sO_Valve4_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc4_26" // "Вентиль4_26" +#define sO_Valve5_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc5_26" // "Вентиль5_26" +#define sO_Valve_34 "\xc2\xe5\xed\xf2\xe8\xeb\xfc_34" // "Вентиль_34" +#define sO_UpperHatch_23 "\xc2\xe5\xf0\xf5\xed\xe8\xe9 \xeb\xfe\xea_23" // "Верхний люк_23" +#define sO_Taken "\xc2\xe7\xff\xf2" // "Взят" +#define sO_ "\xc2\xe8\xf1\xe8\xf2 \xed\xe0 \xf2\xf0\xf3\xe1\xe5" // "Висит на трубе" +#define sO_On "\xc2\xea\xeb" // "Вкл" +#define sO_TurnedOn "\xc2\xea\xeb\xfe\xf7\xe5\xed" // "Включен" +#define sO_ "\xc2\xf3\xe3\xeb\xf3\xf1\xe5\xe4" // "Вуглусед" +#define sO_Off "\xc2\xfb\xea\xeb" // "Выкл" +#define sO_ "\xc2\xfb\xea\xeb\xfe\xf7\xe5\xed" // "Выключен" +#define sO_ "\xc2\xfb\xf0\xee\xf1" // "Вырос" +#define sO_ "\xc3\xeb\xe0\xe2\xe0\xf0\xfc" // "Главарь" +#define sO_ "\xc3\xee\xf0\xf8\xee\xea" // "Горшок" +#define sO_ "\xc3\xf3\xeb\xff\xe5\xf2" // "Гуляет" +#define sO_Yes "\xc4\xe0" // "Да" +#define sO_ "\xc4\xe5\xe2\xee\xf7\xea\xe0" // "Девочка" +#define sO_ "\xc4\xe5\xe2\xee\xf7\xea\xe0-\xf1\xeb\xee\xed\xe8\xea" // "Девочка-слоник" +#define sO_ "\xc4\xe5\xe4\xf3\xf8\xea\xe0" // "Дедушка" +#define sO_ "\xc4\xee\xf1\xea\xe0_25" // "Доска_25" +#define sO_ "\xc4\xee\xf1\xea\xe0_34" // "Доска_34" +#define sO_ "\xc4\xff\xe4\xff \xef\xf0\xfb\xe3\xe0\xeb" // "Дядя прыгал" +#define sO_Dude "\xc4\xff\xe4\xff" // "Дядя" +#define sO_ "\xc4\xff\xe4\xff-\xff\xf9\xe8\xea" // "Дядя-ящик" +#define sO_ "\xc4\xff\xe4\xff_\xea\xe0\xf2\xe0\xeb\xf1\xff" // "Дядя_катался" +#define sO_Eats "\xc5\xf1\xf2" // "Ест" +#define sO_Present "\xc5\xf1\xf2\xfc" // "Есть" +#define sO_CloseThing1 "\xc7\xe0\xea\xf0\xfb\xe2\xe0\xe5\xec\xee\xe5 1" // "Закрываемое 1" +#define sO_CloseThing2 "\xc7\xe0\xea\xf0\xfb\xe2\xe0\xe5\xec\xee\xe5 2" // "Закрываемое 2" +#define sO_CloseThing3 "\xc7\xe0\xea\xf0\xfb\xe2\xe0\xe5\xec\xee\xe5 3" // "Закрываемое 3" +#define sO_CloseThing "\xc7\xe0\xea\xf0\xfb\xe2\xe0\xe5\xec\xee\xe5" // "Закрываемое" +#define sO_Closed "\xc7\xe0\xea\xf0\xfb\xf2" // "Закрыт" +#define sO_ClosedWithBoot "\xc7\xe0\xea\xf0\xfb\xf2\xe0 \xf1 \xe1\xee\xf2\xe8\xed\xea\xee\xec" // "Закрыта с ботинком" +#define sO_ClosedShe "\xc7\xe0\xea\xf0\xfb\xf2\xe0" // "Закрыта" +#define sO_ "\xc7\xe0\xef\xee\xeb\xed\xe5\xed \xed\xe0\xef\xee\xeb\xee\xe2\xe8\xed\xf3" // "Заполнен наполовину" +#define sO_ "\xc7\xe0\xef\xee\xeb\xed\xe5\xed \xf6\xe5\xeb\xe8\xea\xee\xec" // "Заполнен целиком" +#define sO_MirroredTo "\xc7\xe5\xf0\xea\xe0\xeb\xfc\xed\xe0\xff \xea" // "Зеркальная к" +#define sO_Playing "\xc8\xe3\xf0\xe0\xe5\xf2" // "Играет" +#define sO_Cactus "\xca\xe0\xea\xf2\xf3\xf1" // "Кактус" +#define sO_SwingingWithBoot "\xca\xe0\xf2\xe0\xe5\xf2\xf1\xff \xf1 \xe1\xee\xf2\xe8\xed\xea\xee\xec" // "Катается с ботинком" +#define sO_Swinging "\xca\xe0\xf2\xe0\xe5\xf2\xf1\xff" // "Катается" +#define sO_ "\xca\xe0\xf7\xe5\xeb\xe5\xed\xff" // "Качеленя" +#define sO_LiftButtons "\xca\xed\xee\xef\xea\xe8 \xeb\xe8\xf4\xf2\xe0" // "Кнопки лифта" +#define sO_ "\xca\xee\xe2\xf0\xe8\xea_35" // "Коврик_35" +#define sO_Valve_35 "\xca\xf0\xe0\xed_35" // "Кран_35" +#define sO_Cup "\xca\xf0\xf3\xe6\xea\xe0" // "Кружка" +#define sO_ "\xca\xf3\xe1\xe8\xea" // "Кубик" +#define sO_LeftPipe_15 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_15" // "Левая труба_15" +#define sO_LeftPipe_26 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_26" // "Левая труба_26" +#define sO_LeftPipe_29 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_29" // "Левая труба_29" +#define sO_LeftPipe_30 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_30" // "Левая труба_30" +#define sO_LeftPipe_37 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_37" // "Левая труба_37" +#define sO_ "\xcb\xe5\xf1\xf2\xed\xe8\xf6\xe0 \xe2\xed\xe8\xe7_24" // "Лестница вниз_24" +#define sO_ "\xcb\xe5\xf1\xf2\xed\xe8\xf6\xe0 \xf1\xe2\xe5\xf0\xf5\xf3_8" // "Лестница сверху_8" +#define sO_Stairway "\xcb\xe5\xf1\xf2\xed\xe8\xf6\xe0" // "Лестница" +#define sO_ "\xcb\xe5\xf2\xf3\xed\xfb" // "Летуны" +#define sO_Hatch_26 "\xcb\xfe\xea_26" // "Люк_26" +#define sO_Hatch_34 "\xcb\xfe\xea_34" // "Люк_34" +#define sO_ "\xcc\xe0\xec\xe0 \xf0\xf3\xf7\xea\xe8_32" // "Мама ручки_32" +#define sO_ "\xcc\xe0\xec\xe0\xf8\xe0" // "Мамаша" +#define sO_Bag_22 "\xcc\xe5\xf8\xee\xea_22" // "Мешок_22" +#define sO_CoinSlot_1 "\xcc\xee\xed\xe5\xf2\xee\xef\xf0\xe8\xe5\xec\xed\xe8\xea 1" // "Монетоприемник 1" +#define sO_CoinSlot_22 "\xcc\xee\xed\xe5\xf2\xee\xef\xf0\xe8\xe5\xec\xed\xe8\xea_22" // "Монетоприемник_22" +#define sO_CoinSlot_35 "\xcc\xee\xed\xe5\xf2\xee\xef\xf0\xe8\xe5\xec\xed\xe8\xea_35" // "Монетоприемник_35" +#define sO_Bridge "\xcc\xee\xf1\xf2" // "Мост" +#define sO_Fly_12 "\xcc\xf3\xf5\xe0_12" // "Муха_12" +#define sO_Fly_17 "\xcc\xf3\xf5\xe0_17" // "Муха_17" +#define sO_OnTheFloor "\xcd\xe0 \xef\xee\xeb\xf3" // "На полу" +#define sO_OnTheSpring "\xcd\xe0 \xef\xf0\xf3\xe6\xe8\xed\xe5" // "На пружине" +#define sO_OnTheTable "\xcd\xe0 \xf1\xf2\xee\xeb\xe5" // "На столе" +#define sO_OnStool "\xcd\xe0 \xf2\xe0\xe1\xf3\xf0\xe5\xf2\xea\xe5" // "На табуретке" +#define sO_ "\xcd\xe0\xe4\xf3\xe2\xe0\xf2\xe5\xeb\xfc" // "Надуватель" +#define sO_NotTaken "\xcd\xe5 \xe2\xe7\xff\xf2" // "Не взят" +#define sO_NotHanging "\xcd\xe5 \xe2\xe8\xf1\xe8\xf2" // "Не висит" +#define sO_NotGrown "\xcd\xe5 \xe2\xfb\xf0\xee\xf1" // "Не вырос" +#define sO_ "\xcd\xe5 \xea\xee\xeb\xee\xeb \xff\xe9\xf6\xee" // "Не колол яйцо" +#define sO_ "\xcd\xe5 \xed\xe0\xe9\xe4\xe5\xed\xee \xe8\xec\xff \xef\xee \xed\xee\xec\xe5\xf0\xf3 " // "Не найдено имя по номеру " +#define sO_ "\xcd\xe5\xe4\xee\xf1\xf2\xf3\xef\xed\xe0" // "Недоступна" +#define sO_ "\xcd\xe5\xeb\xfc\xe7\xff \xe2\xe7\xff\xf2\xfc" // "Нельзя взять" +#define sO_No "\xcd\xe5\xf2" // "Нет" +#define sO_LowerHatch_23 "\xcd\xe8\xe6\xed\xe8\xe9 \xeb\xfe\xea_23" // "Нижний люк_23" +#define sO_LowerPipe "\xcd\xe8\xe6\xed\xff\xff \xf2\xf0\xf3\xe1\xe0" // "Нижняя труба" +#define sO_LowerPipe_21 "\xcd\xe8\xe6\xed\xff\xff \xf2\xf0\xf3\xe1\xe0_21" // "Нижняя труба_21" +#define sO_WantsNothing "\xcd\xe8\xf7\xe5\xe3\xee \xed\xe5 \xf5\xee\xf7\xe5\xf2" // "Ничего не хочет" +#define sO_ "\xcd\xee\xf0\xea\xe0 \xea\xee\xe7\xff\xe2\xea\xe8" // "Норка козявки" +#define sO_Sock_26 "\xcd\xee\xf1\xee\xea_26" // "Носок_26" +#define sO_ "\xce\xf1\xfc \xf7\xe0\xf1\xee\xe2" // "Ось часов" +#define sO_Opened "\xce\xf2\xea\xf0\xfb\xf2" // "Открыт" +#define sO_OpenedWithBoot "\xce\xf2\xea\xf0\xfb\xf2\xe0 \xf1 \xe1\xee\xf2\xe8\xed\xea\xee\xec" // "Открыта с ботинком" +#define sO_OpenedShe "\xce\xf2\xea\xf0\xfb\xf2\xe0" // "Открыта" +#define sO_ "\xce\xf2\xec\xee\xf0\xee\xe6\xe5\xed\xed\xfb\xe9" // "Отмороженный" +#define sO_ "\xce\xf2\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Отсутствует" +#define sO_Error "\xce\xf8\xe8\xe1\xea\xe0" // "Ошибка" +#define sO_Passive "\xcf\xe0\xf1\xf1\xe8\xe2\xed\xe0" // "Пассивна" +#define sO_First "\xcf\xe5\xf0\xe2\xfb\xe9" // "Первый" +#define sO_UpsideDown "\xcf\xe5\xf0\xe5\xe2\xe5\xf0\xed\xf3\xf2\xe0" // "Перевернута" +#define sO_Overfull "\xcf\xe5\xf0\xe5\xef\xee\xeb\xed\xe5\xed" // "Переполнен" +#define sO_ "\xcf\xee\xe6\xe0\xf0\xed\xe8\xea" // "Пожарник" +#define sO_ "\xcf\xee\xea\xe0\xe7\xfb\xe2\xe0\xe5\xf2 \xef\xff\xf2\xea\xf3" // "Показывает пятку" +#define sO_FullPipe "\xcf\xee\xeb\xed\xe0\xff \xd2\xf0\xf3\xe1\xe0" // "Полная Труба" +#define sO_RightStairs_9 "\xcf\xf0\xe0\xe2\xe0\xff \xeb\xe5\xf1\xf2\xed\xe8\xf6\xe0_9" // "Правая лестница_9" +#define sO_RightPipe_17 "\xcf\xf0\xe0\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_17" // "Правая труба_17" +#define sO_Present "\xcf\xf0\xe8\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Присутствует" +#define sO_SwallenEgg "\xcf\xf0\xee\xe3\xeb\xee\xf7\xe5\xed\xed\xee\xe5 \xff\xe9\xf6\xee" // "Проглоченное яйцо" +#define sO_SwallenEggs "\xcf\xf0\xee\xe3\xeb\xee\xf7\xe5\xed\xed\xfb\xe5 \xff\xe9\xf6\xe0" // "Проглоченные яйца" +#define sO_ "\xcf\xf3\xe7\xee\xe4\xf3\xe2" // "Пузодув" +#define sO_Empty "\xcf\xf3\xf1\xf2" // "Пуст" +#define sO_EmptyShe "\xcf\xf3\xf1\xf2\xe0\xff" // "Пустая" +#define sO_ "\xcf\xf3\xf2\xfc \xea \xf2\xf0\xf3\xe1\xe5" // "Путь к трубе" +#define sO_Drinking "\xcf\xfc\xe5\xf2" // "Пьет" +#define sO_BrokenInPieces "\xd0\xe0\xe7\xe1\xe8\xf2\xe0" // "Разбита" +#define sO_ "\xd0\xe0\xe7\xe1\xeb\xee\xea\xe8\xf0\xee\xe2\xe0\xed" // "Разблокирован" +#define sO_ "\xd0\xe0\xe7\xe2\xe5\xf0\xed\xf3\xf2" // "Развернут" +#define sO_ "\xd0\xee\xf2\xee\xf5\xf0\xf3\xf1" // "Ротохрус" +#define sO_ "\xd0\xf3\xea\xe0 \xc1\xe8\xeb\xe5\xf2\xe5\xf0\xf8\xe8" // "Рука Билетерши" +#define sO_ "\xd0\xf3\xea\xee\xff\xf2\xea\xe0 \xf0\xfb\xf7\xe0\xe3\xe0_23" // "Рукоятка рычага_23" +#define sO_ "\xd0\xf3\xf7\xea\xe0 \xee\xf2 \xf7\xe0\xf1\xee\xe2" // "Ручка от часов" +#define sO_Lever_23 "\xd0\xfb\xf7\xe0\xe3_23" // "Рычаг_23" +#define sO_WithDudeOnLeft "\xd1 \xc4\xff\xe4\xe5\xe9 \xf1\xeb\xe5\xe2\xe0" // "С Дядей слева" +#define sO_WithDudeOnRight "\xd1 \xc4\xff\xe4\xe5\xe9 \xf1\xef\xf0\xe0\xe2\xe0" // "С Дядей справа" +#define sO_WithBoot "\xd1 \xe1\xe0\xf8\xec\xe0\xea\xee\xec" // "С башмаком" +#define sO_WithBig "\xd1 \xe1\xee\xeb\xfc\xf8\xe8\xec" // "С большим" +#define sO_WithPlunger "\xd1 \xe2\xe0\xed\xf2\xf3\xe7\xee\xec" // "С вантузом" +#define sO_ "\xd1 \xe3\xee\xf0\xf8\xea\xee\xec" // "С горшком" +#define sO_WithGum "\xd1 \xe6\xe2\xe0\xf7\xea\xee\xe9" // "С жвачкой" +#define sO_ "\xd1 \xeb\xee\xef\xe0\xf2\xee\xe9" // "С лопатой" +#define sO_ "\xd1 \xec\xe0\xeb\xfb\xec" // "С малым" +#define sO_WithHammer "\xd1 \xec\xee\xeb\xee\xf2\xea\xee\xec" // "С молотком" +#define sO_WithCoin "\xd1 \xec\xee\xed\xe5\xf2\xee\xe9" // "С монетой" +#define sO_WithSock "\xd1 \xed\xee\xf1\xea\xee\xec" // "С носком" +#define sO_ "\xd1 \xef\xf0\xee\xe1\xea\xee\xe9" // "С пробкой" +#define sO_ "\xd1 \xf0\xf3\xeb\xe5\xec" // "С рулем" +#define sO_WithHandle "\xd1 \xf0\xf3\xf7\xea\xee\xe9" // "С ручкой" +#define sO_WithApple "\xd1 \xff\xe1\xeb\xee\xea\xee\xec" // "С яблоком" +#define sO_WithBox "\xd1 \xff\xf9\xe8\xea\xee\xec" // "С ящиком" +#define sO_Sugar "\xd1\xe0\xf5\xe0\xf0\xee\xea" // "Сахарок" +#define sO_ "\xd1\xe2\xe5\xf0\xed\xf3\xf2" // "Свернут" +#define sO_Sitting "\xd1\xe8\xe4\xe8\xf2" // "Сидит" +#define sO_Laughing "\xd1\xec\xe5\xe5\xf2\xf1\xff" // "Смеется" +#define sO_ "\xd1\xee \xe2\xf1\xe5\xec\xe8" // "Со всеми" +#define sO_ "\xd1\xee \xf8\xe2\xe0\xe1\xf0\xee\xe9" // "Со шваброй" +#define sO_ "\xd1\xee \xf8\xeb\xe0\xed\xe3\xee\xec" // "Со шлангом" +#define sO_ "\xd1\xee \xf9\xe5\xf2\xea\xee\xe9" // "Со щеткой" +#define sO_Sleeping "\xd1\xef\xe8\xf2" // "Спит" +#define sO_OnRight "\xd1\xef\xf0\xe0\xe2\xe0" // "Справа" +#define sO_ "\xd1\xf2\xee\xe8\xf2 \xe2 \xe1\xee\xf2\xe8\xed\xea\xe0\xf5" // "Стоит в ботинках" +#define sO_ "\xd1\xf2\xee\xe8\xf2 \xe2 \xf3\xe3\xeb\xf3" // "Стоит в углу" +#define sO_Guardian "\xd1\xf2\xee\xf0\xee\xe6" // "Сторож" +#define sO_Guard_1 "\xd1\xf2\xf0\xe0\xe6 1" // "Страж 1" +#define sO_Gurad_2 "\xd1\xf2\xf0\xe0\xe6 2" // "Страж 2" +#define sO_Guard_3 "\xd1\xf2\xf0\xe0\xe6 3" // "Страж 3" +#define sO_Stool_34 "\xd2\xe0\xe1\xf3\xf0\xe5\xf2_34" // "Табурет_34" +#define sO_Pipe_9 "\xd2\xf0\xf3\xe1\xe0_9" // "Труба_9" +#define sO_ "\xd2\xf3\xec\xe1\xe0_16" // "Тумба_16" +#define sO_ "\xd2\xf3\xec\xe1\xe0_17" // "Тумба_17" +#define sO_ "\xd2\xf3\xec\xe1\xe0_33" // "Тумба_33" +#define sO_ "\xd3 \xc4\xff\xe4\xe8 \xed\xe0 \xeb\xe5\xf1\xf2\xed\xe8\xf6\xe5" // "У Дяди на лестнице" +#define sO_ "\xd3 \xc4\xff\xe4\xe8" // "У Дяди" +#define sO_ "\xd3 \xf2\xf0\xf3\xe1\xfb \xf1 \xf2\xe0\xe1\xf3\xf0\xe5\xf2\xea\xee\xe9" // "У трубы с табуреткой" +#define sO_ "\xd3 \xf2\xf0\xf3\xe1\xfb" // "У трубы" +#define sO_ "\xd3\xe1\xee\xf0\xf9\xe8\xea\xe8" // "Уборщики" +#define sO_ "\xd3\xe1\xee\xf0\xf9\xe8\xf6\xe0" // "Уборщица" +#define sO_ "\xd3\xe5\xf5\xe0\xeb\xe0" // "Уехала" +#define sO_ "\xd3\xef\xe0\xeb \xf0\xe0\xe7" // "Упал раз" +#define sO_ "\xd3\xef\xe0\xeb\xe0 \xf9\xe5\xf2\xea\xe0" // "Упала щетка" +#define sO_ScratchingBelly "\xd7\xe5\xf8\xe5\xf2 \xef\xf3\xe7\xee" // "Чешет пузо" +#define sO_Level0 "\xdd\xf2\xe0\xe6 0" // "Этаж 0" +#define sO_Level1 "\xdd\xf2\xe0\xe6 1" // "Этаж 1" +#define sO_Level2 "\xdd\xf2\xe0\xe6 2" // "Этаж 2" +#define sO_Level3 "\xdd\xf2\xe0\xe6 3" // "Этаж 3" +#define sO_Level4 "\xdd\xf2\xe0\xe6 4" // "Этаж 4" +#define sO_Level5 "\xdd\xf2\xe0\xe6 5" // "Этаж 5" +#define sO_Level6 "\xdd\xf2\xe0\xe6 6" // "Этаж 6" +#define sO_Level7 "\xdd\xf2\xe0\xe6 7" // "Этаж 7" +#define sO_Level8 "\xdd\xf2\xe0\xe6 8" // "Этаж 8" +#define sO_Level9 "\xdd\xf2\xe0\xe6 9" // "Этаж 9" +#define sO_ "\xdf\xe9\xf6\xe5\xe3\xeb\xee\xf2 \xee\xf2\xe4\xe0\xeb \xec\xee\xed\xe5\xf2\xf3" // "Яйцеглот отдал монету" +#define sO_ "\xdf\xe9\xf6\xe5\xe3\xeb\xee\xf2" // "Яйцеглот" +#define sO_ "\xdf\xe9\xf6\xe5\xea\xee\xeb" // "Яйцекол" +#define sO_ "\xdf\xe9\xf6\xee \xed\xe5 \xed\xe5\xf1\xe5\xf2" // "Яйцо не несет" +#define sO_Egg1 "\xdf\xe9\xf6\xee1" // "Яйцо1" +#define sO_Egg2 "\xdf\xe9\xf6\xee2" // "Яйцо2" +#define sO_Egg3 "\xdf\xe9\xf6\xee3" // "Яйцо3" -- cgit v1.2.3 From 392093124bc820b2f910b7e76a31a85847c75496 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 3 May 2013 20:51:28 +0300 Subject: FULLPIPE: translated rest of the object names --- engines/fullpipe/objectnames.h | 167 ++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 84 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h index a952002e8e..75c382bb66 100644 --- a/engines/fullpipe/objectnames.h +++ b/engines/fullpipe/objectnames.h @@ -22,17 +22,17 @@ // This file is used in order to avoid usage of constants in Russian accross the code -#define sO_ "\xc1\xe0\xe1\xf3\xeb\xff" // "Бабуля" +#define sO_Grandma "\xc1\xe0\xe1\xf3\xeb\xff" // "Бабуля" #define sO_Pool "\xc1\xe0\xf1\xf1\xe5\xe9\xed" // "Бассейн" -#define sO_ "\xc1\xe0\xf2\xf3\xf2\xe0" // "Батута" +#define sO_TumyTrampie "\xc1\xe0\xf2\xf3\xf2\xe0" // "Батута" #define sO_WithoutBoot "\xc1\xe5\xe7 \xe1\xee\xf2\xe8\xed\xea\xe0" // "Без ботинка" -#define sO_ "\xc1\xe5\xe7 \xe3\xee\xf0\xf8\xea\xee\xe2" // "Без горшков" -#define sO_ "\xc1\xe5\xe7 \xea\xee\xe2\xf0\xe8\xea\xe0" // "Без коврика" +#define sO_WithoutJug "\xc1\xe5\xe7 \xe3\xee\xf0\xf8\xea\xee\xe2" // "Без горшков" +#define sO_WithoutCarpet "\xc1\xe5\xe7 \xea\xee\xe2\xf0\xe8\xea\xe0" // "Без коврика" #define sO_WithoutCoin "\xc1\xe5\xe7 \xec\xee\xed\xe5\xf2\xfb" // "Без монеты" #define sO_WithNothing "\xc1\xe5\xe7 \xed\xe8\xf7\xe5\xe3\xee" // "Без ничего" #define sO_WithoutHandle "\xc1\xe5\xe7 \xf0\xf3\xf7\xea\xe8" // "Без ручки" #define sO_WithoutStool "\xc1\xe5\xe7 \xf2\xe0\xe1\xf3\xf0\xe5\xf2\xea\xe8" // "Без табуретки" -#define sO_WithoutBox "\xc1\xe5\xe7 \xff\xf9\xe8\xea\xe0" // "Без ящика" +#define sO_WithoutDrawer "\xc1\xe5\xe7 \xff\xf9\xe8\xea\xe0" // "Без ящика" #define sO_Blocked "\xc1\xeb\xee\xea\xe8\xf0\xee\xe2\xe0\xed" // "Блокирован" #define sO_BlockedShe "\xc1\xeb\xee\xea\xe8\xf0\xee\xe2\xe0\xed\xe0" // "Блокирована" #define sO_Awaken "\xc1\xee\xe4\xf0\xf1\xf2\xe2\xf3\xe5\xf2" // "Бодрствует" @@ -41,10 +41,10 @@ #define sO_InSmokeRoom "\xc2 \xea\xf3\xf0\xe8\xeb\xea\xe5" // "В курилке" #define sO_InSock "\xc2 \xed\xee\xf1\xea\xe5" // "В носке" #define sO_InGlasses "\xc2 \xee\xf7\xea\xe0\xf5" // "В очках" -#define sO_ "\xc2_14" // "В_14" -#define sO_ "\xc2_32 \xeb\xe5\xe6\xe8\xf2" // "В_32 лежит" -#define sO_ "\xc2_32 \xf2\xee\xf0\xf7\xe8\xf2" // "В_32 торчит" -#define sO_ "\xc2_7" // "В_7" +#define sO_V_14 "\xc2_14" // "В_14" +#define sO_V_32_Lies "\xc2_32 \xeb\xe5\xe6\xe8\xf2" // "В_32 лежит" +#define sO_V_32_Stands "\xc2_32 \xf2\xee\xf0\xf7\xe8\xf2" // "В_32 торчит" +#define sO_V_7 "\xc2_7" // "В_7" #define sO_Valve1_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc1_26" // "Вентиль1_26" #define sO_Valve2_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc2_26" // "Вентиль2_26" #define sO_Valve3_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc3_26" // "Вентиль3_26" @@ -53,26 +53,26 @@ #define sO_Valve_34 "\xc2\xe5\xed\xf2\xe8\xeb\xfc_34" // "Вентиль_34" #define sO_UpperHatch_23 "\xc2\xe5\xf0\xf5\xed\xe8\xe9 \xeb\xfe\xea_23" // "Верхний люк_23" #define sO_Taken "\xc2\xe7\xff\xf2" // "Взят" -#define sO_ "\xc2\xe8\xf1\xe8\xf2 \xed\xe0 \xf2\xf0\xf3\xe1\xe5" // "Висит на трубе" +#define sO_HangsOnPipe "\xc2\xe8\xf1\xe8\xf2 \xed\xe0 \xf2\xf0\xf3\xe1\xe5" // "Висит на трубе" #define sO_On "\xc2\xea\xeb" // "Вкл" #define sO_TurnedOn "\xc2\xea\xeb\xfe\xf7\xe5\xed" // "Включен" -#define sO_ "\xc2\xf3\xe3\xeb\xf3\xf1\xe5\xe4" // "Вуглусед" +#define sO_HareTheNooksiter "\xc2\xf3\xe3\xeb\xf3\xf1\xe5\xe4" // "Вуглусед" #define sO_Off "\xc2\xfb\xea\xeb" // "Выкл" -#define sO_ "\xc2\xfb\xea\xeb\xfe\xf7\xe5\xed" // "Выключен" -#define sO_ "\xc2\xfb\xf0\xee\xf1" // "Вырос" -#define sO_ "\xc3\xeb\xe0\xe2\xe0\xf0\xfc" // "Главарь" -#define sO_ "\xc3\xee\xf0\xf8\xee\xea" // "Горшок" -#define sO_ "\xc3\xf3\xeb\xff\xe5\xf2" // "Гуляет" +#define sO_TurnedOff "\xc2\xfb\xea\xeb\xfe\xf7\xe5\xed" // "Выключен" +#define sO_HasGrown "\xc2\xfb\xf0\xee\xf1" // "Вырос" +#define sO_Boss "\xc3\xeb\xe0\xe2\xe0\xf0\xfc" // "Главарь" +#define sO_Jug "\xc3\xee\xf0\xf8\xee\xea" // "Горшок" +#define sO_Strolling "\xc3\xf3\xeb\xff\xe5\xf2" // "Гуляет" #define sO_Yes "\xc4\xe0" // "Да" -#define sO_ "\xc4\xe5\xe2\xee\xf7\xea\xe0" // "Девочка" -#define sO_ "\xc4\xe5\xe2\xee\xf7\xea\xe0-\xf1\xeb\xee\xed\xe8\xea" // "Девочка-слоник" -#define sO_ "\xc4\xe5\xe4\xf3\xf8\xea\xe0" // "Дедушка" -#define sO_ "\xc4\xee\xf1\xea\xe0_25" // "Доска_25" -#define sO_ "\xc4\xee\xf1\xea\xe0_34" // "Доска_34" -#define sO_ "\xc4\xff\xe4\xff \xef\xf0\xfb\xe3\xe0\xeb" // "Дядя прыгал" +#define sO_Girl "\xc4\xe5\xe2\xee\xf7\xea\xe0" // "Девочка" +#define sO_Elephantine "\xc4\xe5\xe2\xee\xf7\xea\xe0-\xf1\xeb\xee\xed\xe8\xea" // "Девочка-слоник" +#define sO_Grandpa "\xc4\xe5\xe4\xf3\xf8\xea\xe0" // "Дедушка" +#define sO_Plank_25 "\xc4\xee\xf1\xea\xe0_25" // "Доска_25" +#define sO_Plank_34 "\xc4\xee\xf1\xea\xe0_34" // "Доска_34" +#define sO_DudeJumped "\xc4\xff\xe4\xff \xef\xf0\xfb\xe3\xe0\xeb" // "Дядя прыгал" #define sO_Dude "\xc4\xff\xe4\xff" // "Дядя" -#define sO_ "\xc4\xff\xe4\xff-\xff\xf9\xe8\xea" // "Дядя-ящик" -#define sO_ "\xc4\xff\xe4\xff_\xea\xe0\xf2\xe0\xeb\xf1\xff" // "Дядя_катался" +#define sO_GuvTheDrawer "\xc4\xff\xe4\xff-\xff\xf9\xe8\xea" // "Дядя-ящик" +#define sO_DudeSwinged "\xc4\xff\xe4\xff_\xea\xe0\xf2\xe0\xeb\xf1\xff" // "Дядя_катался" #define sO_Eats "\xc5\xf1\xf2" // "Ест" #define sO_Present "\xc5\xf1\xf2\xfc" // "Есть" #define sO_CloseThing1 "\xc7\xe0\xea\xf0\xfb\xe2\xe0\xe5\xec\xee\xe5 1" // "Закрываемое 1" @@ -82,32 +82,32 @@ #define sO_Closed "\xc7\xe0\xea\xf0\xfb\xf2" // "Закрыт" #define sO_ClosedWithBoot "\xc7\xe0\xea\xf0\xfb\xf2\xe0 \xf1 \xe1\xee\xf2\xe8\xed\xea\xee\xec" // "Закрыта с ботинком" #define sO_ClosedShe "\xc7\xe0\xea\xf0\xfb\xf2\xe0" // "Закрыта" -#define sO_ "\xc7\xe0\xef\xee\xeb\xed\xe5\xed \xed\xe0\xef\xee\xeb\xee\xe2\xe8\xed\xf3" // "Заполнен наполовину" -#define sO_ "\xc7\xe0\xef\xee\xeb\xed\xe5\xed \xf6\xe5\xeb\xe8\xea\xee\xec" // "Заполнен целиком" +#define sO_HalfFull "\xc7\xe0\xef\xee\xeb\xed\xe5\xed \xed\xe0\xef\xee\xeb\xee\xe2\xe8\xed\xf3" // "Заполнен наполовину" +#define sO_Full "\xc7\xe0\xef\xee\xeb\xed\xe5\xed \xf6\xe5\xeb\xe8\xea\xee\xec" // "Заполнен целиком" #define sO_MirroredTo "\xc7\xe5\xf0\xea\xe0\xeb\xfc\xed\xe0\xff \xea" // "Зеркальная к" #define sO_Playing "\xc8\xe3\xf0\xe0\xe5\xf2" // "Играет" #define sO_Cactus "\xca\xe0\xea\xf2\xf3\xf1" // "Кактус" #define sO_SwingingWithBoot "\xca\xe0\xf2\xe0\xe5\xf2\xf1\xff \xf1 \xe1\xee\xf2\xe8\xed\xea\xee\xec" // "Катается с ботинком" #define sO_Swinging "\xca\xe0\xf2\xe0\xe5\xf2\xf1\xff" // "Катается" -#define sO_ "\xca\xe0\xf7\xe5\xeb\xe5\xed\xff" // "Качеленя" +#define sO_Swingie "\xca\xe0\xf7\xe5\xeb\xe5\xed\xff" // "Качеленя" #define sO_LiftButtons "\xca\xed\xee\xef\xea\xe8 \xeb\xe8\xf4\xf2\xe0" // "Кнопки лифта" -#define sO_ "\xca\xee\xe2\xf0\xe8\xea_35" // "Коврик_35" +#define sO_Carpet_35 "\xca\xee\xe2\xf0\xe8\xea_35" // "Коврик_35" #define sO_Valve_35 "\xca\xf0\xe0\xed_35" // "Кран_35" #define sO_Cup "\xca\xf0\xf3\xe6\xea\xe0" // "Кружка" -#define sO_ "\xca\xf3\xe1\xe8\xea" // "Кубик" +#define sO_Cube "\xca\xf3\xe1\xe8\xea" // "Кубик" #define sO_LeftPipe_15 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_15" // "Левая труба_15" #define sO_LeftPipe_26 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_26" // "Левая труба_26" #define sO_LeftPipe_29 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_29" // "Левая труба_29" #define sO_LeftPipe_30 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_30" // "Левая труба_30" #define sO_LeftPipe_37 "\xcb\xe5\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_37" // "Левая труба_37" -#define sO_ "\xcb\xe5\xf1\xf2\xed\xe8\xf6\xe0 \xe2\xed\xe8\xe7_24" // "Лестница вниз_24" -#define sO_ "\xcb\xe5\xf1\xf2\xed\xe8\xf6\xe0 \xf1\xe2\xe5\xf0\xf5\xf3_8" // "Лестница сверху_8" +#define sO_StarsDown_24 "\xcb\xe5\xf1\xf2\xed\xe8\xf6\xe0 \xe2\xed\xe8\xe7_24" // "Лестница вниз_24" +#define sO_StairsUp_8 "\xcb\xe5\xf1\xf2\xed\xe8\xf6\xe0 \xf1\xe2\xe5\xf0\xf5\xf3_8" // "Лестница сверху_8" #define sO_Stairway "\xcb\xe5\xf1\xf2\xed\xe8\xf6\xe0" // "Лестница" -#define sO_ "\xcb\xe5\xf2\xf3\xed\xfb" // "Летуны" +#define sO_Fliers "\xcb\xe5\xf2\xf3\xed\xfb" // "Летуны" #define sO_Hatch_26 "\xcb\xfe\xea_26" // "Люк_26" #define sO_Hatch_34 "\xcb\xfe\xea_34" // "Люк_34" -#define sO_ "\xcc\xe0\xec\xe0 \xf0\xf3\xf7\xea\xe8_32" // "Мама ручки_32" -#define sO_ "\xcc\xe0\xec\xe0\xf8\xe0" // "Мамаша" +#define sO_MommyOfHand_32 "\xcc\xe0\xec\xe0 \xf0\xf3\xf7\xea\xe8_32" // "Мама ручки_32" +#define sO_BigMumsy "\xcc\xe0\xec\xe0\xf8\xe0" // "Мамаша" #define sO_Bag_22 "\xcc\xe5\xf8\xee\xea_22" // "Мешок_22" #define sO_CoinSlot_1 "\xcc\xee\xed\xe5\xf2\xee\xef\xf0\xe8\xe5\xec\xed\xe8\xea 1" // "Монетоприемник 1" #define sO_CoinSlot_22 "\xcc\xee\xed\xe5\xf2\xee\xef\xf0\xe8\xe5\xec\xed\xe8\xea_22" // "Монетоприемник_22" @@ -119,100 +119,99 @@ #define sO_OnTheSpring "\xcd\xe0 \xef\xf0\xf3\xe6\xe8\xed\xe5" // "На пружине" #define sO_OnTheTable "\xcd\xe0 \xf1\xf2\xee\xeb\xe5" // "На столе" #define sO_OnStool "\xcd\xe0 \xf2\xe0\xe1\xf3\xf0\xe5\xf2\xea\xe5" // "На табуретке" -#define sO_ "\xcd\xe0\xe4\xf3\xe2\xe0\xf2\xe5\xeb\xfc" // "Надуватель" +#define sO_Inflater "\xcd\xe0\xe4\xf3\xe2\xe0\xf2\xe5\xeb\xfc" // "Надуватель" #define sO_NotTaken "\xcd\xe5 \xe2\xe7\xff\xf2" // "Не взят" #define sO_NotHanging "\xcd\xe5 \xe2\xe8\xf1\xe8\xf2" // "Не висит" #define sO_NotGrown "\xcd\xe5 \xe2\xfb\xf0\xee\xf1" // "Не вырос" -#define sO_ "\xcd\xe5 \xea\xee\xeb\xee\xeb \xff\xe9\xf6\xee" // "Не колол яйцо" -#define sO_ "\xcd\xe5 \xed\xe0\xe9\xe4\xe5\xed\xee \xe8\xec\xff \xef\xee \xed\xee\xec\xe5\xf0\xf3 " // "Не найдено имя по номеру " -#define sO_ "\xcd\xe5\xe4\xee\xf1\xf2\xf3\xef\xed\xe0" // "Недоступна" -#define sO_ "\xcd\xe5\xeb\xfc\xe7\xff \xe2\xe7\xff\xf2\xfc" // "Нельзя взять" +#define sO_NotCrackedEggs "\xcd\xe5 \xea\xee\xeb\xee\xeb \xff\xe9\xf6\xee" // "Не колол яйцо" +#define sO_NotAvailable "\xcd\xe5\xe4\xee\xf1\xf2\xf3\xef\xed\xe0" // "Недоступна" +#define sO_CannotTake "\xcd\xe5\xeb\xfc\xe7\xff \xe2\xe7\xff\xf2\xfc" // "Нельзя взять" #define sO_No "\xcd\xe5\xf2" // "Нет" #define sO_LowerHatch_23 "\xcd\xe8\xe6\xed\xe8\xe9 \xeb\xfe\xea_23" // "Нижний люк_23" #define sO_LowerPipe "\xcd\xe8\xe6\xed\xff\xff \xf2\xf0\xf3\xe1\xe0" // "Нижняя труба" #define sO_LowerPipe_21 "\xcd\xe8\xe6\xed\xff\xff \xf2\xf0\xf3\xe1\xe0_21" // "Нижняя труба_21" #define sO_WantsNothing "\xcd\xe8\xf7\xe5\xe3\xee \xed\xe5 \xf5\xee\xf7\xe5\xf2" // "Ничего не хочет" -#define sO_ "\xcd\xee\xf0\xea\xe0 \xea\xee\xe7\xff\xe2\xea\xe8" // "Норка козявки" +#define sO_FriesPit "\xcd\xee\xf0\xea\xe0 \xea\xee\xe7\xff\xe2\xea\xe8" // "Норка козявки" #define sO_Sock_26 "\xcd\xee\xf1\xee\xea_26" // "Носок_26" -#define sO_ "\xce\xf1\xfc \xf7\xe0\xf1\xee\xe2" // "Ось часов" +#define sO_ClockAxis "\xce\xf1\xfc \xf7\xe0\xf1\xee\xe2" // "Ось часов" #define sO_Opened "\xce\xf2\xea\xf0\xfb\xf2" // "Открыт" #define sO_OpenedWithBoot "\xce\xf2\xea\xf0\xfb\xf2\xe0 \xf1 \xe1\xee\xf2\xe8\xed\xea\xee\xec" // "Открыта с ботинком" #define sO_OpenedShe "\xce\xf2\xea\xf0\xfb\xf2\xe0" // "Открыта" -#define sO_ "\xce\xf2\xec\xee\xf0\xee\xe6\xe5\xed\xed\xfb\xe9" // "Отмороженный" -#define sO_ "\xce\xf2\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Отсутствует" +#define sO_WeirdWacko "\xce\xf2\xec\xee\xf0\xee\xe6\xe5\xed\xed\xfb\xe9" // "Отмороженный" +#define sO_NotFound "\xce\xf2\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Отсутствует" #define sO_Error "\xce\xf8\xe8\xe1\xea\xe0" // "Ошибка" #define sO_Passive "\xcf\xe0\xf1\xf1\xe8\xe2\xed\xe0" // "Пассивна" #define sO_First "\xcf\xe5\xf0\xe2\xfb\xe9" // "Первый" #define sO_UpsideDown "\xcf\xe5\xf0\xe5\xe2\xe5\xf0\xed\xf3\xf2\xe0" // "Перевернута" #define sO_Overfull "\xcf\xe5\xf0\xe5\xef\xee\xeb\xed\xe5\xed" // "Переполнен" -#define sO_ "\xcf\xee\xe6\xe0\xf0\xed\xe8\xea" // "Пожарник" -#define sO_ "\xcf\xee\xea\xe0\xe7\xfb\xe2\xe0\xe5\xf2 \xef\xff\xf2\xea\xf3" // "Показывает пятку" +#define sO_Fireman "\xcf\xee\xe6\xe0\xf0\xed\xe8\xea" // "Пожарник" +#define sO_ShowingHeel "\xcf\xee\xea\xe0\xe7\xfb\xe2\xe0\xe5\xf2 \xef\xff\xf2\xea\xf3" // "Показывает пятку" #define sO_FullPipe "\xcf\xee\xeb\xed\xe0\xff \xd2\xf0\xf3\xe1\xe0" // "Полная Труба" #define sO_RightStairs_9 "\xcf\xf0\xe0\xe2\xe0\xff \xeb\xe5\xf1\xf2\xed\xe8\xf6\xe0_9" // "Правая лестница_9" #define sO_RightPipe_17 "\xcf\xf0\xe0\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_17" // "Правая труба_17" #define sO_Present "\xcf\xf0\xe8\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Присутствует" -#define sO_SwallenEgg "\xcf\xf0\xee\xe3\xeb\xee\xf7\xe5\xed\xed\xee\xe5 \xff\xe9\xf6\xee" // "Проглоченное яйцо" -#define sO_SwallenEggs "\xcf\xf0\xee\xe3\xeb\xee\xf7\xe5\xed\xed\xfb\xe5 \xff\xe9\xf6\xe0" // "Проглоченные яйца" -#define sO_ "\xcf\xf3\xe7\xee\xe4\xf3\xe2" // "Пузодув" +#define sO_GulpedEgg "\xcf\xf0\xee\xe3\xeb\xee\xf7\xe5\xed\xed\xee\xe5 \xff\xe9\xf6\xee" // "Проглоченное яйцо" +#define sO_GulpedEggs "\xcf\xf0\xee\xe3\xeb\xee\xf7\xe5\xed\xed\xfb\xe5 \xff\xe9\xf6\xe0" // "Проглоченные яйца" +#define sO_BellyInflater "\xcf\xf3\xe7\xee\xe4\xf3\xe2" // "Пузодув" #define sO_Empty "\xcf\xf3\xf1\xf2" // "Пуст" #define sO_EmptyShe "\xcf\xf3\xf1\xf2\xe0\xff" // "Пустая" -#define sO_ "\xcf\xf3\xf2\xfc \xea \xf2\xf0\xf3\xe1\xe5" // "Путь к трубе" +#define sO_WayToPipe "\xcf\xf3\xf2\xfc \xea \xf2\xf0\xf3\xe1\xe5" // "Путь к трубе" #define sO_Drinking "\xcf\xfc\xe5\xf2" // "Пьет" #define sO_BrokenInPieces "\xd0\xe0\xe7\xe1\xe8\xf2\xe0" // "Разбита" -#define sO_ "\xd0\xe0\xe7\xe1\xeb\xee\xea\xe8\xf0\xee\xe2\xe0\xed" // "Разблокирован" -#define sO_ "\xd0\xe0\xe7\xe2\xe5\xf0\xed\xf3\xf2" // "Развернут" -#define sO_ "\xd0\xee\xf2\xee\xf5\xf0\xf3\xf1" // "Ротохрус" -#define sO_ "\xd0\xf3\xea\xe0 \xc1\xe8\xeb\xe5\xf2\xe5\xf0\xf8\xe8" // "Рука Билетерши" -#define sO_ "\xd0\xf3\xea\xee\xff\xf2\xea\xe0 \xf0\xfb\xf7\xe0\xe3\xe0_23" // "Рукоятка рычага_23" -#define sO_ "\xd0\xf3\xf7\xea\xe0 \xee\xf2 \xf7\xe0\xf1\xee\xe2" // "Ручка от часов" +#define sO_Unblocked "\xd0\xe0\xe7\xe1\xeb\xee\xea\xe8\xf0\xee\xe2\xe0\xed" // "Разблокирован" +#define sO_Unfolded "\xd0\xe0\xe7\xe2\xe5\xf0\xed\xf3\xf2" // "Развернут" +#define sO_Jawcrucnher "\xd0\xee\xf2\xee\xf5\xf0\xf3\xf1" // "Ротохрус" +#define sO_UsherHand "\xd0\xf3\xea\xe0 \xc1\xe8\xeb\xe5\xf2\xe5\xf0\xf8\xe8" // "Рука Билетерши" +#define sO_LeverHandle_23 "\xd0\xf3\xea\xee\xff\xf2\xea\xe0 \xf0\xfb\xf7\xe0\xe3\xe0_23" // "Рукоятка рычага_23" +#define sO_ClockHandle "\xd0\xf3\xf7\xea\xe0 \xee\xf2 \xf7\xe0\xf1\xee\xe2" // "Ручка от часов" #define sO_Lever_23 "\xd0\xfb\xf7\xe0\xe3_23" // "Рычаг_23" #define sO_WithDudeOnLeft "\xd1 \xc4\xff\xe4\xe5\xe9 \xf1\xeb\xe5\xe2\xe0" // "С Дядей слева" #define sO_WithDudeOnRight "\xd1 \xc4\xff\xe4\xe5\xe9 \xf1\xef\xf0\xe0\xe2\xe0" // "С Дядей справа" #define sO_WithBoot "\xd1 \xe1\xe0\xf8\xec\xe0\xea\xee\xec" // "С башмаком" #define sO_WithBig "\xd1 \xe1\xee\xeb\xfc\xf8\xe8\xec" // "С большим" #define sO_WithPlunger "\xd1 \xe2\xe0\xed\xf2\xf3\xe7\xee\xec" // "С вантузом" -#define sO_ "\xd1 \xe3\xee\xf0\xf8\xea\xee\xec" // "С горшком" +#define sO_WithJug "\xd1 \xe3\xee\xf0\xf8\xea\xee\xec" // "С горшком" #define sO_WithGum "\xd1 \xe6\xe2\xe0\xf7\xea\xee\xe9" // "С жвачкой" -#define sO_ "\xd1 \xeb\xee\xef\xe0\xf2\xee\xe9" // "С лопатой" -#define sO_ "\xd1 \xec\xe0\xeb\xfb\xec" // "С малым" +#define sO_WithShovel "\xd1 \xeb\xee\xef\xe0\xf2\xee\xe9" // "С лопатой" +#define sO_WithTiny "\xd1 \xec\xe0\xeb\xfb\xec" // "С малым" #define sO_WithHammer "\xd1 \xec\xee\xeb\xee\xf2\xea\xee\xec" // "С молотком" #define sO_WithCoin "\xd1 \xec\xee\xed\xe5\xf2\xee\xe9" // "С монетой" #define sO_WithSock "\xd1 \xed\xee\xf1\xea\xee\xec" // "С носком" -#define sO_ "\xd1 \xef\xf0\xee\xe1\xea\xee\xe9" // "С пробкой" -#define sO_ "\xd1 \xf0\xf3\xeb\xe5\xec" // "С рулем" +#define sO_WithCork "\xd1 \xef\xf0\xee\xe1\xea\xee\xe9" // "С пробкой" +#define sO_WithSteering "\xd1 \xf0\xf3\xeb\xe5\xec" // "С рулем" #define sO_WithHandle "\xd1 \xf0\xf3\xf7\xea\xee\xe9" // "С ручкой" #define sO_WithApple "\xd1 \xff\xe1\xeb\xee\xea\xee\xec" // "С яблоком" -#define sO_WithBox "\xd1 \xff\xf9\xe8\xea\xee\xec" // "С ящиком" +#define sO_WithDrawer "\xd1 \xff\xf9\xe8\xea\xee\xec" // "С ящиком" #define sO_Sugar "\xd1\xe0\xf5\xe0\xf0\xee\xea" // "Сахарок" -#define sO_ "\xd1\xe2\xe5\xf0\xed\xf3\xf2" // "Свернут" +#define sO_Convoluted "\xd1\xe2\xe5\xf0\xed\xf3\xf2" // "Свернут" #define sO_Sitting "\xd1\xe8\xe4\xe8\xf2" // "Сидит" #define sO_Laughing "\xd1\xec\xe5\xe5\xf2\xf1\xff" // "Смеется" -#define sO_ "\xd1\xee \xe2\xf1\xe5\xec\xe8" // "Со всеми" -#define sO_ "\xd1\xee \xf8\xe2\xe0\xe1\xf0\xee\xe9" // "Со шваброй" -#define sO_ "\xd1\xee \xf8\xeb\xe0\xed\xe3\xee\xec" // "Со шлангом" -#define sO_ "\xd1\xee \xf9\xe5\xf2\xea\xee\xe9" // "Со щеткой" +#define sO_WithEveryone "\xd1\xee \xe2\xf1\xe5\xec\xe8" // "Со всеми" +#define sO_WithMop "\xd1\xee \xf8\xe2\xe0\xe1\xf0\xee\xe9" // "Со шваброй" +#define sO_WithHose "\xd1\xee \xf8\xeb\xe0\xed\xe3\xee\xec" // "Со шлангом" +#define sO_WithBrush "\xd1\xee \xf9\xe5\xf2\xea\xee\xe9" // "Со щеткой" #define sO_Sleeping "\xd1\xef\xe8\xf2" // "Спит" #define sO_OnRight "\xd1\xef\xf0\xe0\xe2\xe0" // "Справа" -#define sO_ "\xd1\xf2\xee\xe8\xf2 \xe2 \xe1\xee\xf2\xe8\xed\xea\xe0\xf5" // "Стоит в ботинках" -#define sO_ "\xd1\xf2\xee\xe8\xf2 \xe2 \xf3\xe3\xeb\xf3" // "Стоит в углу" +#define sO_StandsInBoots "\xd1\xf2\xee\xe8\xf2 \xe2 \xe1\xee\xf2\xe8\xed\xea\xe0\xf5" // "Стоит в ботинках" +#define sO_StandsInCorner "\xd1\xf2\xee\xe8\xf2 \xe2 \xf3\xe3\xeb\xf3" // "Стоит в углу" #define sO_Guardian "\xd1\xf2\xee\xf0\xee\xe6" // "Сторож" #define sO_Guard_1 "\xd1\xf2\xf0\xe0\xe6 1" // "Страж 1" #define sO_Gurad_2 "\xd1\xf2\xf0\xe0\xe6 2" // "Страж 2" #define sO_Guard_3 "\xd1\xf2\xf0\xe0\xe6 3" // "Страж 3" #define sO_Stool_34 "\xd2\xe0\xe1\xf3\xf0\xe5\xf2_34" // "Табурет_34" #define sO_Pipe_9 "\xd2\xf0\xf3\xe1\xe0_9" // "Труба_9" -#define sO_ "\xd2\xf3\xec\xe1\xe0_16" // "Тумба_16" -#define sO_ "\xd2\xf3\xec\xe1\xe0_17" // "Тумба_17" -#define sO_ "\xd2\xf3\xec\xe1\xe0_33" // "Тумба_33" -#define sO_ "\xd3 \xc4\xff\xe4\xe8 \xed\xe0 \xeb\xe5\xf1\xf2\xed\xe8\xf6\xe5" // "У Дяди на лестнице" -#define sO_ "\xd3 \xc4\xff\xe4\xe8" // "У Дяди" -#define sO_ "\xd3 \xf2\xf0\xf3\xe1\xfb \xf1 \xf2\xe0\xe1\xf3\xf0\xe5\xf2\xea\xee\xe9" // "У трубы с табуреткой" -#define sO_ "\xd3 \xf2\xf0\xf3\xe1\xfb" // "У трубы" -#define sO_ "\xd3\xe1\xee\xf0\xf9\xe8\xea\xe8" // "Уборщики" -#define sO_ "\xd3\xe1\xee\xf0\xf9\xe8\xf6\xe0" // "Уборщица" -#define sO_ "\xd3\xe5\xf5\xe0\xeb\xe0" // "Уехала" -#define sO_ "\xd3\xef\xe0\xeb \xf0\xe0\xe7" // "Упал раз" -#define sO_ "\xd3\xef\xe0\xeb\xe0 \xf9\xe5\xf2\xea\xe0" // "Упала щетка" +#define sO_Pedestal_16 "\xd2\xf3\xec\xe1\xe0_16" // "Тумба_16" +#define sO_Pedestal_17 "\xd2\xf3\xec\xe1\xe0_17" // "Тумба_17" +#define sO_Pedestal_33 "\xd2\xf3\xec\xe1\xe0_33" // "Тумба_33" +#define sO_NearDudesStairs "\xd3 \xc4\xff\xe4\xe8 \xed\xe0 \xeb\xe5\xf1\xf2\xed\xe8\xf6\xe5" // "У Дяди на лестнице" +#define sO_NearDude "\xd3 \xc4\xff\xe4\xe8" // "У Дяди" +#define sO_NearPipeWithStool "\xd3 \xf2\xf0\xf3\xe1\xfb \xf1 \xf2\xe0\xe1\xf3\xf0\xe5\xf2\xea\xee\xe9" // "У трубы с табуреткой" +#define sO_NearPipe "\xd3 \xf2\xf0\xf3\xe1\xfb" // "У трубы" +#define sO_Janitors "\xd3\xe1\xee\xf0\xf9\xe8\xea\xe8" // "Уборщики" +#define sO_Janitress "\xd3\xe1\xee\xf0\xf9\xe8\xf6\xe0" // "Уборщица" +#define sO_Gone "\xd3\xe5\xf5\xe0\xeb\xe0" // "Уехала" +#define sO_FallenOnce "\xd3\xef\xe0\xeb \xf0\xe0\xe7" // "Упал раз" +#define sO_FallenBrush "\xd3\xef\xe0\xeb\xe0 \xf9\xe5\xf2\xea\xe0" // "Упала щетка" #define sO_ScratchingBelly "\xd7\xe5\xf8\xe5\xf2 \xef\xf3\xe7\xee" // "Чешет пузо" #define sO_Level0 "\xdd\xf2\xe0\xe6 0" // "Этаж 0" #define sO_Level1 "\xdd\xf2\xe0\xe6 1" // "Этаж 1" @@ -224,10 +223,10 @@ #define sO_Level7 "\xdd\xf2\xe0\xe6 7" // "Этаж 7" #define sO_Level8 "\xdd\xf2\xe0\xe6 8" // "Этаж 8" #define sO_Level9 "\xdd\xf2\xe0\xe6 9" // "Этаж 9" -#define sO_ "\xdf\xe9\xf6\xe5\xe3\xeb\xee\xf2 \xee\xf2\xe4\xe0\xeb \xec\xee\xed\xe5\xf2\xf3" // "Яйцеглот отдал монету" -#define sO_ "\xdf\xe9\xf6\xe5\xe3\xeb\xee\xf2" // "Яйцеглот" -#define sO_ "\xdf\xe9\xf6\xe5\xea\xee\xeb" // "Яйцекол" -#define sO_ "\xdf\xe9\xf6\xee \xed\xe5 \xed\xe5\xf1\xe5\xf2" // "Яйцо не несет" +#define sO_EggGulperGaveCoin "\xdf\xe9\xf6\xe5\xe3\xeb\xee\xf2 \xee\xf2\xe4\xe0\xeb \xec\xee\xed\xe5\xf2\xf3" // "Яйцеглот отдал монету" +#define sO_EggGulper "\xdf\xe9\xf6\xe5\xe3\xeb\xee\xf2" // "Яйцеглот" +#define sO_EggCracker "\xdf\xe9\xf6\xe5\xea\xee\xeb" // "Яйцекол" +#define sO_NotLayingEgg "\xdf\xe9\xf6\xee \xed\xe5 \xed\xe5\xf1\xe5\xf2" // "Яйцо не несет" #define sO_Egg1 "\xdf\xe9\xf6\xee1" // "Яйцо1" #define sO_Egg2 "\xdf\xe9\xf6\xee2" // "Яйцо2" #define sO_Egg3 "\xdf\xe9\xf6\xee3" // "Яйцо3" -- cgit v1.2.3 From 94f2adb8d6966b4306c00f647d2807b6ae9a6639 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 1 Jun 2013 13:01:25 +0300 Subject: FULLPIPE: Initial stub for all classes in loadGam() --- engines/fullpipe/fullpipe.h | 5 + engines/fullpipe/objects.h | 215 +++++++++++++++++++++++++++++++++++++++ engines/fullpipe/stateloader.cpp | 39 +++++++ 3 files changed, 259 insertions(+) create mode 100644 engines/fullpipe/objects.h create mode 100644 engines/fullpipe/stateloader.cpp (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index f9b0368659..daa992bd1d 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -43,6 +43,8 @@ namespace Fullpipe { enum FullpipeGameFeatures { }; +class CGameLoader; + class FullpipeEngine : public ::Engine { protected: @@ -66,6 +68,9 @@ public: void updateEvents(); + CGameLoader *g_gameLoader; + bool loadGam(char *fname); + public: bool _isSaveAllowed; diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h new file mode 100644 index 0000000000..e96de89ea6 --- /dev/null +++ b/engines/fullpipe/objects.h @@ -0,0 +1,215 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_OBJECTS_H +#define FULLPIPE_OBJECTS_H + +namespace Fullpipe { + +class CObject { + int vmt; +}; + +class CObList { + int vmt; + int m_pNodeHead; + int m_pNodeTail; + int m_nCount; + int m_pNodeFree; + int m_pBlocks; + int m_nBlockSize; +}; + +class CObArray { + CObject obj; + int m_pData; + int m_nSize; + int m_nMaxSize; + int m_nGrowBy; +}; + +class CNode { + int pNext; + CNode *pPrev; + void *data; +}; + +class CPtrList { + CObject obj; + CNode *m_pNodeHead; + int m_pNodeTail; + int m_nCount; + int m_pNodeFree; + int m_pBlocks; + int m_nBlockSize; +}; + +class SceneTagList { + CPtrList list; +}; + +class GameProject { + CObject obj; + int field_4; + char *headerFilename; + SceneTagList *sceneTagList; + void *field_10; +}; + +class CInteractionController { + CObject obj; + CObList interactions; + int16 field_20; + char gap_22[2]; + int flag24; +}; + +class CInputControllerItemArray { + CObArray objs; +}; + +class CInputController { + CObject obj; + int flag; + int flags; + int cursorHandle; + int hCursor; + int field_14; + int cursorId; + int cursorIndex; + CInputControllerItemArray cursorsArray; + int cursorDrawX; + int cursorDrawY; + int cursorDrawWidth; + int cursorDrawHeight; + int cursorItemPicture; +}; + +class Sc2Array { + CObArray objs; +}; + +union VarValue { + int floatValue; + int intValue; + int stringValue; +}; + +class Message { + CObject obj; + int messageKind; + int16 parentId; + char gap_A[2]; + int x; + int y; + int field_14; + int sceneClickX; + int sceneClickY; + int field_20; + int field_24; + int param28; + int field_2C; + int field_30; + int field_34; +}; + +class ExCommand { + Message msg; + int messageNum; + int field_3C; + int flags; + int parId; +}; + +class CGameVar { + CObject obj; + CGameVar *nextVarObj; + CGameVar *prevVarObj; + CGameVar *parentVarObj; + CGameVar *subVars; + int field_14; + char *stringObj; + VarValue value; + int varType; +}; + +class CGameLoader { + public: + bool loadFile(char *fname); + + private: + CObject obj; + GameProject *gameProject; + CInteractionController *interactionController; + int field_C; + int field_10; + int field_14; + int field_18; + int field_1C; + int field_20; + int field_24; + int field_28; + int field_2C; + CInputController inputController; + int inventory; + int field_7C; + int field_80; + int field_84; + int field_88; + int field_8C; + int field_90; + int field_94; + int field_98; + int field_9C; + int field_A0; + int field_A4; + int field_A8; + int field_AC; + int field_B0; + int field_B4; + int field_B8; + int field_BC; + int field_C0; + int field_C4; + int field_C8; + int field_CC; + int field_D0; + int field_D4; + Sc2Array sc2array; + void *sceneSwitcher; + void *preloadCallback; + void *readSavegameCallback; + int16 field_F8; + int16 field_FA; + CObArray preloadItems; + CGameVar *gameVar; + char *gameName; + ExCommand exCommand; + int updateCounter; + int preloadId1; + int preloadId2; +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_OBJECTS_H */ + diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp new file mode 100644 index 0000000000..1959bffd47 --- /dev/null +++ b/engines/fullpipe/stateloader.cpp @@ -0,0 +1,39 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" +#include "fullpipe/objects.h" + +namespace Fullpipe { + +bool FullpipeEngine::loadGam(char *fname) { + g_gameLoader = new CGameLoader(); + + if (g_gameLoader->loadFile(fname)) { + // TODO + } else + return false; + + return true; +} + +} // End of namespace Fullpipe -- cgit v1.2.3 From fa30dcef152aab077346ecf08e5436609535ef13 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 1 Jun 2013 17:20:40 +0300 Subject: FULLPIPE: Add loader for GameProject --- engines/fullpipe/fullpipe.cpp | 2 + engines/fullpipe/fullpipe.h | 6 +- engines/fullpipe/objects.h | 119 +++++++++++++++++++++------------------ engines/fullpipe/stateloader.cpp | 63 ++++++++++++++++++++- 4 files changed, 132 insertions(+), 58 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 5be5338f86..ca430fc868 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -55,6 +55,8 @@ Common::Error FullpipeEngine::run() { _isSaveAllowed = false; + loadGam("fullpipe.gam"); + Common::Archive *arch = makeNGIArchive("3896.nl"); return Common::kNoError; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index daa992bd1d..d7bbe14795 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -69,7 +69,11 @@ public: void updateEvents(); CGameLoader *g_gameLoader; - bool loadGam(char *fname); + bool loadGam(const char *fname); + + int _gameProjectVersion; + int _gameProjectValue; + int _scrollSpeed; public: diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index e96de89ea6..5e4b28866b 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -64,15 +64,21 @@ class CPtrList { }; class SceneTagList { - CPtrList list; + CPtrList list; + + public: + SceneTagList(Common::File &file); }; class GameProject { - CObject obj; - int field_4; - char *headerFilename; - SceneTagList *sceneTagList; - void *field_10; + CObject _obj; + int _field_4; + char *_headerFilename; + SceneTagList *_sceneTagList; + int _field_10; + + public: + GameProject(Common::File &file); }; class CInteractionController { @@ -154,59 +160,60 @@ class CGameVar { class CGameLoader { public: - bool loadFile(char *fname); + bool loadFile(const char *fname); + ~CGameLoader(); private: - CObject obj; - GameProject *gameProject; - CInteractionController *interactionController; - int field_C; - int field_10; - int field_14; - int field_18; - int field_1C; - int field_20; - int field_24; - int field_28; - int field_2C; - CInputController inputController; - int inventory; - int field_7C; - int field_80; - int field_84; - int field_88; - int field_8C; - int field_90; - int field_94; - int field_98; - int field_9C; - int field_A0; - int field_A4; - int field_A8; - int field_AC; - int field_B0; - int field_B4; - int field_B8; - int field_BC; - int field_C0; - int field_C4; - int field_C8; - int field_CC; - int field_D0; - int field_D4; - Sc2Array sc2array; - void *sceneSwitcher; - void *preloadCallback; - void *readSavegameCallback; - int16 field_F8; - int16 field_FA; - CObArray preloadItems; + CObject _obj; + GameProject *_gameProject; + CInteractionController *_interactionController; + int _field_C; + int _field_10; + int _field_14; + int _field_18; + int _field_1C; + int _field_20; + int _field_24; + int _field_28; + int _field_2C; + CInputController _inputController; + int _inventory; + int _field_7C; + int _field_80; + int _field_84; + int _field_88; + int _field_8C; + int _field_90; + int _field_94; + int _field_98; + int _field_9C; + int _field_A0; + int _field_A4; + int _field_A8; + int _field_AC; + int _field_B0; + int _field_B4; + int _field_B8; + int _field_BC; + int _field_C0; + int _field_C4; + int _field_C8; + int _field_CC; + int _field_D0; + int _field_D4; + Sc2Array _sc2array; + void *_sceneSwitcher; + void *_preloadCallback; + void *_readSavegameCallback; + int16 _field_F8; + int16 _field_FA; + CObArray _preloadItems; CGameVar *gameVar; - char *gameName; - ExCommand exCommand; - int updateCounter; - int preloadId1; - int preloadId2; + char *_gameName; + ExCommand _exCommand; + int _updateCounter; + int _preloadId1; + int _preloadId2; }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 1959bffd47..9a45fadcee 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -21,11 +21,14 @@ */ #include "fullpipe/fullpipe.h" + +#include "common/file.h" + #include "fullpipe/objects.h" namespace Fullpipe { -bool FullpipeEngine::loadGam(char *fname) { +bool FullpipeEngine::loadGam(const char *fname) { g_gameLoader = new CGameLoader(); if (g_gameLoader->loadFile(fname)) { @@ -36,4 +39,62 @@ bool FullpipeEngine::loadGam(char *fname) { return true; } +bool CGameLoader::loadFile(const char *fname) { + Common::File file; + + if (!file.open(fname)) + return false; + + char *tmp; + int len = file.readByte(); + tmp = (char *)calloc(len + 1, 1); + file.read(tmp, len); + + _gameName = tmp; + + _gameProject = new GameProject(file); + + return true; +} + +CGameLoader::~CGameLoader() { + free(_gameName); +} + +GameProject::GameProject(Common::File &file) { + _field_4 = 0; + _headerFilename = 0; + _field_10 = 12; + + // FIXME + int _gameProjectVersion = file.readUint32LE(); + int _gameProjectValue = file.readUint16LE(); + int _scrollSpeed = file.readUint32LE(); + + char *tmp; + int len = file.readByte(); + tmp = (char *)calloc(len + 1, 1); + file.read(tmp, len); + + _headerFilename = tmp; + + _sceneTagList = new SceneTagList(file); + + debug(0, "_gameProjectVersion = %d", _gameProjectVersion); + debug(0, "_gameProjectValue = %d", _gameProjectValue); + debug(0, "_scrollSpeed = %d", _scrollSpeed); + debug(0, "_headerFilename = %s", _headerFilename); + + if (_gameProjectVersion >= 3) + _field_4 = file.readUint32LE(); + + if (_gameProjectVersion >= 5) { + file.readUint32LE(); + file.readUint32LE(); + } +} + +SceneTagList::SceneTagList(Common::File &file) { +} + } // End of namespace Fullpipe -- cgit v1.2.3 From 82cbf508b57f1b01ef06f0cd8dea9d53874203a4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 2 Jun 2013 22:52:37 +0300 Subject: FULLPIPE: Refactored pascal style string reader --- engines/fullpipe/objects.h | 5 +++-- engines/fullpipe/stateloader.cpp | 25 ++++++++++--------------- 2 files changed, 13 insertions(+), 17 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 5e4b28866b..dbeb7bc07b 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -67,7 +67,7 @@ class SceneTagList { CPtrList list; public: - SceneTagList(Common::File &file); + SceneTagList(CFile &file); }; class GameProject { @@ -78,7 +78,8 @@ class GameProject { int _field_10; public: - GameProject(Common::File &file); + GameProject(CFile &file); + ~GameProject(); }; class CInteractionController { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 9a45fadcee..60b83a04db 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -24,6 +24,7 @@ #include "common/file.h" +#include "fullpipe/utils.h" #include "fullpipe/objects.h" namespace Fullpipe { @@ -40,17 +41,12 @@ bool FullpipeEngine::loadGam(const char *fname) { } bool CGameLoader::loadFile(const char *fname) { - Common::File file; + CFile file; if (!file.open(fname)) return false; - char *tmp; - int len = file.readByte(); - tmp = (char *)calloc(len + 1, 1); - file.read(tmp, len); - - _gameName = tmp; + _gameName = file.readPascalString(); _gameProject = new GameProject(file); @@ -61,7 +57,7 @@ CGameLoader::~CGameLoader() { free(_gameName); } -GameProject::GameProject(Common::File &file) { +GameProject::GameProject(CFile &file) { _field_4 = 0; _headerFilename = 0; _field_10 = 12; @@ -71,12 +67,7 @@ GameProject::GameProject(Common::File &file) { int _gameProjectValue = file.readUint16LE(); int _scrollSpeed = file.readUint32LE(); - char *tmp; - int len = file.readByte(); - tmp = (char *)calloc(len + 1, 1); - file.read(tmp, len); - - _headerFilename = tmp; + _headerFilename = file.readPascalString(); _sceneTagList = new SceneTagList(file); @@ -94,7 +85,11 @@ GameProject::GameProject(Common::File &file) { } } -SceneTagList::SceneTagList(Common::File &file) { +GameProject::~GameProject() { + free(_headerFilename); +} + +SceneTagList::SceneTagList(CFile &file) { } } // End of namespace Fullpipe -- cgit v1.2.3 From 146e5a92249e3b0ea7f4057d3a620b2ff837a57e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 2 Jun 2013 23:51:33 +0300 Subject: FULLPIPE: Read SceneTags from fullpipe.gam --- engines/fullpipe/objects.h | 27 +++++++++++++-------------- engines/fullpipe/stateloader.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 14 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index dbeb7bc07b..69b12d00ff 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -47,24 +47,23 @@ class CObArray { int m_nGrowBy; }; -class CNode { - int pNext; - CNode *pPrev; - void *data; -}; +class SceneTag { + CObject _obj; + int _field_4; + char *_tag; + int _scene; + int16 _sceneId; + int16 _field_12; -class CPtrList { - CObject obj; - CNode *m_pNodeHead; - int m_pNodeTail; - int m_nCount; - int m_pNodeFree; - int m_pBlocks; - int m_nBlockSize; + public: + SceneTag(CFile &file); + ~SceneTag(); }; +typedef Common::List SceneTagList_; + class SceneTagList { - CPtrList list; + SceneTagList_ list; public: SceneTagList(CFile &file); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 60b83a04db..e50bbb2399 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -23,6 +23,7 @@ #include "fullpipe/fullpipe.h" #include "common/file.h" +#include "common/list.h" #include "fullpipe/utils.h" #include "fullpipe/objects.h" @@ -90,6 +91,29 @@ GameProject::~GameProject() { } SceneTagList::SceneTagList(CFile &file) { + int numEntries = file.readUint16LE(); + + debug(0, "numEntries: %d", numEntries); + + for (int i = 0; i < numEntries; i++) { + SceneTag *t = new SceneTag(file); + list.push_back(*t); + } +} + +SceneTag::SceneTag(CFile &file) { + _field_4 = 0; + _scene = 0; + + _sceneId = file.readUint16LE(); + + _tag = file.readPascalString(); + + debug(0, "sceneId: %d tag: %s", _sceneId, _tag); +} + +SceneTag::~SceneTag() { + free(_tag); } } // End of namespace Fullpipe -- cgit v1.2.3 From 4eb91762744a1235129467200f16754e85e4d3c2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 3 Jun 2013 00:18:49 +0300 Subject: FULLPIPE: Moved global variables to fullpipe.cpp --- engines/fullpipe/fullpipe.cpp | 4 ++++ engines/fullpipe/fullpipe.h | 5 +++++ engines/fullpipe/stateloader.cpp | 30 +++++++++++++++++++----------- 3 files changed, 28 insertions(+), 11 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index ca430fc868..f4d502d6a7 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -32,6 +32,10 @@ namespace Fullpipe { +int g_gameProjectVersion = 0; +int g_gameProjectValue = 0; +int g_scrollSpeed = 0; + FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { // Setup mixer if (!_mixer->isReady()) { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index d7bbe14795..a6a58ffb1b 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -45,6 +45,11 @@ enum FullpipeGameFeatures { class CGameLoader; +extern int g_gameProjectVersion; +extern int g_gameProjectValue; +extern int g_scrollSpeed; + + class FullpipeEngine : public ::Engine { protected: diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index e50bbb2399..ffeb0b6391 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -48,14 +48,23 @@ bool CGameLoader::loadFile(const char *fname) { return false; _gameName = file.readPascalString(); + debug(0, "_gameName: %s", _gameName); _gameProject = new GameProject(file); + if (g_gameProjectVersion < 12) { + error("Old gameProjectVersion: %d", g_gameProjectVersion); + } + + _gameName = file.readPascalString(); + debug(0, "_gameName: %s", _gameName); + return true; } CGameLoader::~CGameLoader() { free(_gameName); + delete _gameProject; } GameProject::GameProject(CFile &file) { @@ -63,24 +72,23 @@ GameProject::GameProject(CFile &file) { _headerFilename = 0; _field_10 = 12; - // FIXME - int _gameProjectVersion = file.readUint32LE(); - int _gameProjectValue = file.readUint16LE(); - int _scrollSpeed = file.readUint32LE(); + g_gameProjectVersion = file.readUint32LE(); + g_gameProjectValue = file.readUint16LE(); + g_scrollSpeed = file.readUint32LE(); _headerFilename = file.readPascalString(); - _sceneTagList = new SceneTagList(file); - - debug(0, "_gameProjectVersion = %d", _gameProjectVersion); - debug(0, "_gameProjectValue = %d", _gameProjectValue); - debug(0, "_scrollSpeed = %d", _scrollSpeed); + debug(0, "_gameProjectVersion = %d", g_gameProjectVersion); + debug(0, "_gameProjectValue = %d", g_gameProjectValue); + debug(0, "_scrollSpeed = %d", g_scrollSpeed); debug(0, "_headerFilename = %s", _headerFilename); - if (_gameProjectVersion >= 3) + _sceneTagList = new SceneTagList(file); + + if (g_gameProjectVersion >= 3) _field_4 = file.readUint32LE(); - if (_gameProjectVersion >= 5) { + if (g_gameProjectVersion >= 5) { file.readUint32LE(); file.readUint32LE(); } -- cgit v1.2.3 From ba26e179804e2cca229bcd1ae028ce03a410e436 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 4 Jun 2013 00:53:23 +0300 Subject: FULLPIPE: Load inventory from fullpipe.gam --- engines/fullpipe/objects.h | 184 +++++++++++++++++++++++++++++++++------ engines/fullpipe/stateloader.cpp | 58 +++++++++++- 2 files changed, 216 insertions(+), 26 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 69b12d00ff..04fc42b279 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -39,6 +39,22 @@ class CObList { int m_nBlockSize; }; +class MemoryObject { + CObject obj; + int filename; + int field_8; + int field_C; + int field_10; + char field_14; + char field_15; + char field_16; + char field_17; + int data; + int dataSize; + int flags; + int libHandle; +}; + class CObArray { CObject obj; int m_pData; @@ -47,6 +63,22 @@ class CObArray { int m_nGrowBy; }; +struct CNode { + CNode *pNext; + CNode *pPrev; + void *data; +}; + +class CPtrList { + CObject obj; + CNode *m_pNodeHead; + int m_pNodeTail; + int m_nCount; + int m_pNodeFree; + int m_pBlocks; + int m_nBlockSize; +}; + class SceneTag { CObject _obj; int _field_4; @@ -63,7 +95,7 @@ class SceneTag { typedef Common::List SceneTagList_; class SceneTagList { - SceneTagList_ list; + SceneTagList_ _list; public: SceneTagList(CFile &file); @@ -158,6 +190,131 @@ class CGameVar { int varType; }; +class InventoryPoolItem { + public: + int16 _id; + int16 _pictureObjectNormalId; + int16 _pictureObjectId1; + int16 _pictureObjectMouseInsideId; + int16 _pictureObjectId3; + int16 _field_A; + int _field_C; + int _obj; + int _flags; +}; + +typedef Common::Array InventoryPoolItems; + +class CInventory { + CObject _obj; + int16 _sceneId; + int16 _field_6; + InventoryPoolItems _itemsPool; + + public: + CInventory() { _sceneId = 0; } + bool load(CFile &file); +}; + +struct InventoryItem { + int16 itemId; + int16 count; +}; + +typedef Common::Array InventoryItems; + +class InventoryIcon { + int pictureObjectNormal; + int pictureObjectMouseInside; + int pictureObject3; + int x1; + int y1; + int x2; + int y2; + int16 inventoryItemId; + int16 field_1E; + int isSelected; + int isMouseInside; +}; + +typedef Common::Array InventoryIcons; + +class Background { + CPtrList list; + int stringObj; + int x; + int y; + int16 messageQueueId; + int colorMemoryObj; + int bigPictureArray1Count; + int bigPictureArray2Count; + int bigPictureArray; +}; + +class ShadowsItemArray { + CObArray objs; +}; + +class Shadows { + CObject obj; + int sceneId; + int staticAniObjectId; + int movementId; + ShadowsItemArray items; +}; + +class Scene { + Background bg; + CPtrList staticANIObjectList1; + CPtrList staticANIObjectList2; + CPtrList messageQueueList; + CPtrList faObjectList; + Shadows *shadows; + int soundList; + int16 sceneId; + int stringObj; + int field_BC; + int libHandle; +}; + +class Picture { + MemoryObject obj; + Common::Rect rect; + int convertedBitmap; + int x; + int y; + int field_44; + int width; + int height; + int bitmap; + int field_54; + int memoryObject2; + int alpha; + int paletteData; +}; + +class BigPicture { + Picture pic; +}; + +class CInventory2 { + CInventory _inventory; + InventoryItems _inventoryItems; + InventoryIcons _inventoryIcons; + int _selectedId; + int _field_48; + int _isInventoryOut; + int _isLocked; + int _topOffset; + Scene *_sceneObj; + BigPicture *_picture; + + public: + CInventory2(); + bool load(CFile &file); + bool read(CFile &file); +}; + class CGameLoader { public: bool loadFile(const char *fname); @@ -177,30 +334,7 @@ class CGameLoader { int _field_28; int _field_2C; CInputController _inputController; - int _inventory; - int _field_7C; - int _field_80; - int _field_84; - int _field_88; - int _field_8C; - int _field_90; - int _field_94; - int _field_98; - int _field_9C; - int _field_A0; - int _field_A4; - int _field_A8; - int _field_AC; - int _field_B0; - int _field_B4; - int _field_B8; - int _field_BC; - int _field_C0; - int _field_C4; - int _field_C8; - int _field_CC; - int _field_D0; - int _field_D4; + CInventory2 _inventory; Sc2Array _sc2array; void *_sceneSwitcher; void *_preloadCallback; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index ffeb0b6391..5c571e0cbd 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -23,6 +23,7 @@ #include "fullpipe/fullpipe.h" #include "common/file.h" +#include "common/array.h" #include "common/list.h" #include "fullpipe/utils.h" @@ -59,6 +60,10 @@ bool CGameLoader::loadFile(const char *fname) { _gameName = file.readPascalString(); debug(0, "_gameName: %s", _gameName); + _inventory.load(file); + + debug(0, "%x", file.pos()); + return true; } @@ -105,7 +110,7 @@ SceneTagList::SceneTagList(CFile &file) { for (int i = 0; i < numEntries; i++) { SceneTag *t = new SceneTag(file); - list.push_back(*t); + _list.push_back(*t); } } @@ -124,4 +129,55 @@ SceneTag::~SceneTag() { free(_tag); } +bool CInventory::load(CFile &file) { + _sceneId = file.readUint16LE(); + int numInvs = file.readUint32LE(); + + debug(0, "numInvs: %d %x", numInvs, numInvs); + + for (int i = 0; i < numInvs; i++) { + InventoryPoolItem *t = new InventoryPoolItem(); + t->_id = file.readUint16LE(); + t->_pictureObjectNormalId = file.readUint16LE(); + t->_pictureObjectId1 = file.readUint16LE(); + t->_pictureObjectMouseInsideId = file.readUint16LE(); + t->_pictureObjectId3 = file.readUint16LE(); + t->_flags = file.readUint32LE(); + t->_field_C = 0; + t->_field_A = -536; + _itemsPool.push_back(*t); + } + + return true; +} + +CInventory2::CInventory2() { + _selectedId = -1; + _field_48 = -1; + _sceneObj = 0; + _picture = 0; + _isInventoryOut = 0; + _isLocked = 0; + _topOffset = -65; +} + +bool CInventory2::load(CFile &file) { + return _inventory.load(file); +} + +bool CInventory2::read(CFile &file) { // CInventory2_SerializePartially + int numInvs = file.readUint32LE(); + + debug(0, "numInvs: %d", numInvs); + + for (int i = 0; i < numInvs; i++) { + InventoryItem *t = new InventoryItem(); + t->itemId = file.readUint16LE(); + t->count = file.readUint16LE(); + _inventoryItems.push_back(*t); + } + + return true; +} + } // End of namespace Fullpipe -- cgit v1.2.3 From e624ee3442a9777ed4efeaf52223579cf7eabc4e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 4 Jun 2013 23:24:40 +0300 Subject: FULLPIPE: Add utils.h which was overlooked --- engines/fullpipe/utils.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 engines/fullpipe/utils.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h new file mode 100644 index 0000000000..55f0b6fe3b --- /dev/null +++ b/engines/fullpipe/utils.h @@ -0,0 +1,42 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_UTILS_H +#define FULLPIPE_UTILS_H + +namespace Fullpipe { + +class CFile : public Common::File { + public: + char *readPascalString() { + char *tmp; + int len = readByte(); + tmp = (char *)calloc(len + 1, 1); + read(tmp, len); + + return tmp; + } +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_UTILS_H */ -- cgit v1.2.3 From 4f4834d934df9cb320058ad3f58f52a38e2894ef Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 4 Jun 2013 23:26:37 +0300 Subject: FULLPIPE: CFile -> MfcArchive --- engines/fullpipe/objects.h | 12 ++++++------ engines/fullpipe/stateloader.cpp | 14 +++++++------- engines/fullpipe/utils.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 04fc42b279..20fbcdea9d 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -88,7 +88,7 @@ class SceneTag { int16 _field_12; public: - SceneTag(CFile &file); + SceneTag(MfcArchive &file); ~SceneTag(); }; @@ -98,7 +98,7 @@ class SceneTagList { SceneTagList_ _list; public: - SceneTagList(CFile &file); + SceneTagList(MfcArchive &file); }; class GameProject { @@ -109,7 +109,7 @@ class GameProject { int _field_10; public: - GameProject(CFile &file); + GameProject(MfcArchive &file); ~GameProject(); }; @@ -213,7 +213,7 @@ class CInventory { public: CInventory() { _sceneId = 0; } - bool load(CFile &file); + bool load(MfcArchive &file); }; struct InventoryItem { @@ -311,8 +311,8 @@ class CInventory2 { public: CInventory2(); - bool load(CFile &file); - bool read(CFile &file); + bool load(MfcArchive &file); + bool read(MfcArchive &file); }; class CGameLoader { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 5c571e0cbd..ba80798a9b 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -43,7 +43,7 @@ bool FullpipeEngine::loadGam(const char *fname) { } bool CGameLoader::loadFile(const char *fname) { - CFile file; + MfcArchive file; if (!file.open(fname)) return false; @@ -72,7 +72,7 @@ CGameLoader::~CGameLoader() { delete _gameProject; } -GameProject::GameProject(CFile &file) { +GameProject::GameProject(MfcArchive &file) { _field_4 = 0; _headerFilename = 0; _field_10 = 12; @@ -103,7 +103,7 @@ GameProject::~GameProject() { free(_headerFilename); } -SceneTagList::SceneTagList(CFile &file) { +SceneTagList::SceneTagList(MfcArchive &file) { int numEntries = file.readUint16LE(); debug(0, "numEntries: %d", numEntries); @@ -114,7 +114,7 @@ SceneTagList::SceneTagList(CFile &file) { } } -SceneTag::SceneTag(CFile &file) { +SceneTag::SceneTag(MfcArchive &file) { _field_4 = 0; _scene = 0; @@ -129,7 +129,7 @@ SceneTag::~SceneTag() { free(_tag); } -bool CInventory::load(CFile &file) { +bool CInventory::load(MfcArchive &file) { _sceneId = file.readUint16LE(); int numInvs = file.readUint32LE(); @@ -161,11 +161,11 @@ CInventory2::CInventory2() { _topOffset = -65; } -bool CInventory2::load(CFile &file) { +bool CInventory2::load(MfcArchive &file) { return _inventory.load(file); } -bool CInventory2::read(CFile &file) { // CInventory2_SerializePartially +bool CInventory2::read(MfcArchive &file) { // CInventory2_SerializePartially int numInvs = file.readUint32LE(); debug(0, "numInvs: %d", numInvs); diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 55f0b6fe3b..73be4618c8 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -25,7 +25,7 @@ namespace Fullpipe { -class CFile : public Common::File { +class MfcArchive : public Common::File { public: char *readPascalString() { char *tmp; -- cgit v1.2.3 From 4bc204cfc466c889c2e539cc23eab87f37d409c9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 4 Jun 2013 23:48:54 +0300 Subject: FULLPIPE: Start of Interaction loading --- engines/fullpipe/objects.h | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 20fbcdea9d..c39bbb37f8 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -113,12 +113,35 @@ class GameProject { ~GameProject(); }; +class CInteraction { + CObject obj; + int16 objectId1; + int16 objectId2; + int16 objectId3; + int16 staticsId1; + int16 staticsId2; + int16 field_E; + int objectState1; + int objectState2; + int xOffs; + int yOffs; + int messageQueue; + int sceneId; + int field_28; + int flags; + int stringObj; +}; + +typedef Common::List CInteractions; + class CInteractionController { - CObject obj; - CObList interactions; - int16 field_20; - char gap_22[2]; - int flag24; + CObject _obj; + CInteractions _interactions; + int16 _field_20; + int _flag24; + + public: + CInteractionController() : _field_20(0), _flag24(1) {} }; class CInputControllerItemArray { -- cgit v1.2.3 From 05418b908afd2563e85a56652f750af65a3d4cc8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 6 Jun 2013 23:52:43 +0300 Subject: FULLPIPE: Turn all MfcArchive loading functions into virtual methods --- engines/fullpipe/objects.h | 66 ++++++++++++++++++---------------------- engines/fullpipe/stateloader.cpp | 29 +++++++++++++----- 2 files changed, 51 insertions(+), 44 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index c39bbb37f8..802306dc94 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -26,21 +26,15 @@ namespace Fullpipe { class CObject { - int vmt; + public: + virtual bool load(MfcArchive &in) { return true; } + virtual ~CObject() {} }; -class CObList { - int vmt; - int m_pNodeHead; - int m_pNodeTail; - int m_nCount; - int m_pNodeFree; - int m_pBlocks; - int m_nBlockSize; -}; +typedef Common::List CObList; class MemoryObject { - CObject obj; + //CObject obj; int filename; int field_8; int field_C; @@ -56,7 +50,7 @@ class MemoryObject { }; class CObArray { - CObject obj; + //CObject obj; int m_pData; int m_nSize; int m_nMaxSize; @@ -70,7 +64,7 @@ struct CNode { }; class CPtrList { - CObject obj; + //CObject obj; CNode *m_pNodeHead; int m_pNodeTail; int m_nCount; @@ -79,8 +73,7 @@ class CPtrList { int m_nBlockSize; }; -class SceneTag { - CObject _obj; +class SceneTag : CObject { int _field_4; char *_tag; int _scene; @@ -88,33 +81,35 @@ class SceneTag { int16 _field_12; public: - SceneTag(MfcArchive &file); + SceneTag(); ~SceneTag(); + + virtual bool load(MfcArchive &file); }; typedef Common::List SceneTagList_; -class SceneTagList { +class SceneTagList : CObject { SceneTagList_ _list; public: - SceneTagList(MfcArchive &file); + virtual bool load(MfcArchive &file); }; -class GameProject { - CObject _obj; +class GameProject : CObject { int _field_4; char *_headerFilename; SceneTagList *_sceneTagList; int _field_10; public: - GameProject(MfcArchive &file); + GameProject(); ~GameProject(); + virtual bool load(MfcArchive &file); }; class CInteraction { - CObject obj; + //CObject obj; int16 objectId1; int16 objectId2; int16 objectId3; @@ -132,11 +127,9 @@ class CInteraction { int stringObj; }; -typedef Common::List CInteractions; - class CInteractionController { - CObject _obj; - CInteractions _interactions; + //CObject _obj; + CObList _interactions; int16 _field_20; int _flag24; @@ -149,7 +142,7 @@ class CInputControllerItemArray { }; class CInputController { - CObject obj; + //CObject obj; int flag; int flags; int cursorHandle; @@ -176,7 +169,7 @@ union VarValue { }; class Message { - CObject obj; + //CObject obj; int messageKind; int16 parentId; char gap_A[2]; @@ -202,7 +195,7 @@ class ExCommand { }; class CGameVar { - CObject obj; + //CObject obj; CGameVar *nextVarObj; CGameVar *prevVarObj; CGameVar *parentVarObj; @@ -228,15 +221,14 @@ class InventoryPoolItem { typedef Common::Array InventoryPoolItems; -class CInventory { - CObject _obj; +class CInventory : CObject { int16 _sceneId; int16 _field_6; InventoryPoolItems _itemsPool; public: CInventory() { _sceneId = 0; } - bool load(MfcArchive &file); + virtual bool load(MfcArchive &file); }; struct InventoryItem { @@ -279,7 +271,7 @@ class ShadowsItemArray { }; class Shadows { - CObject obj; + //CObject obj; int sceneId; int staticAniObjectId; int movementId; @@ -320,7 +312,7 @@ class BigPicture { Picture pic; }; -class CInventory2 { +class CInventory2 : CObject { CInventory _inventory; InventoryItems _inventoryItems; InventoryIcons _inventoryIcons; @@ -334,8 +326,8 @@ class CInventory2 { public: CInventory2(); - bool load(MfcArchive &file); - bool read(MfcArchive &file); + bool loadPartial(MfcArchive &file); + virtual bool load(MfcArchive &file); }; class CGameLoader { @@ -344,7 +336,7 @@ class CGameLoader { ~CGameLoader(); private: - CObject _obj; + //CObject _obj; GameProject *_gameProject; CInteractionController *_interactionController; int _field_C; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index ba80798a9b..bdfd4e0b06 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -51,7 +51,9 @@ bool CGameLoader::loadFile(const char *fname) { _gameName = file.readPascalString(); debug(0, "_gameName: %s", _gameName); - _gameProject = new GameProject(file); + _gameProject = new GameProject(); + + _gameProject->load(file); if (g_gameProjectVersion < 12) { error("Old gameProjectVersion: %d", g_gameProjectVersion); @@ -72,11 +74,13 @@ CGameLoader::~CGameLoader() { delete _gameProject; } -GameProject::GameProject(MfcArchive &file) { +GameProject::GameProject() { _field_4 = 0; _headerFilename = 0; _field_10 = 12; +} +bool GameProject::load(MfcArchive &file) { g_gameProjectVersion = file.readUint32LE(); g_gameProjectValue = file.readUint16LE(); g_scrollSpeed = file.readUint32LE(); @@ -88,7 +92,9 @@ GameProject::GameProject(MfcArchive &file) { debug(0, "_scrollSpeed = %d", g_scrollSpeed); debug(0, "_headerFilename = %s", _headerFilename); - _sceneTagList = new SceneTagList(file); + _sceneTagList = new SceneTagList(); + + _sceneTagList->load(file); if (g_gameProjectVersion >= 3) _field_4 = file.readUint32LE(); @@ -97,32 +103,41 @@ GameProject::GameProject(MfcArchive &file) { file.readUint32LE(); file.readUint32LE(); } + + return true; } GameProject::~GameProject() { free(_headerFilename); } -SceneTagList::SceneTagList(MfcArchive &file) { +bool SceneTagList::load(MfcArchive &file) { int numEntries = file.readUint16LE(); debug(0, "numEntries: %d", numEntries); for (int i = 0; i < numEntries; i++) { - SceneTag *t = new SceneTag(file); + SceneTag *t = new SceneTag(); + t->load(file); _list.push_back(*t); } + + return true; } -SceneTag::SceneTag(MfcArchive &file) { +SceneTag::SceneTag() { _field_4 = 0; _scene = 0; +} +bool SceneTag::load(MfcArchive &file) { _sceneId = file.readUint16LE(); _tag = file.readPascalString(); debug(0, "sceneId: %d tag: %s", _sceneId, _tag); + + return true; } SceneTag::~SceneTag() { @@ -165,7 +180,7 @@ bool CInventory2::load(MfcArchive &file) { return _inventory.load(file); } -bool CInventory2::read(MfcArchive &file) { // CInventory2_SerializePartially +bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartially int numInvs = file.readUint32LE(); debug(0, "numInvs: %d", numInvs); -- cgit v1.2.3 From bd565771d0bb54eedaa1b51f1d0f1ab123d48249 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 7 Jun 2013 00:49:50 +0300 Subject: FULLPIPE: Started work on CObList loader --- engines/fullpipe/objects.h | 86 ++++++++++++++++++++++------------------ engines/fullpipe/stateloader.cpp | 66 +++++++++++++++++++++++++++--- engines/fullpipe/utils.cpp | 58 +++++++++++++++++++++++++++ engines/fullpipe/utils.h | 13 +++--- 4 files changed, 172 insertions(+), 51 deletions(-) create mode 100644 engines/fullpipe/utils.cpp (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 802306dc94..40ca2023e4 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -31,22 +31,25 @@ class CObject { virtual ~CObject() {} }; -typedef Common::List CObList; +class CObList : Common::List, public CObject { + public: + virtual bool load(MfcArchive &file); +}; class MemoryObject { //CObject obj; - int filename; - int field_8; - int field_C; - int field_10; - char field_14; - char field_15; - char field_16; - char field_17; - int data; - int dataSize; - int flags; - int libHandle; + int filename; + int field_8; + int field_C; + int field_10; + char field_14; + char field_15; + char field_16; + char field_17; + int data; + int dataSize; + int flags; + int libHandle; }; class CObArray { @@ -58,9 +61,9 @@ class CObArray { }; struct CNode { - CNode *pNext; - CNode *pPrev; - void *data; + CNode *pNext; + CNode *pPrev; + void *data; }; class CPtrList { @@ -73,7 +76,7 @@ class CPtrList { int m_nBlockSize; }; -class SceneTag : CObject { +class SceneTag : public CObject { int _field_4; char *_tag; int _scene; @@ -89,14 +92,14 @@ class SceneTag : CObject { typedef Common::List SceneTagList_; -class SceneTagList : CObject { +class SceneTagList : public CObject { SceneTagList_ _list; public: virtual bool load(MfcArchive &file); }; -class GameProject : CObject { +class GameProject : public CObject { int _field_4; char *_headerFilename; SceneTagList *_sceneTagList; @@ -127,14 +130,15 @@ class CInteraction { int stringObj; }; -class CInteractionController { - //CObject _obj; +class CInteractionController : public CObject { CObList _interactions; int16 _field_20; int _flag24; public: CInteractionController() : _field_20(0), _flag24(1) {} + + virtual bool load(MfcArchive &file); }; class CInputControllerItemArray { @@ -143,19 +147,22 @@ class CInputControllerItemArray { class CInputController { //CObject obj; - int flag; - int flags; - int cursorHandle; - int hCursor; - int field_14; - int cursorId; - int cursorIndex; - CInputControllerItemArray cursorsArray; - int cursorDrawX; - int cursorDrawY; - int cursorDrawWidth; - int cursorDrawHeight; - int cursorItemPicture; + int _flag; + int _flags; + int _cursorHandle; + int _hCursor; + int _field_14; + int _cursorId; + int _cursorIndex; + CInputControllerItemArray _cursorsArray; + int _cursorDrawX; + int _cursorDrawY; + int _cursorDrawWidth; + int _cursorDrawHeight; + int _cursorItemPicture; + + public: + CInputController(); }; class Sc2Array { @@ -221,7 +228,7 @@ class InventoryPoolItem { typedef Common::Array InventoryPoolItems; -class CInventory : CObject { +class CInventory : public CObject { int16 _sceneId; int16 _field_6; InventoryPoolItems _itemsPool; @@ -312,7 +319,7 @@ class BigPicture { Picture pic; }; -class CInventory2 : CObject { +class CInventory2 : public CObject { CInventory _inventory; InventoryItems _inventoryItems; InventoryIcons _inventoryIcons; @@ -332,8 +339,11 @@ class CInventory2 : CObject { class CGameLoader { public: + CGameLoader(); + virtual ~CGameLoader(); + bool loadFile(const char *fname); - ~CGameLoader(); + virtual bool load(MfcArchive &file); private: //CObject _obj; @@ -357,7 +367,7 @@ class CGameLoader { int16 _field_F8; int16 _field_FA; CObArray _preloadItems; - CGameVar *gameVar; + CGameVar *_gameVar; char *_gameName; ExCommand _exCommand; int _updateCounter; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index bdfd4e0b06..0057e4c694 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -42,12 +42,50 @@ bool FullpipeEngine::loadGam(const char *fname) { return true; } +CGameLoader::CGameLoader() { + _interactionController = new CInteractionController(); + + // g_gameLoader = this; // FIXME + + _gameProject = 0; + //_gameName = "untitled"; + + //addMessageHandler2(CGameLoader_messageHandler1, 0, 0); + //insertMessageHandler(CGameLoader_messageHandler2, 0, 128); + //insertMessageHandler(CGameLoader_messageHandler3, 0, 1); + + _field_FA = 0; + _field_F8 = 0; + _sceneSwitcher = 0; + _preloadCallback = 0; + _readSavegameCallback = 0; + _gameVar = 0; + _preloadId1 = 0; + _preloadId2 = 0; + _updateCounter = 0; + + //g_x = 0; + //g_y = 0; + //dword_478480 = 0; + //g_objectId2 = 0; + //g_id = 0; +} + +CGameLoader::~CGameLoader() { + free(_gameName); + delete _gameProject; +} + bool CGameLoader::loadFile(const char *fname) { MfcArchive file; if (!file.open(fname)) return false; + return load(file); +} + +bool CGameLoader::load(MfcArchive &file) { _gameName = file.readPascalString(); debug(0, "_gameName: %s", _gameName); @@ -66,12 +104,9 @@ bool CGameLoader::loadFile(const char *fname) { debug(0, "%x", file.pos()); - return true; -} + _interactionController->load(file); -CGameLoader::~CGameLoader() { - free(_gameName); - delete _gameProject; + return true; } GameProject::GameProject() { @@ -195,4 +230,25 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia return true; } +bool CInteractionController::load(MfcArchive &file) { + return _interactions.load(file); +} + +bool CObList::load(MfcArchive &file) { + int count = file.readCount(); + + for (int i = 0; i < count; i++) { + CObject *t = file.parseClass(); + t->load(file); + + push_back(*t); + } + + return true; +} + +CInputController::CInputController() { + // TODO +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp new file mode 100644 index 0000000000..e1031cf0ed --- /dev/null +++ b/engines/fullpipe/utils.cpp @@ -0,0 +1,58 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "common/file.h" + +#include "fullpipe/utils.h" +#include "fullpipe/objects.h" + +namespace Fullpipe { + +char *MfcArchive::readPascalString() { + char *tmp; + int len = readByte(); + tmp = (char *)calloc(len + 1, 1); + read(tmp, len); + + return tmp; +} + +int MfcArchive::readCount() { + int count = readUint16LE(); + + if (count == 0xffff) + count = readUint32LE(); + + return count; +} + +CObject *MfcArchive::parseClass() { + CObject *res; + + res = new CInventory2(); + + return res; +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 73be4618c8..492f5ac6bf 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -25,16 +25,13 @@ namespace Fullpipe { +class CObject; + class MfcArchive : public Common::File { public: - char *readPascalString() { - char *tmp; - int len = readByte(); - tmp = (char *)calloc(len + 1, 1); - read(tmp, len); - - return tmp; - } + char *readPascalString(); + int readCount(); + CObject *parseClass(); }; } // End of namespace Fullpipe -- cgit v1.2.3 From 0c03278937d0b7e85da3b60f1edf8bf7764aecbc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 7 Jun 2013 23:56:40 +0300 Subject: FULLPIPE: Start of reading CInteraction --- engines/fullpipe/objects.h | 37 ++++++++++++++------------- engines/fullpipe/stateloader.cpp | 36 ++++++++++++++++++++++++++ engines/fullpipe/utils.cpp | 55 +++++++++++++++++++++++++++++++++++++--- engines/fullpipe/utils.h | 20 ++++++++++++--- 4 files changed, 124 insertions(+), 24 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 40ca2023e4..5b15aa04f2 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -111,23 +111,26 @@ class GameProject : public CObject { virtual bool load(MfcArchive &file); }; -class CInteraction { - //CObject obj; - int16 objectId1; - int16 objectId2; - int16 objectId3; - int16 staticsId1; - int16 staticsId2; - int16 field_E; - int objectState1; - int objectState2; - int xOffs; - int yOffs; - int messageQueue; - int sceneId; - int field_28; - int flags; - int stringObj; +class CInteraction : public CObject { + int16 _objectId1; + int16 _objectId2; + int16 _objectId3; + int16 _staticsId1; + int16 _staticsId2; + int16 _field_E; + int _objectState1; + int _objectState2; + int _xOffs; + int _yOffs; + int _messageQueue; + int _sceneId; + int _field_28; + int _flags; + char *_stringObj; + + public: + CInteraction(); + virtual bool load(MfcArchive &file); }; class CInteractionController : public CObject { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 0057e4c694..e1c6d55bd0 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -251,4 +251,40 @@ CInputController::CInputController() { // TODO } +CInteraction::CInteraction() { + _objectId1 = 0; + _objectId2 = 0; + _staticsId1 = 0; + _objectId3 = 0; + _objectState2 = 0; + _objectState1 = 0; + _messageQueue = 0; + _flags = 0; + _yOffs = 0; + _xOffs = 0; + _staticsId2 = 0; + _field_28 = 0; + _sceneId = -1; +} + +bool CInteraction::load(MfcArchive &file) { + _objectId1 = file.readUint16LE(); + _objectId2 = file.readUint16LE(); + _staticsId1 = file.readUint16LE(); + _staticsId2 = file.readUint16LE(); + _objectId3 = file.readUint16LE(); + _objectState2 = file.readUint32LE(); + _objectState1 = file.readUint32LE(); + _xOffs = file.readUint32LE(); + _yOffs = file.readUint32LE(); + _sceneId = file.readUint32LE(); + _flags = file.readUint32LE(); + _stringObj = file.readPascalString(); + + // messageQueue + + return true; +} + + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index e1031cf0ed..75e5f69f8d 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -47,12 +47,61 @@ int MfcArchive::readCount() { return count; } +enum { + kCInteraction = 0 +}; + +const struct { + const char *name; + int id; +} classMap[] = { + { "CInteraction", kCInteraction }, + { 0, 0 } +}; + +MfcArchive::MfcArchive() { + for (int i; classMap[i].name; i++) { + _classMap[classMap[i].name] = classMap[i].id; + } + + _lastIndex = 1; +} + CObject *MfcArchive::parseClass() { - CObject *res; + char *name; + int objectId; + + uint obTag = readUint16LE(); + + if (obTag == 0xffff) { + int schema = readUint16LE(); + + name = readPascalString(); + + if (!_classMap.contains(name)) { + error("Unknown class in MfcArchive: %s", name); + } + + _objectMap[_lastIndex] = objectId = _classMap[name]; + _lastIndex++; + } else { + obTag &= ~0x8000; + + if (_objectMap.size() < obTag) { + error("Object index too big: %d", obTag); + } + + objectId = _objectMap[obTag]; + } - res = new CInventory2(); + switch (objectId) { + case kCInteraction: + return new CInteraction(); + default: + error("Unknown objectId: %d", objectId); + } - return res; + return 0; } } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 492f5ac6bf..a791139a6b 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -23,15 +23,27 @@ #ifndef FULLPIPE_UTILS_H #define FULLPIPE_UTILS_H +#include "common/hash-str.h" +#include "common/array.h" + namespace Fullpipe { class CObject; +typedef Common::HashMap ClassMap; + class MfcArchive : public Common::File { - public: - char *readPascalString(); - int readCount(); - CObject *parseClass(); + ClassMap _classMap; + Common::Array _objectMap; + + int _lastIndex; + + public: + MfcArchive(); + + char *readPascalString(); + int readCount(); + CObject *parseClass(); }; } // End of namespace Fullpipe -- cgit v1.2.3 From 72aeac3f3634cacdfdafd15388b6033592b9d25f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 8 Jun 2013 17:05:51 +0300 Subject: FULLPIPE: Continue parsing CInteraction --- engines/fullpipe/objects.h | 17 ++++++++++++++++- engines/fullpipe/stateloader.cpp | 6 +++++- engines/fullpipe/utils.cpp | 24 ++++++++++++++++++------ engines/fullpipe/utils.h | 2 +- 4 files changed, 40 insertions(+), 9 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 5b15aa04f2..4551d29a19 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -111,6 +111,21 @@ class GameProject : public CObject { virtual bool load(MfcArchive &file); }; +class MessageQueue : public CObject { + int _id; + int _flags; + char *_stringObj; + int16 _dataId; + int16 _field_12; + int _field_14; + CPtrList _exCommands; + int _counter; + int _field_38; + int _isFinished; + int _parId; + int _flag1; +}; + class CInteraction : public CObject { int16 _objectId1; int16 _objectId2; @@ -122,7 +137,7 @@ class CInteraction : public CObject { int _objectState2; int _xOffs; int _yOffs; - int _messageQueue; + MessageQueue *_messageQueue; int _sceneId; int _field_28; int _flags; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index e1c6d55bd0..82ba4562bd 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -237,6 +237,8 @@ bool CInteractionController::load(MfcArchive &file) { bool CObList::load(MfcArchive &file) { int count = file.readCount(); + debug(0, "CObList::count: %d", count); + for (int i = 0; i < count; i++) { CObject *t = file.parseClass(); t->load(file); @@ -281,8 +283,10 @@ bool CInteraction::load(MfcArchive &file) { _flags = file.readUint32LE(); _stringObj = file.readPascalString(); - // messageQueue + debug(0, "CInteraction::_stringObj = %s", _stringObj); + // messageQueue + _messageQueue = (MessageQueue *)file.parseClass(); return true; } diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 75e5f69f8d..b39ae423ea 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -29,9 +29,15 @@ namespace Fullpipe { -char *MfcArchive::readPascalString() { +char *MfcArchive::readPascalString(bool twoByte) { char *tmp; - int len = readByte(); + int len; + + if (twoByte) + len = readUint16LE(); + else + len = readByte(); + tmp = (char *)calloc(len + 1, 1); read(tmp, len); @@ -73,17 +79,21 @@ CObject *MfcArchive::parseClass() { uint obTag = readUint16LE(); + debug(0, "parseClass::obTag = %d", obTag); + if (obTag == 0xffff) { int schema = readUint16LE(); - name = readPascalString(); + debug(0, "parseClass::schema = %d", schema); + + name = readPascalString(true); if (!_classMap.contains(name)) { - error("Unknown class in MfcArchive: %s", name); + error("Unknown class in MfcArchive: <%s>", name); } - _objectMap[_lastIndex] = objectId = _classMap[name]; - _lastIndex++; + objectId = _classMap[name]; + _objectMap.push_back(objectId); } else { obTag &= ~0x8000; @@ -93,6 +103,8 @@ CObject *MfcArchive::parseClass() { objectId = _objectMap[obTag]; } + + debug(0, "objectId: %d", objectId); switch (objectId) { case kCInteraction: diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index a791139a6b..df56262421 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -41,7 +41,7 @@ class MfcArchive : public Common::File { public: MfcArchive(); - char *readPascalString(); + char *readPascalString(bool twoByte = false); int readCount(); CObject *parseClass(); }; -- cgit v1.2.3 From e9fa2e52df6d5823499bd5731a16dba7c5c7c9db Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Jun 2013 00:27:42 +0300 Subject: FULLPIPE: Continued loading CInteraction --- engines/fullpipe/objects.h | 124 ++++++++++++++++++++------------------- engines/fullpipe/stateloader.cpp | 93 +++++++++++++++++++++++++++++ engines/fullpipe/utils.cpp | 23 ++++++-- 3 files changed, 174 insertions(+), 66 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 4551d29a19..6b615ffcba 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -66,15 +66,7 @@ struct CNode { void *data; }; -class CPtrList { - //CObject obj; - CNode *m_pNodeHead; - int m_pNodeTail; - int m_nCount; - int m_pNodeFree; - int m_pBlocks; - int m_nBlockSize; -}; +typedef Common::Array CPtrList; class SceneTag : public CObject { int _field_4; @@ -112,36 +104,40 @@ class GameProject : public CObject { }; class MessageQueue : public CObject { - int _id; - int _flags; - char *_stringObj; - int16 _dataId; - int16 _field_12; - int _field_14; - CPtrList _exCommands; - int _counter; - int _field_38; - int _isFinished; - int _parId; - int _flag1; + int _id; + int _flags; + char *_stringObj; + int16 _dataId; + int16 _field_12; + int _field_14; + CPtrList _exCommands; + int _counter; + int _field_38; + int _isFinished; + int _parId; + int _flag1; + + public: + MessageQueue(); + virtual bool load(MfcArchive &file); }; class CInteraction : public CObject { - int16 _objectId1; - int16 _objectId2; - int16 _objectId3; - int16 _staticsId1; - int16 _staticsId2; - int16 _field_E; - int _objectState1; - int _objectState2; - int _xOffs; - int _yOffs; - MessageQueue *_messageQueue; - int _sceneId; - int _field_28; - int _flags; - char *_stringObj; + int16 _objectId1; + int16 _objectId2; + int16 _objectId3; + int16 _staticsId1; + int16 _staticsId2; + int16 _field_E; + int _objectState1; + int _objectState2; + int _xOffs; + int _yOffs; + MessageQueue *_messageQueue; + int _sceneId; + int _field_28; + int _flags; + char *_stringObj; public: CInteraction(); @@ -188,35 +184,42 @@ class Sc2Array { }; union VarValue { - int floatValue; - int intValue; - int stringValue; + int floatValue; + int intValue; + int stringValue; }; class Message { - //CObject obj; - int messageKind; - int16 parentId; - char gap_A[2]; - int x; - int y; - int field_14; - int sceneClickX; - int sceneClickY; - int field_20; - int field_24; - int param28; - int field_2C; - int field_30; - int field_34; + public: + int _messageKind; + int16 _parentId; + int _x; + int _y; + int _field_14; + int _sceneClickX; + int _sceneClickY; + int _field_20; + int _field_24; + int _param28; + int _field_2C; + int _field_30; + int _field_34; + + public: + Message(); }; -class ExCommand { - Message msg; - int messageNum; - int field_3C; - int flags; - int parId; +class ExCommand : public CObject { + Message _msg; + int _messageNum; + int _field_3C; + int _flags; + int _parId; + + public: + ExCommand(); + + virtual bool load(MfcArchive &file); }; class CGameVar { @@ -396,4 +399,3 @@ class CGameLoader { } // End of namespace Fullpipe #endif /* FULLPIPE_OBJECTS_H */ - diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 82ba4562bd..4e54aa3d5d 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -116,6 +116,10 @@ GameProject::GameProject() { } bool GameProject::load(MfcArchive &file) { + _field_4 = 0; + _headerFilename = 0; + _field_10 = 12; + g_gameProjectVersion = file.readUint32LE(); g_gameProjectValue = file.readUint16LE(); g_scrollSpeed = file.readUint32LE(); @@ -166,6 +170,9 @@ SceneTag::SceneTag() { } bool SceneTag::load(MfcArchive &file) { + _field_4 = 0; + _scene = 0; + _sceneId = file.readUint16LE(); _tag = file.readPascalString(); @@ -287,8 +294,94 @@ bool CInteraction::load(MfcArchive &file) { // messageQueue _messageQueue = (MessageQueue *)file.parseClass(); + _messageQueue->load(file); + + return true; +} + +MessageQueue::MessageQueue() { + _field_14 = 0; + _parId = 0; + _dataId = 0; + _id = 0; + _isFinished = 0; + _flags = 0; +} + +bool MessageQueue::load(MfcArchive &file) { + _dataId = file.readUint16LE(); + + int count = file.readUint16LE(); + + _stringObj = file.readPascalString(); + debug(0, "MessageQueue::count = %d", count); + debug(0, "MessageQueue::_stringObj = %s", _stringObj); + + for (int i = 0; i < count; i++) { + CObject *tmp = file.parseClass(); + tmp->load(file); + + _exCommands.push_back(tmp); + } + + _id = -1; + _field_14 = 0; + _parId = 0; + _isFinished = 0; + + return true; +} + +ExCommand::ExCommand() { + _field_3C = 1; + _messageNum = 0; + _flags = 0; + _parId = 0; +} + +bool ExCommand::load(MfcArchive &file) { + debug(0, "ExCommand::load"); + + _msg._parentId = file.readUint16LE(); + _msg._messageKind = file.readUint32LE(); + _msg._x = file.readUint32LE(); + _msg._y = file.readUint32LE(); + _msg._field_14 = file.readUint32LE(); + _msg._sceneClickX = file.readUint32LE(); + _msg._sceneClickY = file.readUint32LE(); + _msg._field_20 = file.readUint32LE(); + _msg._field_24 = file.readUint32LE(); + _msg._param28 = file.readUint32LE(); + _msg._field_2C = file.readUint32LE(); + _msg._field_30 = file.readUint32LE(); + _msg._field_34 = file.readUint32LE(); + + _messageNum = file.readUint32LE(); + + _field_3C = 0; + + if (g_gameProjectVersion >= 12) { + _flags = file.readUint32LE(); + _parId = file.readUint32LE(); + } + return true; } +Message::Message() { + _messageKind = 0; + _parentId = 0; + _x = 0; + _y = 0; + _field_14 = 0; + _sceneClickX = 0; + _sceneClickY = 0; + _field_20 = 0; + _field_24 = 0; + _param28 = 0; + _field_2C = 0; + _field_30 = 0; + _field_34 = 0; +} } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index b39ae423ea..954af848af 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -54,14 +54,18 @@ int MfcArchive::readCount() { } enum { - kCInteraction = 0 + kCInteraction = 0, + kMessageQueue = 1, + kExCommand = 2 }; const struct { const char *name; int id; } classMap[] = { - { "CInteraction", kCInteraction }, + { "CInteraction", kCInteraction }, + { "MessageQueue", kMessageQueue }, + { "ExCommand", kExCommand }, { 0, 0 } }; @@ -79,7 +83,7 @@ CObject *MfcArchive::parseClass() { uint obTag = readUint16LE(); - debug(0, "parseClass::obTag = %d", obTag); + debug(0, "parseClass::obTag = %d (%04x)", obTag, obTag); if (obTag == 0xffff) { int schema = readUint16LE(); @@ -87,6 +91,7 @@ CObject *MfcArchive::parseClass() { debug(0, "parseClass::schema = %d", schema); name = readPascalString(true); + debug(0, "parseClass::class <%s>", name); if (!_classMap.contains(name)) { error("Unknown class in MfcArchive: <%s>", name); @@ -94,14 +99,18 @@ CObject *MfcArchive::parseClass() { objectId = _classMap[name]; _objectMap.push_back(objectId); + + debug(0, "tag: %d", _objectMap.size()); } else { obTag &= ~0x8000; + debug(0, "parseClass::obTag <%d>", obTag); + if (_objectMap.size() < obTag) { - error("Object index too big: %d", obTag); + error("Object index too big: %d at 0x%08x", obTag, pos() - 2); } - objectId = _objectMap[obTag]; + objectId = _objectMap[obTag - 1]; } debug(0, "objectId: %d", objectId); @@ -109,6 +118,10 @@ CObject *MfcArchive::parseClass() { switch (objectId) { case kCInteraction: return new CInteraction(); + case kMessageQueue: + return new MessageQueue(); + case kExCommand: + return new ExCommand(); default: error("Unknown objectId: %d", objectId); } -- cgit v1.2.3 From ad47d5a5e2f0a1b88d101aca9ad25b2af2f1beae Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Jun 2013 12:26:38 +0300 Subject: FULLPIPE: Attampt to fix serializer. Still not working --- engines/fullpipe/utils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 954af848af..d9fd3d829b 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -75,6 +75,8 @@ MfcArchive::MfcArchive() { } _lastIndex = 1; + + _objectMap.push_back(0); } CObject *MfcArchive::parseClass() { @@ -100,7 +102,7 @@ CObject *MfcArchive::parseClass() { objectId = _classMap[name]; _objectMap.push_back(objectId); - debug(0, "tag: %d", _objectMap.size()); + debug(0, "tag: %d", _objectMap.size() - 1); } else { obTag &= ~0x8000; @@ -110,7 +112,7 @@ CObject *MfcArchive::parseClass() { error("Object index too big: %d at 0x%08x", obTag, pos() - 2); } - objectId = _objectMap[obTag - 1]; + objectId = _objectMap[obTag]; } debug(0, "objectId: %d", objectId); -- cgit v1.2.3 From 9395ab11d2020779dd27c7720ef1cb791b030116 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Jun 2013 12:32:14 +0300 Subject: FULLPIPE: Hack to enable object loader --- engines/fullpipe/utils.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index d9fd3d829b..36eb86c56e 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -101,6 +101,7 @@ CObject *MfcArchive::parseClass() { objectId = _classMap[name]; _objectMap.push_back(objectId); + _objectMap.push_back(objectId); // Gross HACK debug(0, "tag: %d", _objectMap.size() - 1); } else { -- cgit v1.2.3 From 67d30f29f9e658ce760b8a1a5f413fef4d2d586e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Jun 2013 12:51:23 +0300 Subject: FULLPIPE: Added ObjstateCommand loader --- engines/fullpipe/objects.h | 10 ++++++++++ engines/fullpipe/stateloader.cpp | 14 ++++++++++++++ engines/fullpipe/utils.cpp | 6 +++++- 3 files changed, 29 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 6b615ffcba..36f6996062 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -396,6 +396,16 @@ class CGameLoader { int _preloadId2; }; +class CObjstateCommand : public CObject { + ExCommand _cmd; + char *_stringObj; + int _value; + + public: + CObjstateCommand(); + virtual bool load(MfcArchive &file); +}; + } // End of namespace Fullpipe #endif /* FULLPIPE_OBJECTS_H */ diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 4e54aa3d5d..fe67bf9b7d 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -384,4 +384,18 @@ Message::Message() { _field_34 = 0; } +CObjstateCommand::CObjstateCommand() { + _value = 0; +} + +bool CObjstateCommand::load(MfcArchive &file) { + _cmd.load(file); + + _value = file.readUint32LE(); + + _stringObj = file.readPascalString(); + + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 36eb86c56e..1c324a020c 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -56,7 +56,8 @@ int MfcArchive::readCount() { enum { kCInteraction = 0, kMessageQueue = 1, - kExCommand = 2 + kExCommand = 2, + kCObjstateCommand = 3 }; const struct { @@ -66,6 +67,7 @@ const struct { { "CInteraction", kCInteraction }, { "MessageQueue", kMessageQueue }, { "ExCommand", kExCommand }, + { "CObjstateCommand", kCObjstateCommand }, { 0, 0 } }; @@ -125,6 +127,8 @@ CObject *MfcArchive::parseClass() { return new MessageQueue(); case kExCommand: return new ExCommand(); + case kCObjstateCommand: + return new CObjstateCommand(); default: error("Unknown objectId: %d", objectId); } -- cgit v1.2.3 From 0b1bda78fc5144c8ea03e597face630c29a5a88f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Jun 2013 13:22:10 +0300 Subject: FULLPIPE: Fix object loading --- engines/fullpipe/utils.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 1c324a020c..5da63114b1 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -103,10 +103,14 @@ CObject *MfcArchive::parseClass() { objectId = _classMap[name]; _objectMap.push_back(objectId); - _objectMap.push_back(objectId); // Gross HACK + debug(0, "tag: %d (%x)", _objectMap.size() - 1, objectId); - debug(0, "tag: %d", _objectMap.size() - 1); + objectId = _classMap[name]; } else { + if ((obTag & 0x8000) == 0) { + error("Wrong object index format: %d at 0x%08x", obTag, pos() - 2); + } + obTag &= ~0x8000; debug(0, "parseClass::obTag <%d>", obTag); @@ -118,6 +122,8 @@ CObject *MfcArchive::parseClass() { objectId = _objectMap[obTag]; } + _objectMap.push_back(objectId); + debug(0, "objectId: %d", objectId); switch (objectId) { -- cgit v1.2.3 From da00b7143e08a0ed95142e4401896bd7653b04ab Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Jun 2013 13:33:22 +0300 Subject: FULLPIPE: Add more debug output to archive loading --- engines/fullpipe/utils.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 5da63114b1..6534c64269 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -71,8 +71,18 @@ const struct { { 0, 0 } }; +static const char *lookupObjectId(int id) { + for (int i = 0; classMap[i].name; i++) { + if (classMap[i].id == id) + return classMap[i].name; + } + + return ""; +} + + MfcArchive::MfcArchive() { - for (int i; classMap[i].name; i++) { + for (int i = 0; classMap[i].name; i++) { _classMap[classMap[i].name] = classMap[i].id; } @@ -87,7 +97,7 @@ CObject *MfcArchive::parseClass() { uint obTag = readUint16LE(); - debug(0, "parseClass::obTag = %d (%04x)", obTag, obTag); + debug(0, "parseClass::obTag = %d (%04x) at 0x%08x", obTag, obTag, pos() - 2); if (obTag == 0xffff) { int schema = readUint16LE(); @@ -113,12 +123,12 @@ CObject *MfcArchive::parseClass() { obTag &= ~0x8000; - debug(0, "parseClass::obTag <%d>", obTag); - if (_objectMap.size() < obTag) { error("Object index too big: %d at 0x%08x", obTag, pos() - 2); } + debug(0, "parseClass::obTag <%s>", lookupObjectId(_objectMap[obTag])); + objectId = _objectMap[obTag]; } -- cgit v1.2.3 From 54624966ce933e8a43fbf32dff0731b0db517e4a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 9 Jun 2013 23:51:33 +0300 Subject: FULLPIPE: Finish loading CInteractions --- engines/fullpipe/stateloader.cpp | 7 +++---- engines/fullpipe/utils.cpp | 21 +++++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index fe67bf9b7d..c2a244b40e 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -290,11 +290,11 @@ bool CInteraction::load(MfcArchive &file) { _flags = file.readUint32LE(); _stringObj = file.readPascalString(); - debug(0, "CInteraction::_stringObj = %s", _stringObj); - // messageQueue _messageQueue = (MessageQueue *)file.parseClass(); - _messageQueue->load(file); + + if (_messageQueue) + _messageQueue->load(file); return true; } @@ -315,7 +315,6 @@ bool MessageQueue::load(MfcArchive &file) { _stringObj = file.readPascalString(); debug(0, "MessageQueue::count = %d", count); - debug(0, "MessageQueue::_stringObj = %s", _stringObj); for (int i = 0; i < count; i++) { CObject *tmp = file.parseClass(); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 6534c64269..09f00b8042 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -41,6 +41,8 @@ char *MfcArchive::readPascalString(bool twoByte) { tmp = (char *)calloc(len + 1, 1); read(tmp, len); + debug(0, "readPascalString: %d <%s>", len, tmp); + return tmp; } @@ -54,10 +56,11 @@ int MfcArchive::readCount() { } enum { - kCInteraction = 0, - kMessageQueue = 1, - kExCommand = 2, - kCObjstateCommand = 3 + kNullObject = 0, + kCInteraction = 1, + kMessageQueue = 2, + kExCommand = 3, + kCObjstateCommand = 4 }; const struct { @@ -88,7 +91,7 @@ MfcArchive::MfcArchive() { _lastIndex = 1; - _objectMap.push_back(0); + _objectMap.push_back(kNullObject); } CObject *MfcArchive::parseClass() { @@ -116,10 +119,9 @@ CObject *MfcArchive::parseClass() { debug(0, "tag: %d (%x)", _objectMap.size() - 1, objectId); objectId = _classMap[name]; + } else if ((obTag & 0x8000) == 0) { + objectId = _objectMap[obTag]; } else { - if ((obTag & 0x8000) == 0) { - error("Wrong object index format: %d at 0x%08x", obTag, pos() - 2); - } obTag &= ~0x8000; @@ -145,6 +147,9 @@ CObject *MfcArchive::parseClass() { return new ExCommand(); case kCObjstateCommand: return new CObjstateCommand(); + case kNullObject: + warning("parseClass: NULL object at 0x%08x", pos() - 2); + return 0; default: error("Unknown objectId: %d", objectId); } -- cgit v1.2.3 From 775065af1d23d9114594c96a77ecf04f1e722795 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 10 Jun 2013 01:03:15 +0300 Subject: FULLPIPE: Started CGameVar loading --- engines/fullpipe/objects.h | 61 +++++++++++++---------- engines/fullpipe/stateloader.cpp | 104 ++++++++++++++++++++++++++++++++++----- engines/fullpipe/utils.cpp | 21 ++++++-- engines/fullpipe/utils.h | 1 + 4 files changed, 145 insertions(+), 42 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 36f6996062..5f547902ee 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -31,7 +31,7 @@ class CObject { virtual ~CObject() {} }; -class CObList : Common::List, public CObject { +class CObList : public Common::List, public CObject { public: virtual bool load(MfcArchive &file); }; @@ -52,12 +52,9 @@ class MemoryObject { int libHandle; }; -class CObArray { - //CObject obj; - int m_pData; - int m_nSize; - int m_nMaxSize; - int m_nGrowBy; +class CObArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); }; struct CNode { @@ -82,16 +79,13 @@ class SceneTag : public CObject { virtual bool load(MfcArchive &file); }; -typedef Common::List SceneTagList_; - -class SceneTagList : public CObject { - SceneTagList_ _list; - +class SceneTagList : public Common::List, public CObject { public: virtual bool load(MfcArchive &file); }; class GameProject : public CObject { + public: int _field_4; char *_headerFilename; SceneTagList *_sceneTagList; @@ -180,13 +174,13 @@ class CInputController { }; class Sc2Array { - CObArray objs; + CObArray _objs; }; union VarValue { - int floatValue; + float floatValue; int intValue; - int stringValue; + char *stringValue; }; class Message { @@ -222,16 +216,19 @@ class ExCommand : public CObject { virtual bool load(MfcArchive &file); }; -class CGameVar { - //CObject obj; - CGameVar *nextVarObj; - CGameVar *prevVarObj; - CGameVar *parentVarObj; - CGameVar *subVars; - int field_14; - char *stringObj; - VarValue value; - int varType; + class CGameVar : public CObject { + CGameVar *_nextVarObj; + CGameVar *_prevVarObj; + CGameVar *_parentVarObj; + CGameVar *_subVars; + CGameVar *_field_14; + char *_stringObj; + VarValue _value; + int _varType; + + public: + CGameVar(); + virtual bool load(MfcArchive &file); }; class InventoryPoolItem { @@ -358,6 +355,18 @@ class CInventory2 : public CObject { virtual bool load(MfcArchive &file); }; +struct PreloadItem { + int preloadId1; + int preloadId2; + int sceneId; + int field_C; +}; + +class PreloadItems : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + class CGameLoader { public: CGameLoader(); @@ -387,7 +396,7 @@ class CGameLoader { void *_readSavegameCallback; int16 _field_F8; int16 _field_FA; - CObArray _preloadItems; + PreloadItems _preloadItems; CGameVar *_gameVar; char *_gameName; ExCommand _exCommand; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index c2a244b40e..64604a29e9 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -102,10 +102,19 @@ bool CGameLoader::load(MfcArchive &file) { _inventory.load(file); - debug(0, "%x", file.pos()); - _interactionController->load(file); + debug(0, "count: %d", _gameProject->_sceneTagList->size()); + + // TODO: Load Sc2 + + _preloadItems.load(file); + + _field_FA = file.readUint16LE(); + _field_F8 = file.readUint16LE(); + + _gameVar = (CGameVar *)file.readClass(); + return true; } @@ -158,7 +167,7 @@ bool SceneTagList::load(MfcArchive &file) { for (int i = 0; i < numEntries; i++) { SceneTag *t = new SceneTag(); t->load(file); - _list.push_back(*t); + push_back(*t); } return true; @@ -247,8 +256,7 @@ bool CObList::load(MfcArchive &file) { debug(0, "CObList::count: %d", count); for (int i = 0; i < count; i++) { - CObject *t = file.parseClass(); - t->load(file); + CObject *t = file.readClass(); push_back(*t); } @@ -290,11 +298,7 @@ bool CInteraction::load(MfcArchive &file) { _flags = file.readUint32LE(); _stringObj = file.readPascalString(); - // messageQueue - _messageQueue = (MessageQueue *)file.parseClass(); - - if (_messageQueue) - _messageQueue->load(file); + _messageQueue = (MessageQueue *)file.readClass(); return true; } @@ -317,8 +321,7 @@ bool MessageQueue::load(MfcArchive &file) { debug(0, "MessageQueue::count = %d", count); for (int i = 0; i < count; i++) { - CObject *tmp = file.parseClass(); - tmp->load(file); + CObject *tmp = file.readClass(); _exCommands.push_back(tmp); } @@ -397,4 +400,81 @@ bool CObjstateCommand::load(MfcArchive &file) { return true; } +bool CObArray::load(MfcArchive &file) { + int count = file.readCount(); + + debug(0, "CObArray::count: %d", count); + + resize(count); + + for (int i = 0; i < count; i++) { + CObject *t = file.readClass(); + + push_back(*t); + } + + return true; +} + +bool PreloadItems::load(MfcArchive &file) { + int count = file.readCount(); + + debug(0, "CObArray::count: %d", count); + + resize(count); + + for (int i = 0; i < count; i++) { + PreloadItem *t = new PreloadItem(); + t->preloadId1 = file.readUint32LE(); + t->preloadId2 = file.readUint32LE(); + t->sceneId = file.readUint32LE(); + t->field_C = file.readUint32LE(); + + push_back(*t); + } + + return true; +} + +CGameVar::CGameVar() { + _subVars = 0; + _parentVarObj = 0; + _nextVarObj = 0; + _prevVarObj = 0; + _field_14 = 0; + _varType = 0; + _value.floatValue = 0; +} + +bool CGameVar::load(MfcArchive &file) { + _stringObj = file.readPascalString(); + _varType = file.readUint32LE(); + debug(0, "CGameVar: %d", _varType); + + switch (_varType) { + case 0: + _value.intValue = file.readUint32LE(); + debug(0, "--> %d", _value.intValue); + break; + case 1: + _value.intValue = file.readUint32LE(); // FIXME + debug(0, "--> %f", _value.floatValue); + break; + case 2: + _value.stringValue = file.readPascalString(); + debug(0, "--> %s", _value.stringValue); + break; + default: + error("Unknown var type"); + } + + _parentVarObj = (CGameVar *)file.readClass(); + _prevVarObj = (CGameVar *)file.readClass(); + _nextVarObj = (CGameVar *)file.readClass(); + _field_14 = (CGameVar *)file.readClass(); + _subVars = (CGameVar *)file.readClass(); + + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 09f00b8042..aa4c270d54 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -60,7 +60,8 @@ enum { kCInteraction = 1, kMessageQueue = 2, kExCommand = 3, - kCObjstateCommand = 4 + kCObjstateCommand = 4, + kCGameVar = 5 }; const struct { @@ -71,6 +72,7 @@ const struct { { "MessageQueue", kMessageQueue }, { "ExCommand", kExCommand }, { "CObjstateCommand", kCObjstateCommand }, + { "CGameVar", kCGameVar }, { 0, 0 } }; @@ -94,6 +96,15 @@ MfcArchive::MfcArchive() { _objectMap.push_back(kNullObject); } +CObject *MfcArchive::readClass() { + CObject *res = parseClass(); + + if (res) + res->load(*this); + + return res; +} + CObject *MfcArchive::parseClass() { char *name; int objectId; @@ -139,6 +150,9 @@ CObject *MfcArchive::parseClass() { debug(0, "objectId: %d", objectId); switch (objectId) { + case kNullObject: + warning("parseClass: NULL object at 0x%08x", pos() - 2); + return 0; case kCInteraction: return new CInteraction(); case kMessageQueue: @@ -147,9 +161,8 @@ CObject *MfcArchive::parseClass() { return new ExCommand(); case kCObjstateCommand: return new CObjstateCommand(); - case kNullObject: - warning("parseClass: NULL object at 0x%08x", pos() - 2); - return 0; + case kCGameVar: + return new CGameVar(); default: error("Unknown objectId: %d", objectId); } diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index df56262421..a4e9413849 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -44,6 +44,7 @@ class MfcArchive : public Common::File { char *readPascalString(bool twoByte = false); int readCount(); CObject *parseClass(); + CObject *readClass(); }; } // End of namespace Fullpipe -- cgit v1.2.3 From f106d791983223906847343c4b1f1ec7ffcc05d5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 10 Jun 2013 01:21:56 +0300 Subject: FULLPIPE: Fix object indexing --- engines/fullpipe/stateloader.cpp | 7 +++---- engines/fullpipe/utils.cpp | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 64604a29e9..4189183860 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -449,20 +449,19 @@ CGameVar::CGameVar() { bool CGameVar::load(MfcArchive &file) { _stringObj = file.readPascalString(); _varType = file.readUint32LE(); - debug(0, "CGameVar: %d", _varType); switch (_varType) { case 0: _value.intValue = file.readUint32LE(); - debug(0, "--> %d", _value.intValue); + debug(0, "d --> %d", _value.intValue); break; case 1: _value.intValue = file.readUint32LE(); // FIXME - debug(0, "--> %f", _value.floatValue); + debug(0, "f --> %f", _value.floatValue); break; case 2: _value.stringValue = file.readPascalString(); - debug(0, "--> %s", _value.stringValue); + debug(0, "s --> %s", _value.stringValue); break; default: error("Unknown var type"); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index aa4c270d54..a81665b48b 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -127,7 +127,7 @@ CObject *MfcArchive::parseClass() { objectId = _classMap[name]; _objectMap.push_back(objectId); - debug(0, "tag: %d (%x)", _objectMap.size() - 1, objectId); + debug(0, "tag: %d 0x%x (%x)", _objectMap.size() - 1, _objectMap.size() - 1, objectId); objectId = _classMap[name]; } else if ((obTag & 0x8000) == 0) { @@ -145,7 +145,8 @@ CObject *MfcArchive::parseClass() { objectId = _objectMap[obTag]; } - _objectMap.push_back(objectId); + if (objectId) + _objectMap.push_back(objectId); debug(0, "objectId: %d", objectId); -- cgit v1.2.3 From a116677e6e26ed9d0e8fcc40eaf88c0c40b25391 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 11 Jun 2013 01:17:11 +0300 Subject: FULLPIPE: Finish loading fullpipe.gam --- engines/fullpipe/stateloader.cpp | 2 +- engines/fullpipe/utils.cpp | 92 ++++++++++++++++++++++++---------------- engines/fullpipe/utils.h | 5 ++- 3 files changed, 59 insertions(+), 40 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 4189183860..675a70c5a5 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -464,7 +464,7 @@ bool CGameVar::load(MfcArchive &file) { debug(0, "s --> %s", _value.stringValue); break; default: - error("Unknown var type"); + error("Unknown var type: %d (0x%x)", _varType, _varType); } _parentVarObj = (CGameVar *)file.readClass(); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index a81665b48b..5df9a28500 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -41,7 +41,7 @@ char *MfcArchive::readPascalString(bool twoByte) { tmp = (char *)calloc(len + 1, 1); read(tmp, len); - debug(0, "readPascalString: %d <%s>", len, tmp); + debug(9, "readPascalString: %d <%s>", len, tmp); return tmp; } @@ -85,6 +85,26 @@ static const char *lookupObjectId(int id) { return ""; } +static CObject *createObject(int objectId) { + switch (objectId) { + case kNullObject: + return 0; + case kCInteraction: + return new CInteraction(); + case kMessageQueue: + return new MessageQueue(); + case kExCommand: + return new ExCommand(); + case kCObjstateCommand: + return new CObjstateCommand(); + case kCGameVar: + return new CGameVar(); + default: + error("Unknown objectId: %d", objectId); + } + + return 0; +} MfcArchive::MfcArchive() { for (int i = 0; classMap[i].name; i++) { @@ -93,45 +113,60 @@ MfcArchive::MfcArchive() { _lastIndex = 1; - _objectMap.push_back(kNullObject); + _objectMap.push_back(0); + _objectIdMap.push_back(kNullObject); } CObject *MfcArchive::readClass() { - CObject *res = parseClass(); + bool isCopyReturned; + CObject *res = parseClass(&isCopyReturned); - if (res) + if (res && !isCopyReturned) res->load(*this); return res; } -CObject *MfcArchive::parseClass() { +CObject *MfcArchive::parseClass(bool *isCopyReturned) { char *name; - int objectId; + int objectId = 0; + CObject *res = 0; uint obTag = readUint16LE(); - debug(0, "parseClass::obTag = %d (%04x) at 0x%08x", obTag, obTag, pos() - 2); + debug(7, "parseClass::obTag = %d (%04x) at 0x%08x", obTag, obTag, pos() - 2); if (obTag == 0xffff) { int schema = readUint16LE(); - debug(0, "parseClass::schema = %d", schema); + debug(7, "parseClass::schema = %d", schema); name = readPascalString(true); - debug(0, "parseClass::class <%s>", name); + debug(7, "parseClass::class <%s>", name); if (!_classMap.contains(name)) { error("Unknown class in MfcArchive: <%s>", name); } objectId = _classMap[name]; - _objectMap.push_back(objectId); - debug(0, "tag: %d 0x%x (%x)", _objectMap.size() - 1, _objectMap.size() - 1, objectId); - objectId = _classMap[name]; + debug(7, "tag: %d 0x%x (%x)", _objectMap.size() - 1, _objectMap.size() - 1, objectId); + + res = createObject(objectId); + _objectMap.push_back(res); + _objectIdMap.push_back(objectId); + + _objectMap.push_back(res); // Basically a hack, but behavior is all correct + _objectIdMap.push_back(objectId); + + *isCopyReturned = false; } else if ((obTag & 0x8000) == 0) { - objectId = _objectMap[obTag]; + if (_objectMap.size() < obTag) { + error("Object index too big: %d at 0x%08x", obTag, pos() - 2); + } + res = _objectMap[obTag]; + + *isCopyReturned = true; } else { obTag &= ~0x8000; @@ -140,35 +175,18 @@ CObject *MfcArchive::parseClass() { error("Object index too big: %d at 0x%08x", obTag, pos() - 2); } - debug(0, "parseClass::obTag <%s>", lookupObjectId(_objectMap[obTag])); + debug(7, "parseClass::obTag <%s>", lookupObjectId(_objectIdMap[obTag])); - objectId = _objectMap[obTag]; - } - - if (objectId) - _objectMap.push_back(objectId); + objectId = _objectIdMap[obTag]; - debug(0, "objectId: %d", objectId); + res = createObject(objectId); + _objectMap.push_back(res); + _objectIdMap.push_back(objectId); - switch (objectId) { - case kNullObject: - warning("parseClass: NULL object at 0x%08x", pos() - 2); - return 0; - case kCInteraction: - return new CInteraction(); - case kMessageQueue: - return new MessageQueue(); - case kExCommand: - return new ExCommand(); - case kCObjstateCommand: - return new CObjstateCommand(); - case kCGameVar: - return new CGameVar(); - default: - error("Unknown objectId: %d", objectId); + *isCopyReturned = false; } - return 0; + return res; } } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index a4e9413849..abf7efb250 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -34,7 +34,8 @@ typedef Common::HashMap _objectMap; + Common::Array _objectMap; + Common::Array _objectIdMap; int _lastIndex; @@ -43,7 +44,7 @@ class MfcArchive : public Common::File { char *readPascalString(bool twoByte = false); int readCount(); - CObject *parseClass(); + CObject *parseClass(bool *isCopyReturned); CObject *readClass(); }; -- cgit v1.2.3 From ffd8ebacc51b873aca4e9e36227be11647e1442a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 11 Jun 2013 01:34:37 +0300 Subject: FULLPIPE: Removed excess debugging info and added variable levels --- engines/fullpipe/stateloader.cpp | 45 +++++++++++++++++----------------------- engines/fullpipe/utils.cpp | 1 + engines/fullpipe/utils.h | 5 +++++ 3 files changed, 25 insertions(+), 26 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 675a70c5a5..e9c5c3aea2 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -87,7 +87,7 @@ bool CGameLoader::loadFile(const char *fname) { bool CGameLoader::load(MfcArchive &file) { _gameName = file.readPascalString(); - debug(0, "_gameName: %s", _gameName); + debug(6, "_gameName: %s", _gameName); _gameProject = new GameProject(); @@ -98,13 +98,13 @@ bool CGameLoader::load(MfcArchive &file) { } _gameName = file.readPascalString(); - debug(0, "_gameName: %s", _gameName); + debug(6, "_gameName: %s", _gameName); _inventory.load(file); _interactionController->load(file); - debug(0, "count: %d", _gameProject->_sceneTagList->size()); + debug(6, "sceneTag count: %d", _gameProject->_sceneTagList->size()); // TODO: Load Sc2 @@ -135,10 +135,10 @@ bool GameProject::load(MfcArchive &file) { _headerFilename = file.readPascalString(); - debug(0, "_gameProjectVersion = %d", g_gameProjectVersion); - debug(0, "_gameProjectValue = %d", g_gameProjectValue); - debug(0, "_scrollSpeed = %d", g_scrollSpeed); - debug(0, "_headerFilename = %s", _headerFilename); + debug(1, "_gameProjectVersion = %d", g_gameProjectVersion); + debug(1, "_gameProjectValue = %d", g_gameProjectValue); + debug(1, "_scrollSpeed = %d", g_scrollSpeed); + debug(1, "_headerFilename = %s", _headerFilename); _sceneTagList = new SceneTagList(); @@ -162,8 +162,6 @@ GameProject::~GameProject() { bool SceneTagList::load(MfcArchive &file) { int numEntries = file.readUint16LE(); - debug(0, "numEntries: %d", numEntries); - for (int i = 0; i < numEntries; i++) { SceneTag *t = new SceneTag(); t->load(file); @@ -186,7 +184,7 @@ bool SceneTag::load(MfcArchive &file) { _tag = file.readPascalString(); - debug(0, "sceneId: %d tag: %s", _sceneId, _tag); + debug(6, "sceneId: %d tag: %s", _sceneId, _tag); return true; } @@ -199,8 +197,6 @@ bool CInventory::load(MfcArchive &file) { _sceneId = file.readUint16LE(); int numInvs = file.readUint32LE(); - debug(0, "numInvs: %d %x", numInvs, numInvs); - for (int i = 0; i < numInvs; i++) { InventoryPoolItem *t = new InventoryPoolItem(); t->_id = file.readUint16LE(); @@ -234,8 +230,6 @@ bool CInventory2::load(MfcArchive &file) { bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartially int numInvs = file.readUint32LE(); - debug(0, "numInvs: %d", numInvs); - for (int i = 0; i < numInvs; i++) { InventoryItem *t = new InventoryItem(); t->itemId = file.readUint16LE(); @@ -253,8 +247,6 @@ bool CInteractionController::load(MfcArchive &file) { bool CObList::load(MfcArchive &file) { int count = file.readCount(); - debug(0, "CObList::count: %d", count); - for (int i = 0; i < count; i++) { CObject *t = file.readClass(); @@ -318,7 +310,6 @@ bool MessageQueue::load(MfcArchive &file) { int count = file.readUint16LE(); _stringObj = file.readPascalString(); - debug(0, "MessageQueue::count = %d", count); for (int i = 0; i < count; i++) { CObject *tmp = file.readClass(); @@ -342,8 +333,6 @@ ExCommand::ExCommand() { } bool ExCommand::load(MfcArchive &file) { - debug(0, "ExCommand::load"); - _msg._parentId = file.readUint16LE(); _msg._messageKind = file.readUint32LE(); _msg._x = file.readUint32LE(); @@ -403,8 +392,6 @@ bool CObjstateCommand::load(MfcArchive &file) { bool CObArray::load(MfcArchive &file) { int count = file.readCount(); - debug(0, "CObArray::count: %d", count); - resize(count); for (int i = 0; i < count; i++) { @@ -419,8 +406,6 @@ bool CObArray::load(MfcArchive &file) { bool PreloadItems::load(MfcArchive &file) { int count = file.readCount(); - debug(0, "CObArray::count: %d", count); - resize(count); for (int i = 0; i < count; i++) { @@ -450,28 +435,36 @@ bool CGameVar::load(MfcArchive &file) { _stringObj = file.readPascalString(); _varType = file.readUint32LE(); + debugN(6, "[%03d] ", file.getLevel()); + for (int i = 0; i < file.getLevel(); i++) + debugN(6, " "); + + debugN(6, "<%s>: ", _stringObj); + switch (_varType) { case 0: _value.intValue = file.readUint32LE(); - debug(0, "d --> %d", _value.intValue); + debug(6, "d --> %d", _value.intValue); break; case 1: _value.intValue = file.readUint32LE(); // FIXME - debug(0, "f --> %f", _value.floatValue); + debug(6, "f --> %f", _value.floatValue); break; case 2: _value.stringValue = file.readPascalString(); - debug(0, "s --> %s", _value.stringValue); + debug(6, "s --> %s", _value.stringValue); break; default: error("Unknown var type: %d (0x%x)", _varType, _varType); } + file.incLevel(); _parentVarObj = (CGameVar *)file.readClass(); _prevVarObj = (CGameVar *)file.readClass(); _nextVarObj = (CGameVar *)file.readClass(); _field_14 = (CGameVar *)file.readClass(); _subVars = (CGameVar *)file.readClass(); + file.decLevel(); return true; } diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 5df9a28500..d85a01dd33 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -112,6 +112,7 @@ MfcArchive::MfcArchive() { } _lastIndex = 1; + _level = 0; _objectMap.push_back(0); _objectIdMap.push_back(kNullObject); diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index abf7efb250..7b117ef91c 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -38,6 +38,7 @@ class MfcArchive : public Common::File { Common::Array _objectIdMap; int _lastIndex; + int _level; public: MfcArchive(); @@ -46,6 +47,10 @@ class MfcArchive : public Common::File { int readCount(); CObject *parseClass(bool *isCopyReturned); CObject *readClass(); + + void incLevel() { _level++; } + void decLevel() { _level--; } + int getLevel() { return _level; } }; } // End of namespace Fullpipe -- cgit v1.2.3 From d3d3d01eb08cd7ee37480a9427bc563242aceeed Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 13 Jun 2013 00:57:54 +0300 Subject: FULLPIPE: Started sc2 file loading implementation --- engines/fullpipe/objects.h | 28 ++++++++++++++++++++++++---- engines/fullpipe/stateloader.cpp | 21 +++++++++++++++++++-- engines/fullpipe/utils.cpp | 12 ++++++------ 3 files changed, 49 insertions(+), 12 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 5f547902ee..a974852dba 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -29,6 +29,8 @@ class CObject { public: virtual bool load(MfcArchive &in) { return true; } virtual ~CObject() {} + + bool loadFile(const char *fname); }; class CObList : public Common::List, public CObject { @@ -66,6 +68,7 @@ struct CNode { typedef Common::Array CPtrList; class SceneTag : public CObject { + public: int _field_4; char *_tag; int _scene; @@ -173,8 +176,26 @@ class CInputController { CInputController(); }; -class Sc2Array { - CObArray _objs; +class Sc2 : public CObject { + int16 _sceneId; + int16 _field_2; + //Scene *_scene; + //CMotionController *_motionController; + int _data1; + int _count1; + int _defPicAniInfos; + int _defPicAniInfosCount; + int _picAniInfos; + int _picAniInfosCount; + int _isLoaded; + int _entranceData; + int _entranceDataCount; + + public: + virtual bool load(MfcArchive &file); +}; + +class Sc2Array : public Common::Array { }; union VarValue { @@ -367,12 +388,11 @@ class PreloadItems : public Common::Array, public CObject { virtual bool load(MfcArchive &file); }; -class CGameLoader { +class CGameLoader : public CObject { public: CGameLoader(); virtual ~CGameLoader(); - bool loadFile(const char *fname); virtual bool load(MfcArchive &file); private: diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index e9c5c3aea2..4602cee487 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -76,7 +76,7 @@ CGameLoader::~CGameLoader() { delete _gameProject; } -bool CGameLoader::loadFile(const char *fname) { +bool CObject::loadFile(const char *fname) { MfcArchive file; if (!file.open(fname)) @@ -106,7 +106,18 @@ bool CGameLoader::load(MfcArchive &file) { debug(6, "sceneTag count: %d", _gameProject->_sceneTagList->size()); - // TODO: Load Sc2 + _sc2array.resize(_gameProject->_sceneTagList->size()); + + int i = 0; + for (SceneTagList::const_iterator it = _gameProject->_sceneTagList->begin(); it != _gameProject->_sceneTagList->end(); ++it, i++) { + char tmp[12]; + + snprintf(tmp, 11, "%04d.sc2", it->_sceneId); + + debug(0, "sc: %d", it->_sceneId); + + _sc2array[i].loadFile((const char *)tmp); + } _preloadItems.load(file); @@ -469,4 +480,10 @@ bool CGameVar::load(MfcArchive &file) { return true; } +bool Sc2::load(MfcArchive &file) { + _sceneId = file.readUint16LE(); + + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index d85a01dd33..764da5abea 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -56,12 +56,12 @@ int MfcArchive::readCount() { } enum { - kNullObject = 0, - kCInteraction = 1, - kMessageQueue = 2, - kExCommand = 3, - kCObjstateCommand = 4, - kCGameVar = 5 + kNullObject, + kCInteraction, + kMessageQueue, + kExCommand, + kCObjstateCommand, + kCGameVar }; const struct { -- cgit v1.2.3 From 928c19eeb0b2164fc925e71eed8ed1f4e137ddd2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 14 Jun 2013 00:12:01 +0300 Subject: FULLPIPE: More work on Sc2 loader --- engines/fullpipe/objects.h | 13 +++++++++++-- engines/fullpipe/stateloader.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index a974852dba..069d25d125 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -176,11 +176,20 @@ class CInputController { CInputController(); }; +class CMotionController : public CObject { + int _field_4; + int _isEnabled; + + public: + CMotionController() : _isEnabled(1) {} + virtual bool load(MfcArchive &file); +}; + class Sc2 : public CObject { int16 _sceneId; int16 _field_2; //Scene *_scene; - //CMotionController *_motionController; + CMotionController *_motionController; int _data1; int _count1; int _defPicAniInfos; @@ -192,6 +201,7 @@ class Sc2 : public CObject { int _entranceDataCount; public: + Sc2(); virtual bool load(MfcArchive &file); }; @@ -396,7 +406,6 @@ class CGameLoader : public CObject { virtual bool load(MfcArchive &file); private: - //CObject _obj; GameProject *_gameProject; CInteractionController *_interactionController; int _field_C; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 4602cee487..ea8a3dbe2d 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -480,9 +480,35 @@ bool CGameVar::load(MfcArchive &file) { return true; } +Sc2::Sc2() { + _sceneId = 0; + _field_2 = 0; + //_scene = 0; + _motionController = 0; + _data1 = 0; + _count1 = 0; + _defPicAniInfos = 0; + _defPicAniInfosCount = 0; + _picAniInfos = 0; + _picAniInfosCount = 0; + _isLoaded = 0; + _entranceData = 0; + _entranceDataCount = 0; +} + bool Sc2::load(MfcArchive &file) { _sceneId = file.readUint16LE(); + file.readClass(); + _motionController->load(file); + + return true; +} + + +bool CMotionController::load(MfcArchive &file) { + // Is originally empty + return true; } -- cgit v1.2.3 From e24ce22ca7b62982c31a8a907f8423983be39bde Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 15 Jun 2013 01:19:45 +0300 Subject: FULLPIPE: Continued work on loading sc2 files --- engines/fullpipe/objects.h | 12 ++++++++++++ engines/fullpipe/stateloader.cpp | 22 +++++++++++++++++++--- engines/fullpipe/utils.cpp | 6 +++++- 3 files changed, 36 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 069d25d125..e6ed98dc50 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -185,6 +185,18 @@ class CMotionController : public CObject { virtual bool load(MfcArchive &file); }; +class CMctlCompoundArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +class CMctlCompound : public CMotionController { + CMctlCompoundArray motionControllers; + + public: + virtual bool load(MfcArchive &file); +}; + class Sc2 : public CObject { int16 _sceneId; int16 _field_2; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index ea8a3dbe2d..9698da87e8 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -499,15 +499,31 @@ Sc2::Sc2() { bool Sc2::load(MfcArchive &file) { _sceneId = file.readUint16LE(); - file.readClass(); - _motionController->load(file); + _motionController = (CMotionController *)file.readClass(); return true; } bool CMotionController::load(MfcArchive &file) { - // Is originally empty + // Is originally empty file.readClass(); + + + return true; +} + +bool CMctlCompound::load(MfcArchive &file) { + int count = file.readUint32LE(); + + debug(0, "CMctlCompund::count = %d", count); + + return true; +} + +bool CMctlCompoundArray::load(MfcArchive &file) { + int count = file.readUint32LE(); + + debug(0, "CMctlCompundArray::count = %d", count); return true; } diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 764da5abea..9c9246a5f2 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -61,7 +61,8 @@ enum { kMessageQueue, kExCommand, kCObjstateCommand, - kCGameVar + kCGameVar, + kCMctlCompound }; const struct { @@ -73,6 +74,7 @@ const struct { { "ExCommand", kExCommand }, { "CObjstateCommand", kCObjstateCommand }, { "CGameVar", kCGameVar }, + { "CMctlCompound", kCMctlCompound }, { 0, 0 } }; @@ -99,6 +101,8 @@ static CObject *createObject(int objectId) { return new CObjstateCommand(); case kCGameVar: return new CGameVar(); + case kCMctlCompound: + return new CMctlCompound(); default: error("Unknown objectId: %d", objectId); } -- cgit v1.2.3 From 5eaa5696e7b80b3dcc4e26979b3ee1976cba4b49 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 15 Jun 2013 14:18:37 +0300 Subject: FULLPIPE: Added module.mk OOPS! --- engines/fullpipe/module.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 engines/fullpipe/module.mk (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk new file mode 100644 index 0000000000..319df8cfd3 --- /dev/null +++ b/engines/fullpipe/module.mk @@ -0,0 +1,16 @@ +MODULE := engines/fullpipe + +MODULE_OBJS = \ + detection.o \ + fullpipe.o \ + ngiarchive.o \ + stateloader.o \ + utils.o + +# This module can be built as a plugin +ifdef BUILD_PLUGINS +PLUGIN := 1 +endif + +# Include common rules +include $(srcdir)/rules.mk -- cgit v1.2.3 From a3de44d3b2ca9e30692d074fd538f89f20611c8c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 13 Jul 2013 11:50:51 +0300 Subject: FULLPIPE: Further work on sc2 loader --- engines/fullpipe/objects.h | 114 +++++++++++++++++++++++++-------------- engines/fullpipe/stateloader.cpp | 6 +++ 2 files changed, 80 insertions(+), 40 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index e6ed98dc50..81b172c548 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -190,17 +190,89 @@ class CMctlCompoundArray : public Common::Array, public CObject { virtual bool load(MfcArchive &file); }; +class CMctlConnectionPointsArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +class CMctlCompoundArrayItem : public CObject { + int _motionControllerObj; + int _movGraphReactObj; + CMctlConnectionPointsArray _connectionPoints; + int _field_20; + int _field_24; + int _field_28; + + public: + CMctlCompoundArrayItem() : _movGraphReactObj(0), _motionControllerObj(0) {} +}; + class CMctlCompound : public CMotionController { - CMctlCompoundArray motionControllers; + CMctlCompoundArray _motionControllers; + + public: + virtual bool load(MfcArchive &file); +}; + +class Unk2 { + //CObject CObject; + int items; + int count; +}; +class CMovGraph : public CMotionController { + CObList _nodes; + CObList _links; + int _field_44; + int _items; + int _itemsCount; + int (*_callback1)(int, int, int); + Unk2 _unk2; +}; + +class ShadowsItemArray : public Common::Array, public CObject { public: virtual bool load(MfcArchive &file); }; +class Background { + CPtrList list; + int stringObj; + int x; + int y; + int16 messageQueueId; + int colorMemoryObj; + int bigPictureArray1Count; + int bigPictureArray2Count; + int bigPictureArray; +}; + +class Shadows { + //CObject obj; + int sceneId; + int staticAniObjectId; + int movementId; + ShadowsItemArray items; +}; + +class Scene { + Background bg; + CPtrList staticANIObjectList1; + CPtrList staticANIObjectList2; + CPtrList messageQueueList; + CPtrList faObjectList; + Shadows *shadows; + int soundList; + int16 sceneId; + int stringObj; + int field_BC; + int libHandle; +}; + class Sc2 : public CObject { int16 _sceneId; int16 _field_2; - //Scene *_scene; + Scene *_scene; CMotionController *_motionController; int _data1; int _count1; @@ -322,44 +394,6 @@ class InventoryIcon { typedef Common::Array InventoryIcons; -class Background { - CPtrList list; - int stringObj; - int x; - int y; - int16 messageQueueId; - int colorMemoryObj; - int bigPictureArray1Count; - int bigPictureArray2Count; - int bigPictureArray; -}; - -class ShadowsItemArray { - CObArray objs; -}; - -class Shadows { - //CObject obj; - int sceneId; - int staticAniObjectId; - int movementId; - ShadowsItemArray items; -}; - -class Scene { - Background bg; - CPtrList staticANIObjectList1; - CPtrList staticANIObjectList2; - CPtrList messageQueueList; - CPtrList faObjectList; - Shadows *shadows; - int soundList; - int16 sceneId; - int stringObj; - int field_BC; - int libHandle; -}; - class Picture { MemoryObject obj; Common::Rect rect; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 9698da87e8..f242969a09 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -517,6 +517,12 @@ bool CMctlCompound::load(MfcArchive &file) { debug(0, "CMctlCompund::count = %d", count); + for (int i = 0; i < count; i++) { + CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); + + _motionControllers.push_back(*obj); + } + return true; } -- cgit v1.2.3 From 0f9c1281d4e4f0c4e2e942994f9162c88033c01f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 16 Jun 2013 15:07:33 +0300 Subject: FULLPIPE: CMovGraph loader --- engines/fullpipe/objects.h | 14 ++++++++++---- engines/fullpipe/stateloader.cpp | 15 +++++++++++++++ engines/fullpipe/utils.cpp | 6 +++++- 3 files changed, 30 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 81b172c548..50f1bf0651 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -214,10 +214,12 @@ class CMctlCompound : public CMotionController { virtual bool load(MfcArchive &file); }; -class Unk2 { - //CObject CObject; - int items; - int count; +class Unk2 : public CObject { + int _items; + int _count; + + public: + Unk2() : _items(0), _count(0) {} }; class CMovGraph : public CMotionController { @@ -228,6 +230,10 @@ class CMovGraph : public CMotionController { int _itemsCount; int (*_callback1)(int, int, int); Unk2 _unk2; + + public: + CMovGraph(); + virtual bool load(MfcArchive &file); }; class ShadowsItemArray : public Common::Array, public CObject { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index f242969a09..5c68742cc8 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -534,4 +534,19 @@ bool CMctlCompoundArray::load(MfcArchive &file) { return true; } +CMovGraph::CMovGraph() { + _itemsCount = 0; + _items = 0; + //_callback1 = CMovGraphCallback1; // TODO + _field_44 = 0; + // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129); +} + +bool CMovGraph::load(MfcArchive &file) { + _links.load(file); + _nodes.load(file); + + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 9c9246a5f2..34cf3c57a4 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -62,7 +62,8 @@ enum { kExCommand, kCObjstateCommand, kCGameVar, - kCMctlCompound + kCMctlCompound, + kCMovGraph }; const struct { @@ -75,6 +76,7 @@ const struct { { "CObjstateCommand", kCObjstateCommand }, { "CGameVar", kCGameVar }, { "CMctlCompound", kCMctlCompound }, + { "CMovGraph", kCMovGraph }, { 0, 0 } }; @@ -103,6 +105,8 @@ static CObject *createObject(int objectId) { return new CGameVar(); case kCMctlCompound: return new CMctlCompound(); + case kCMovGraph: + return new CMovGraph(); default: error("Unknown objectId: %d", objectId); } -- cgit v1.2.3 From a8d733b2b2c8c110bada0c99ac801ecc1ca0b844 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 16 Jun 2013 15:11:18 +0300 Subject: FULLPIPE: Split out motion-related classes --- engines/fullpipe/module.mk | 1 + engines/fullpipe/motion.cpp | 79 +++++++++++++++++++++++++++ engines/fullpipe/motion.h | 112 +++++++++++++++++++++++++++++++++++++++ engines/fullpipe/objects.h | 62 +--------------------- engines/fullpipe/stateloader.cpp | 45 ---------------- engines/fullpipe/utils.cpp | 1 + 6 files changed, 195 insertions(+), 105 deletions(-) create mode 100644 engines/fullpipe/motion.cpp create mode 100644 engines/fullpipe/motion.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 319df8cfd3..a2402e0272 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -3,6 +3,7 @@ MODULE := engines/fullpipe MODULE_OBJS = \ detection.o \ fullpipe.o \ + motion.o \ ngiarchive.o \ stateloader.o \ utils.o diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp new file mode 100644 index 0000000000..d3688bd9f2 --- /dev/null +++ b/engines/fullpipe/motion.cpp @@ -0,0 +1,79 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "common/file.h" +#include "common/array.h" +#include "common/list.h" + +#include "fullpipe/utils.h" +#include "fullpipe/objects.h" +#include "fullpipe/motion.h" + +namespace Fullpipe { + +bool CMotionController::load(MfcArchive &file) { + // Is originally empty file.readClass(); + + + return true; +} + +bool CMctlCompound::load(MfcArchive &file) { + int count = file.readUint32LE(); + + debug(0, "CMctlCompund::count = %d", count); + + for (int i = 0; i < count; i++) { + CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); + + _motionControllers.push_back(*obj); + } + + return true; +} + +bool CMctlCompoundArray::load(MfcArchive &file) { + int count = file.readUint32LE(); + + debug(0, "CMctlCompundArray::count = %d", count); + + return true; +} + +CMovGraph::CMovGraph() { + _itemsCount = 0; + _items = 0; + //_callback1 = CMovGraphCallback1; // TODO + _field_44 = 0; + // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129); +} + +bool CMovGraph::load(MfcArchive &file) { + _links.load(file); + _nodes.load(file); + + return true; +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h new file mode 100644 index 0000000000..5bd18f3746 --- /dev/null +++ b/engines/fullpipe/motion.h @@ -0,0 +1,112 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_MOTION_H +#define FULLPIPE_MOTION_H + +namespace Fullpipe { + +class CMotionController : public CObject { + int _field_4; + int _isEnabled; + + public: + CMotionController() : _isEnabled(1) {} + virtual bool load(MfcArchive &file); +}; + +class CMctlCompoundArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +class CMctlConnectionPointsArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +class CMctlCompoundArrayItem : public CObject { + int _motionControllerObj; + int _movGraphReactObj; + CMctlConnectionPointsArray _connectionPoints; + int _field_20; + int _field_24; + int _field_28; + + public: + CMctlCompoundArrayItem() : _movGraphReactObj(0), _motionControllerObj(0) {} +}; + +class CMctlCompound : public CMotionController { + CMctlCompoundArray _motionControllers; + + public: + virtual bool load(MfcArchive &file); +}; + +class Unk2 : public CObject { + int _items; + int _count; + + public: + Unk2() : _items(0), _count(0) {} +}; + +class CMovGraphLink : public CObject { + int movGraphNode1; + int movGraphNode2; + int dwordArray1; + int field_10; + int field_14; + int field_18; + int field_1C; + int dwordArray2; + int field_24; + int field_28; + int field_2C; + int field_30; + int flags; + int field_38; + int field_3C; + double distance; + double angle; + int movGraphReact; + int name; +}; + +class CMovGraph : public CMotionController { + CObList _nodes; + CObList _links; + int _field_44; + int _items; + int _itemsCount; + int (*_callback1)(int, int, int); + Unk2 _unk2; + + public: + CMovGraph(); + virtual bool load(MfcArchive &file); +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_MOTION_H */ diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 50f1bf0651..1d4167053c 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -176,66 +176,6 @@ class CInputController { CInputController(); }; -class CMotionController : public CObject { - int _field_4; - int _isEnabled; - - public: - CMotionController() : _isEnabled(1) {} - virtual bool load(MfcArchive &file); -}; - -class CMctlCompoundArray : public Common::Array, public CObject { - public: - virtual bool load(MfcArchive &file); -}; - -class CMctlConnectionPointsArray : public Common::Array, public CObject { - public: - virtual bool load(MfcArchive &file); -}; - -class CMctlCompoundArrayItem : public CObject { - int _motionControllerObj; - int _movGraphReactObj; - CMctlConnectionPointsArray _connectionPoints; - int _field_20; - int _field_24; - int _field_28; - - public: - CMctlCompoundArrayItem() : _movGraphReactObj(0), _motionControllerObj(0) {} -}; - -class CMctlCompound : public CMotionController { - CMctlCompoundArray _motionControllers; - - public: - virtual bool load(MfcArchive &file); -}; - -class Unk2 : public CObject { - int _items; - int _count; - - public: - Unk2() : _items(0), _count(0) {} -}; - -class CMovGraph : public CMotionController { - CObList _nodes; - CObList _links; - int _field_44; - int _items; - int _itemsCount; - int (*_callback1)(int, int, int); - Unk2 _unk2; - - public: - CMovGraph(); - virtual bool load(MfcArchive &file); -}; - class ShadowsItemArray : public Common::Array, public CObject { public: virtual bool load(MfcArchive &file); @@ -275,6 +215,8 @@ class Scene { int libHandle; }; +class CMotionController; + class Sc2 : public CObject { int16 _sceneId; int16 _field_2; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 5c68742cc8..75669df602 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -504,49 +504,4 @@ bool Sc2::load(MfcArchive &file) { return true; } - -bool CMotionController::load(MfcArchive &file) { - // Is originally empty file.readClass(); - - - return true; -} - -bool CMctlCompound::load(MfcArchive &file) { - int count = file.readUint32LE(); - - debug(0, "CMctlCompund::count = %d", count); - - for (int i = 0; i < count; i++) { - CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); - - _motionControllers.push_back(*obj); - } - - return true; -} - -bool CMctlCompoundArray::load(MfcArchive &file) { - int count = file.readUint32LE(); - - debug(0, "CMctlCompundArray::count = %d", count); - - return true; -} - -CMovGraph::CMovGraph() { - _itemsCount = 0; - _items = 0; - //_callback1 = CMovGraphCallback1; // TODO - _field_44 = 0; - // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129); -} - -bool CMovGraph::load(MfcArchive &file) { - _links.load(file); - _nodes.load(file); - - return true; -} - } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 34cf3c57a4..ba014a54cc 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -26,6 +26,7 @@ #include "fullpipe/utils.h" #include "fullpipe/objects.h" +#include "fullpipe/motion.h" namespace Fullpipe { -- cgit v1.2.3 From 5ea45699a889cdc15f33f449a4d8c20dd231b8e9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 16 Jun 2013 16:10:46 +0300 Subject: FULLPIPE: Reading CMovGraphNode --- engines/fullpipe/motion.cpp | 40 +++++++++++++++++++++++++++++++ engines/fullpipe/motion.h | 51 +++++++++++++++++++++++++--------------- engines/fullpipe/objects.h | 5 ++++ engines/fullpipe/stateloader.cpp | 16 +++++++++++++ engines/fullpipe/utils.cpp | 27 ++++++++++++++++++++- engines/fullpipe/utils.h | 1 + 6 files changed, 120 insertions(+), 20 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index d3688bd9f2..815b0c365e 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -76,4 +76,44 @@ bool CMovGraph::load(MfcArchive &file) { return true; } +CMovGraphLink::CMovGraphLink() { + _distance = 0; + _angle = 0; + _flags = 0x10000000; + _movGraphNode2 = 0; + _movGraphNode1 = 0; + _field_3C = 0; + _field_38 = 0; + _movGraphReact = 0; +} + +bool CMovGraphLink::load(MfcArchive &file) { + _dwordArray1.load(file); + _dwordArray2.load(file); + + _flags = file.readUint32LE(); + + _movGraphNode1 = (CMovGraphNode *)file.readClass(); + _movGraphNode2 = (CMovGraphNode *)file.readClass(); + + _distance = file.readDouble(); + _angle = file.readDouble(); + + debug(0, "distance: %g, angle: %g", _distance, _angle); + + _movGraphReact = (CMovGraphReact *)file.readClass(); + _name = file.readPascalString(); + + return true; +} + +bool CMovGraphNode::load(MfcArchive &file) { + _field_14 = file.readUint32LE(); + _x = file.readUint32LE(); + _y = file.readUint32LE(); + _distance = file.readUint32LE(); + + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 5bd18f3746..508a7f7af6 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -71,26 +71,39 @@ class Unk2 : public CObject { Unk2() : _items(0), _count(0) {} }; +class CMovGraphNode : public CObject { + int _x; + int _y; + int _distance; + int16 _field_10; + int16 _field_12; + int _field_14; + + public: + CMovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {} + virtual bool load(MfcArchive &file); +}; + +class CMovGraphReact : public CObject { + // Empty +}; + class CMovGraphLink : public CObject { - int movGraphNode1; - int movGraphNode2; - int dwordArray1; - int field_10; - int field_14; - int field_18; - int field_1C; - int dwordArray2; - int field_24; - int field_28; - int field_2C; - int field_30; - int flags; - int field_38; - int field_3C; - double distance; - double angle; - int movGraphReact; - int name; + CMovGraphNode *_movGraphNode1; + CMovGraphNode *_movGraphNode2; + CDWordArray _dwordArray1; + CDWordArray _dwordArray2; + int _flags; + int _field_38; + int _field_3C; + double _distance; + double _angle; + CMovGraphReact *_movGraphReact; + char *_name; + + public: + CMovGraphLink(); + virtual bool load(MfcArchive &file); }; class CMovGraph : public CMotionController { diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 1d4167053c..e385acf406 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -59,6 +59,11 @@ class CObArray : public Common::Array, public CObject { virtual bool load(MfcArchive &file); }; +class CDWordArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + struct CNode { CNode *pNext; CNode *pPrev; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 75669df602..d5a9fe2102 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -504,4 +504,20 @@ bool Sc2::load(MfcArchive &file) { return true; } +bool CDWordArray::load(MfcArchive &file) { + int count = file.readCount(); + + debug(0, "CDWordArray::count: %d", count); + + resize(count); + + for (int i = 0; i < count; i++) { + int32 t = file.readUint32LE(); + + push_back(t); + } + + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index ba014a54cc..4add1bae22 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -56,6 +56,23 @@ int MfcArchive::readCount() { return count; } +double MfcArchive::readDouble() { + // FIXME: This is utterly cruel and unportable + + union { + struct { + int32 a; + int32 b; + } i; + double d; + } tmp; + + tmp.i.a = readUint32LE(); + tmp.i.b = readUint32LE(); + + return tmp.d; +} + enum { kNullObject, kCInteraction, @@ -64,7 +81,9 @@ enum { kCObjstateCommand, kCGameVar, kCMctlCompound, - kCMovGraph + kCMovGraph, + kCMovGraphLink, + kCMovGraphNode }; const struct { @@ -78,6 +97,8 @@ const struct { { "CGameVar", kCGameVar }, { "CMctlCompound", kCMctlCompound }, { "CMovGraph", kCMovGraph }, + { "CMovGraphLink", kCMovGraphLink }, + { "CMovGraphNode", kCMovGraphNode }, { 0, 0 } }; @@ -108,6 +129,10 @@ static CObject *createObject(int objectId) { return new CMctlCompound(); case kCMovGraph: return new CMovGraph(); + case kCMovGraphLink: + return new CMovGraphLink(); + case kCMovGraphNode: + return new CMovGraphNode(); default: error("Unknown objectId: %d", objectId); } diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 7b117ef91c..c46fe38620 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -45,6 +45,7 @@ class MfcArchive : public Common::File { char *readPascalString(bool twoByte = false); int readCount(); + double readDouble(); CObject *parseClass(bool *isCopyReturned); CObject *readClass(); -- cgit v1.2.3 From 630d5526ee9618ac1f84021b2306477e81e343d2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 18 Jun 2013 10:04:29 -0400 Subject: FULLPIPE: Implemented CReactParallel loader --- engines/fullpipe/motion.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/motion.h | 42 ++++++++++++++++++++++++++------------ engines/fullpipe/utils.cpp | 6 +++++- 3 files changed, 83 insertions(+), 14 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 815b0c365e..a25d47505b 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -116,4 +116,53 @@ bool CMovGraphNode::load(MfcArchive &file) { return true; } +CReactParallel::CReactParallel() { + _x1 = 0; + _x2 = 0; + _dy = 0; + _dx = 0; + _points = 0; + _y1 = 0; + _y2 = 0; +} + +bool CReactParallel::load(MfcArchive &file) { + _x1 = file.readUint32LE(); + _y1 = file.readUint32LE(); + _x2 = file.readUint32LE(); + _y2 = file.readUint32LE(); + _dx = file.readUint32LE(); + _dy = file.readUint32LE(); + + createRegion(); + + return true; +} + +void CReactParallel::createRegion() { + _points = (Common::Point **)malloc(sizeof(Common::Point *) * 4); + + for (int i = 0; i < 4; i++) + _points[i] = new Common::Point; + + double at = atan2(_x1 - _x2, _y1 - _y2) + 1.570796; + double sn = sin(at); + double cs = cos(at); + + _points[0]->x = (int16)(_x1 - _dx * cs); + _points[0]->y = (int16)(_y1 - _dx * sn); + + _points[1]->x = (int16)(_x2 - _dx * cs); + _points[1]->y = (int16)(_y2 - _dx * sn); + + _points[2]->x = (int16)(_x1 + _dy * cs); + _points[2]->y = (int16)(_y2 + _dy * sn); + + _points[3]->x = (int16)(_x1 + _dy * cs); + _points[3]->y = (int16)(_y1 + _dy * sn); + + // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2); +} + + } // End of namespace Fullpipe diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 508a7f7af6..f5e8632b26 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -88,22 +88,38 @@ class CMovGraphReact : public CObject { // Empty }; +class CReactParallel : public CMovGraphReact { + //CRgn _rgn; + int _x1; + int _y1; + int _x2; + int _y2; + int _dx; + int _dy; + Common::Point **_points; + + public: + CReactParallel(); + virtual bool load(MfcArchive &file); + void createRegion(); +}; + class CMovGraphLink : public CObject { - CMovGraphNode *_movGraphNode1; - CMovGraphNode *_movGraphNode2; - CDWordArray _dwordArray1; - CDWordArray _dwordArray2; - int _flags; - int _field_38; - int _field_3C; - double _distance; - double _angle; - CMovGraphReact *_movGraphReact; - char *_name; + CMovGraphNode *_movGraphNode1; + CMovGraphNode *_movGraphNode2; + CDWordArray _dwordArray1; + CDWordArray _dwordArray2; + int _flags; + int _field_38; + int _field_3C; + double _distance; + double _angle; + CMovGraphReact *_movGraphReact; + char *_name; public: - CMovGraphLink(); - virtual bool load(MfcArchive &file); + CMovGraphLink(); + virtual bool load(MfcArchive &file); }; class CMovGraph : public CMotionController { diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 4add1bae22..df6c869a82 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -83,7 +83,8 @@ enum { kCMctlCompound, kCMovGraph, kCMovGraphLink, - kCMovGraphNode + kCMovGraphNode, + kCReactParallel }; const struct { @@ -99,6 +100,7 @@ const struct { { "CMovGraph", kCMovGraph }, { "CMovGraphLink", kCMovGraphLink }, { "CMovGraphNode", kCMovGraphNode }, + { "CReactParallel", kCReactParallel }, { 0, 0 } }; @@ -133,6 +135,8 @@ static CObject *createObject(int objectId) { return new CMovGraphLink(); case kCMovGraphNode: return new CMovGraphNode(); + case kCReactParallel: + return new CReactParallel(); default: error("Unknown objectId: %d", objectId); } -- cgit v1.2.3 From 195d52e625b1d24ea0cbda3bb8d65043d1b5eea5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 18 Jun 2013 10:23:49 -0400 Subject: FULLPIPE: Implement loading CReactPolygonal. That completes .sc2 loading --- engines/fullpipe/motion.cpp | 35 +++++++++++++++++++++++++++++++++++ engines/fullpipe/motion.h | 13 +++++++++++++ engines/fullpipe/utils.cpp | 6 +++++- 3 files changed, 53 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index a25d47505b..64fbd083de 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -164,5 +164,40 @@ void CReactParallel::createRegion() { // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2); } +CReactPolygonal::CReactPolygonal() { + _field_C = 0; + _points = 0; + _pointCount = 0; + _field_10 = 0; +} + +bool CReactPolygonal::load(MfcArchive &file) { + _field_C = file.readUint32LE(); + _field_10 = file.readUint32LE(); + _pointCount = file.readUint32LE(); + + if (_pointCount > 0) { + _points = (Common::Point **)malloc(sizeof(Common::Point *) * _pointCount); + + for (int i = 0; i < _pointCount; i++) { + _points[i] = new Common::Point; + + _points[i]->x = file.readUint32LE(); + _points[i]->y = file.readUint32LE(); + } + + } + + createRegion(); + + return true; +} + +void CReactPolygonal::createRegion() { + if (_points) { + + // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, _pointCount, 2); + } +} } // End of namespace Fullpipe diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index f5e8632b26..bbb37f4296 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -104,6 +104,19 @@ class CReactParallel : public CMovGraphReact { void createRegion(); }; +class CReactPolygonal : public CMovGraphReact { + //CRgn _rgn; + int _field_C; + int _field_10; + int _pointCount; + Common::Point **_points; + + public: + CReactPolygonal(); + virtual bool load(MfcArchive &file); + void createRegion(); +}; + class CMovGraphLink : public CObject { CMovGraphNode *_movGraphNode1; CMovGraphNode *_movGraphNode2; diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index df6c869a82..6a09174bc6 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -84,7 +84,8 @@ enum { kCMovGraph, kCMovGraphLink, kCMovGraphNode, - kCReactParallel + kCReactParallel, + kCReactPolygonal }; const struct { @@ -101,6 +102,7 @@ const struct { { "CMovGraphLink", kCMovGraphLink }, { "CMovGraphNode", kCMovGraphNode }, { "CReactParallel", kCReactParallel }, + { "CReactPolygonal", kCReactPolygonal }, { 0, 0 } }; @@ -137,6 +139,8 @@ static CObject *createObject(int objectId) { return new CMovGraphNode(); case kCReactParallel: return new CReactParallel(); + case kCReactPolygonal: + return new CReactPolygonal(); default: error("Unknown objectId: %d", objectId); } -- cgit v1.2.3 From fcf0d240d0266fa89073e12d2a15a045b6bdfe65 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 18 Jun 2013 17:07:28 -0400 Subject: FULLPIPE: Finish reading CMctlCompund --- engines/fullpipe/motion.cpp | 21 +++++++++- engines/fullpipe/motion.h | 37 ++++++++++++------ engines/fullpipe/objects.h | 39 +++++++++++++++++-- engines/fullpipe/stateloader.cpp | 82 +++++++++++++++++++++++++++++++++++++++- 4 files changed, 160 insertions(+), 19 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 64fbd083de..f10388a98e 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -42,11 +42,26 @@ bool CMotionController::load(MfcArchive &file) { bool CMctlCompound::load(MfcArchive &file) { int count = file.readUint32LE(); - debug(0, "CMctlCompund::count = %d", count); + debug(0, "CMctlCompound::count = %d", count); for (int i = 0; i < count; i++) { + debug(0, "CompoundArray[%d]", i); CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); + int count1 = file.readUint32LE(); + + for (int j = 0; j < count1; j++) { + debug(0, "ConnectionPoint[%d]", j); + CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass(); + + obj->_connectionPoints.push_back(*obj1); + } + + obj->_field_20 = file.readUint32LE(); + obj->_field_24 = file.readUint32LE(); + + obj->_movGraphReactObj = (CMovGraphReact *)file.readClass(); + _motionControllers.push_back(*obj); } @@ -56,7 +71,7 @@ bool CMctlCompound::load(MfcArchive &file) { bool CMctlCompoundArray::load(MfcArchive &file) { int count = file.readUint32LE(); - debug(0, "CMctlCompundArray::count = %d", count); + debug(0, "CMctlCompoundArray::count = %d", count); return true; } @@ -93,7 +108,9 @@ bool CMovGraphLink::load(MfcArchive &file) { _flags = file.readUint32LE(); + debug(0, "GraphNode1"); _movGraphNode1 = (CMovGraphNode *)file.readClass(); + debug(0, "GraphNode2"); _movGraphNode2 = (CMovGraphNode *)file.readClass(); _distance = file.readDouble(); diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index bbb37f4296..fb7b45446e 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -44,18 +44,6 @@ class CMctlConnectionPointsArray : public Common::Array, public CObject virtual bool load(MfcArchive &file); }; -class CMctlCompoundArrayItem : public CObject { - int _motionControllerObj; - int _movGraphReactObj; - CMctlConnectionPointsArray _connectionPoints; - int _field_20; - int _field_24; - int _field_28; - - public: - CMctlCompoundArrayItem() : _movGraphReactObj(0), _motionControllerObj(0) {} -}; - class CMctlCompound : public CMotionController { CMctlCompoundArray _motionControllers; @@ -88,6 +76,20 @@ class CMovGraphReact : public CObject { // Empty }; +class CMctlCompoundArrayItem : public CMotionController { + friend class CMctlCompound; + + protected: + CMovGraphReact *_movGraphReactObj; + CMctlConnectionPointsArray _connectionPoints; + int _field_20; + int _field_24; + int _field_28; + + public: + CMctlCompoundArrayItem() : _movGraphReactObj(0) {} +}; + class CReactParallel : public CMovGraphReact { //CRgn _rgn; int _x1; @@ -149,6 +151,17 @@ class CMovGraph : public CMotionController { virtual bool load(MfcArchive &file); }; +class CMctlConnectionPoint : public CObject { + int _connectionX; + int _connectionY; + int _field_C; + int _field_10; + int16 _field_14; + int16 _field_16; + int _messageQueueObj; + int _motionControllerObj; +}; + } // End of namespace Fullpipe #endif /* FULLPIPE_MOTION_H */ diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index e385acf406..34d117bc24 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -220,6 +220,37 @@ class Scene { int libHandle; }; +struct PicAniInfo { + int32 type; + int16 objectId; + int16 field_6; + int32 field_8; + int16 field_C; + int16 field_E; + int32 ox; + int32 oy; + int32 priority; + int16 staticsId; + int16 movementId; + int16 dynamicPhaseIndex; + int16 flags; + int32 field_24; + int32 someDynamicPhaseIndex; + + bool load(MfcArchive &file); +}; + +struct EntranceInfo +{ + int32 sceneId; + int32 field_4; + int32 messageQueueId; + byte gap_C[292]; // FIXME + int32 field_130; + + bool load(MfcArchive &file); +}; + class CMotionController; class Sc2 : public CObject { @@ -227,14 +258,14 @@ class Sc2 : public CObject { int16 _field_2; Scene *_scene; CMotionController *_motionController; - int _data1; + int32 *_data1; // FIXME, could be a struct int _count1; - int _defPicAniInfos; + PicAniInfo **_defPicAniInfos; int _defPicAniInfosCount; - int _picAniInfos; + PicAniInfo **_picAniInfos; int _picAniInfosCount; int _isLoaded; - int _entranceData; + EntranceInfo **_entranceData; int _entranceDataCount; public: diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index d5a9fe2102..cda64c46d4 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -117,6 +117,8 @@ bool CGameLoader::load(MfcArchive &file) { debug(0, "sc: %d", it->_sceneId); _sc2array[i].loadFile((const char *)tmp); + + debug(0, "sc: %s", tmp); } _preloadItems.load(file); @@ -258,7 +260,10 @@ bool CInteractionController::load(MfcArchive &file) { bool CObList::load(MfcArchive &file) { int count = file.readCount(); + debug(0, "CObList::count: %d:", count); + for (int i = 0; i < count; i++) { + debug(0, "CObList::[%d]", i); CObject *t = file.readClass(); push_back(*t); @@ -483,7 +488,7 @@ bool CGameVar::load(MfcArchive &file) { Sc2::Sc2() { _sceneId = 0; _field_2 = 0; - //_scene = 0; + _scene = 0; _motionController = 0; _data1 = 0; _count1 = 0; @@ -501,6 +506,51 @@ bool Sc2::load(MfcArchive &file) { _motionController = (CMotionController *)file.readClass(); + _count1 = file.readUint32LE(); + debug(0, "count1: %d", _count1); + if (_count1 > 0) { + _data1 = (int32 *)malloc(_count1 * sizeof(int32)); + + for (int i = 0; i < _count1; i++) { + _data1[i] = file.readUint32LE(); + } + } else { + _data1 = 0; + } + + _defPicAniInfosCount = file.readUint32LE(); + debug(0, "defPicAniInfos: %d", _defPicAniInfosCount); + if (_defPicAniInfosCount > 0) { + _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *)); + + for (int i = 0; i < _defPicAniInfosCount; i++) { + _defPicAniInfos[i] = new PicAniInfo(); + + _defPicAniInfos[i]->load(file); + } + } else { + _defPicAniInfos = 0; + } + + _picAniInfos = 0; + _picAniInfosCount = 0; + + _entranceDataCount = file.readUint32LE(); + debug(0, "_entranceData: %d", _entranceDataCount); + + if (_entranceDataCount > 0) { + _entranceData = (EntranceInfo **)malloc(_defPicAniInfosCount * sizeof(EntranceInfo *)); + + for (int i = 0; i < _entranceDataCount; i++) { + _entranceData[i] = new EntranceInfo(); + _entranceData[i]->load(file); + } + } else { + _entranceData = 0; + } + + debug(0, "pos: %d, 0x%x: %d", file.size(), file.pos(), file.size() - file.pos()); + return true; } @@ -520,4 +570,34 @@ bool CDWordArray::load(MfcArchive &file) { return true; } +bool PicAniInfo::load(MfcArchive &file) { + type = file.readUint32LE(); + objectId = file.readUint16LE(); + field_6 = file.readUint16LE(); + field_8 = file.readUint32LE(); + field_C = file.readUint16LE(); + field_E = file.readUint16LE(); + ox = file.readUint32LE(); + oy = file.readUint32LE(); + priority = file.readUint32LE(); + staticsId = file.readUint16LE(); + movementId = file.readUint16LE(); + dynamicPhaseIndex = file.readUint16LE(); + flags = file.readUint16LE(); + field_24 = file.readUint32LE(); + someDynamicPhaseIndex = file.readUint32LE(); + + return true; +} + +bool EntranceInfo::load(MfcArchive &file) { + sceneId = file.readUint32LE(); + field_4 = file.readUint32LE(); + messageQueueId = file.readUint32LE(); + file.read(gap_C, 292); // FIXME, Ugh + field_130 = file.readUint32LE(); + + return true; +} + } // End of namespace Fullpipe -- cgit v1.2.3 From 2e6bad888e02952e980dfc33978673bda0349030 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 18 Jun 2013 17:27:17 -0400 Subject: FULLPIPE: Put debug output at deeper levels --- engines/fullpipe/motion.cpp | 16 ++++++++++------ engines/fullpipe/stateloader.cpp | 18 ++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index f10388a98e..ec6a8bdb36 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -42,16 +42,17 @@ bool CMotionController::load(MfcArchive &file) { bool CMctlCompound::load(MfcArchive &file) { int count = file.readUint32LE(); - debug(0, "CMctlCompound::count = %d", count); + debug(6, "CMctlCompound::count = %d", count); for (int i = 0; i < count; i++) { - debug(0, "CompoundArray[%d]", i); + debug(6, "CompoundArray[%d]", i); CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); int count1 = file.readUint32LE(); + debug(6, "ConnectionPoint::count: %d", count1); for (int j = 0; j < count1; j++) { - debug(0, "ConnectionPoint[%d]", j); + debug(6, "ConnectionPoint[%d]", j); CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass(); obj->_connectionPoints.push_back(*obj1); @@ -60,6 +61,7 @@ bool CMctlCompound::load(MfcArchive &file) { obj->_field_20 = file.readUint32LE(); obj->_field_24 = file.readUint32LE(); + debug(6, "graphReact"); obj->_movGraphReactObj = (CMovGraphReact *)file.readClass(); _motionControllers.push_back(*obj); @@ -73,6 +75,8 @@ bool CMctlCompoundArray::load(MfcArchive &file) { debug(0, "CMctlCompoundArray::count = %d", count); + assert(0); + return true; } @@ -108,15 +112,15 @@ bool CMovGraphLink::load(MfcArchive &file) { _flags = file.readUint32LE(); - debug(0, "GraphNode1"); + debug(8, "GraphNode1"); _movGraphNode1 = (CMovGraphNode *)file.readClass(); - debug(0, "GraphNode2"); + debug(8, "GraphNode2"); _movGraphNode2 = (CMovGraphNode *)file.readClass(); _distance = file.readDouble(); _angle = file.readDouble(); - debug(0, "distance: %g, angle: %g", _distance, _angle); + debug(8, "distance: %g, angle: %g", _distance, _angle); _movGraphReact = (CMovGraphReact *)file.readClass(); _name = file.readPascalString(); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index cda64c46d4..7501f2baca 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -114,11 +114,9 @@ bool CGameLoader::load(MfcArchive &file) { snprintf(tmp, 11, "%04d.sc2", it->_sceneId); - debug(0, "sc: %d", it->_sceneId); + debug(2, "sc: %s", tmp); _sc2array[i].loadFile((const char *)tmp); - - debug(0, "sc: %s", tmp); } _preloadItems.load(file); @@ -260,10 +258,10 @@ bool CInteractionController::load(MfcArchive &file) { bool CObList::load(MfcArchive &file) { int count = file.readCount(); - debug(0, "CObList::count: %d:", count); + debug(9, "CObList::count: %d:", count); for (int i = 0; i < count; i++) { - debug(0, "CObList::[%d]", i); + debug(9, "CObList::[%d]", i); CObject *t = file.readClass(); push_back(*t); @@ -507,7 +505,7 @@ bool Sc2::load(MfcArchive &file) { _motionController = (CMotionController *)file.readClass(); _count1 = file.readUint32LE(); - debug(0, "count1: %d", _count1); + debug(4, "count1: %d", _count1); if (_count1 > 0) { _data1 = (int32 *)malloc(_count1 * sizeof(int32)); @@ -519,7 +517,7 @@ bool Sc2::load(MfcArchive &file) { } _defPicAniInfosCount = file.readUint32LE(); - debug(0, "defPicAniInfos: %d", _defPicAniInfosCount); + debug(4, "defPicAniInfos: %d", _defPicAniInfosCount); if (_defPicAniInfosCount > 0) { _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *)); @@ -536,7 +534,7 @@ bool Sc2::load(MfcArchive &file) { _picAniInfosCount = 0; _entranceDataCount = file.readUint32LE(); - debug(0, "_entranceData: %d", _entranceDataCount); + debug(4, "_entranceData: %d", _entranceDataCount); if (_entranceDataCount > 0) { _entranceData = (EntranceInfo **)malloc(_defPicAniInfosCount * sizeof(EntranceInfo *)); @@ -549,7 +547,7 @@ bool Sc2::load(MfcArchive &file) { _entranceData = 0; } - debug(0, "pos: %d, 0x%x: %d", file.size(), file.pos(), file.size() - file.pos()); + debug(4, "pos: %d, 0x%x: %d", file.size(), file.pos(), file.size() - file.pos()); return true; } @@ -557,7 +555,7 @@ bool Sc2::load(MfcArchive &file) { bool CDWordArray::load(MfcArchive &file) { int count = file.readCount(); - debug(0, "CDWordArray::count: %d", count); + debug(9, "CDWordArray::count: %d", count); resize(count); -- cgit v1.2.3 From 249c4bd118527b33e9bc9ef0ed3eee3bff88a8b7 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 19 Jun 2013 14:46:25 -0400 Subject: FULLPIPE: implement initObjectStates() --- engines/fullpipe/fullpipe.cpp | 151 +++++++++++++++++++++++++++++++++++++++ engines/fullpipe/fullpipe.h | 18 ++++- engines/fullpipe/objectnames.h | 41 ++++++----- engines/fullpipe/objects.h | 12 +++- engines/fullpipe/stateloader.cpp | 87 ++++++++++++++++++++-- engines/fullpipe/utils.h | 1 + 6 files changed, 285 insertions(+), 25 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index f4d502d6a7..c5099f57cb 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -29,12 +29,16 @@ #include "fullpipe/fullpipe.h" #include "fullpipe/ngiarchive.h" +#include "fullpipe/objectnames.h" +#include "fullpipe/utils.h" +#include "fullpipe/objects.h" namespace Fullpipe { int g_gameProjectVersion = 0; int g_gameProjectValue = 0; int g_scrollSpeed = 0; +int g_currSoundListCount = 0; FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { // Setup mixer @@ -88,4 +92,151 @@ void FullpipeEngine::updateEvents() { } } +void FullpipeEngine::initObjectStates() { + setLevelStates(); + + setObjectState(sO_Dude, getObjectEnumState(sO_Dude, sO_NotCarryingEgg)); + setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_NotCrackedEggs)); + setObjectState(sO_GuvTheDrawer, getObjectEnumState(sO_GuvTheDrawer, sO_Awaken)); + setObjectState(sO_EggGulper, getObjectEnumState(sO_EggGulper, sO_First)); + setObjectState(sO_EggGulperGaveCoin, getObjectEnumState(sO_EggGulperGaveCoin, sO_No)); + setObjectState(sO_Jar_4, getObjectEnumState(sO_Jar_4, sO_OnTheSpring)); + setObjectState(sO_GulpedEggs, getObjectEnumState(sO_GulpedEgg, sO_NotPresent)); + + setSwallowedEggsState(); + + setObjectState(sO_WeirdWacko, getObjectEnumState(sO_WeirdWacko, sO_InGlasses)); + setObjectState(sO_TumyTrampie, getObjectEnumState(sO_TumyTrampie, sO_Drinking)); + setObjectState(sO_StairsUp_8, getObjectEnumState(sO_StairsUp_8, sO_NotBroken)); + setObjectState(sO_HareTheNooksiter, getObjectEnumState(sO_HareTheNooksiter, sO_WithHandle)); + setObjectState(sO_Elephantine, getObjectEnumState(sO_Elephantine, sO_WithBoot)); + setObjectState(sO_Fly_12, 0); + setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_NotAvailable)); + setObjectState(sO_ClockHandle, getObjectEnumState(sO_ClockHandle, sO_In_7)); + setObjectState(sO_BigMumsy, getObjectEnumState(sO_BigMumsy, sO_Sleeping)); + setObjectState(sO_CoinSlot_1, getObjectEnumState(sO_CoinSlot_1, sO_Empty)); + setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple)); + setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked)); + setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_ClosedShe)); + setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug)); + setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum)); + setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_Swinging)); + setObjectState(sO_DudeJumped, getObjectEnumState(sO_DudeJumped, sO_No)); + setObjectState(sO_Bridge, getObjectEnumState(sO_Bridge, sO_Convoluted)); + setObjectState(sO_Guardian, getObjectEnumState(sO_Guardian, sO_OnRight)); + setObjectState(sO_Grandma, getObjectEnumState(sO_Grandma, sO_In_14)); + setObjectState(sO_Boot_15, getObjectEnumState(sO_Boot_15, sO_NotPresent)); + setObjectState(sO_LeftPipe_15, getObjectEnumState(sO_LeftPipe_15, sO_OpenedShe)); + setObjectState(sO_Pedestal_16, getObjectEnumState(sO_Pedestal_16, sO_IsFree)); + setObjectState(sO_Cup, getObjectEnumState(sO_Cup, sO_InSmokeRoom)); + setObjectState(sO_Pedestal_17, getObjectEnumState(sO_Pedestal_17, sO_IsFree)); + setObjectState(sO_UsherHand, getObjectEnumState(sO_UsherHand, sO_WithoutCoin)); + setObjectState(sO_RightPipe_17, getObjectEnumState(sO_RightPipe_17, sO_ClosedShe)); + setObjectState(sO_Fly_17, 1); + setObjectState(sO_DudeSwinged, 0); + setObjectState(sO_Girl, getObjectEnumState(sO_Girl, sO_Swinging)); + setObjectState(sO_Sugar, getObjectEnumState(sO_Sugar, sO_Present)); + setObjectState(sO_Janitors, getObjectEnumState(sO_Janitors, sO_Together)); + setObjectState(sO_Bag_22, getObjectEnumState(sO_Bag_22, sO_NotFallen)); + setObjectState(sO_Grandpa, getObjectEnumState(sO_Grandpa, sO_InSock)); + setObjectState(sO_CoinSlot_22, getObjectEnumState(sO_CoinSlot_22, sO_Empty)); + setObjectState(sO_UpperHatch_23, getObjectEnumState(sO_UpperHatch_23, sO_Closed)); + setObjectState(sO_LowerHatch_23, getObjectEnumState(sO_LowerHatch_23, sO_Closed)); + setObjectState(sO_Lever_23, getObjectEnumState(sO_Lever_23, sO_NotTaken)); + setObjectState(sO_LeverHandle_23, getObjectEnumState(sO_LeverHandle_23, sO_WithoutStool)); + setObjectState(sO_LowerPipe_21, getObjectEnumState(sO_LowerPipe_21, sO_ClosedShe)); + setObjectState(sO_StarsDown_24, getObjectEnumState(sO_StarsDown_24, sO_OpenedShe)); + setObjectState(sO_Hatch_26, getObjectEnumState(sO_Hatch_26, sO_Closed)); + setObjectState(sO_Sock_26, getObjectEnumState(sO_Sock_26, sO_NotHanging)); + setObjectState(sO_LeftPipe_26, getObjectEnumState(sO_LeftPipe_26, sO_ClosedShe)); + setObjectState(sO_Valve1_26, getObjectEnumState(sO_Valve1_26, sO_Opened)); + setObjectState(sO_Valve2_26, getObjectEnumState(sO_Valve2_26, sO_Closed)); + setObjectState(sO_Valve3_26, getObjectEnumState(sO_Valve3_26, sO_Closed)); + setObjectState(sO_Valve4_26, getObjectEnumState(sO_Valve4_26, sO_Closed)); + setObjectState(sO_Valve5_26, getObjectEnumState(sO_Valve5_26, sO_Opened)); + setObjectState(sO_Pool, getObjectEnumState(sO_Pool, sO_Overfull)); + setObjectState(sO_Plank_25, getObjectEnumState(sO_Plank_25, sO_NearDudesStairs)); + setObjectState(sO_Driver, getObjectEnumState(sO_Driver, sO_WithSteering)); + setObjectState(sO_Janitress, getObjectEnumState(sO_Janitress, sO_WithMop)); + setObjectState(sO_LeftPipe_29, getObjectEnumState(sO_LeftPipe_29, sO_ClosedShe)); + setObjectState(sO_LeftPipe_30, getObjectEnumState(sO_LeftPipe_30, sO_ClosedShe)); + setObjectState(sO_Leg, getObjectEnumState(sO_Leg, sO_ShowingHeel)); + setObjectState(sO_Tub, getObjectEnumState(sO_Tub, sO_EmptyShe)); + setObjectState(sO_Cactus, getObjectEnumState(sO_Cactus, sO_NotGrown)); + setObjectState(sO_Fireman, getObjectEnumState(sO_Fireman, sO_WithHose)); + setObjectState(sO_Cube, getObjectEnumState(sO_Cube, sO_In_33)); + setObjectState(sO_MommyOfHandle_32, getObjectEnumState(sO_MommyOfHandle_32, sO_WithoutHandle)); + setObjectState(sO_Pedestal_33, getObjectEnumState(sO_Pedestal_33, sO_IsFree)); + setObjectState(sO_Valve_34, getObjectEnumState(sO_Valve_34, sO_WithNothing)); + setObjectState(sO_Stool_34, getObjectEnumState(sO_Stool_34, sO_WithoutDrawer)); + setObjectState(sO_Plank_34, getObjectEnumState(sO_Plank_34, sO_Passive)); + setObjectState(sO_Hatch_34, getObjectEnumState(sO_Hatch_34, sO_Closed)); + setObjectState(sO_Valve_35, getObjectEnumState(sO_Valve_35, sO_TurnedOff)); + setObjectState(sO_Carpet_35, getObjectEnumState(sO_Carpet_35, sO_CannotTake)); + setObjectState(sO_CoinSlot_35, getObjectEnumState(sO_CoinSlot_35, sO_WithCoin)); + setObjectState(sO_BellyInflater, getObjectEnumState(sO_BellyInflater, sO_WithCork)); + setObjectState(sO_Jawcrucnher, getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet)); + setObjectState(sO_Guard_1, getObjectEnumState(sO_Guard_1, sO_On)); + setObjectState(sO_Gurad_2, getObjectEnumState(sO_Gurad_2, sO_On)); + setObjectState(sO_Guard_3, getObjectEnumState(sO_Guard_3, sO_On)); + setObjectState(sO_Bottle_38, getObjectEnumState(sO_Bottle_38, sO_OnTheTable)); + setObjectState(sO_Boss, getObjectEnumState(sO_Boss, sO_WithHammer)); +} + +void FullpipeEngine::setLevelStates() { + CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons); + + if (v) { + v->setSubVarAsInt(sO_Level0, 2833); + v->setSubVarAsInt(sO_Level1, 2754); + v->setSubVarAsInt(sO_Level2, 2757); + v->setSubVarAsInt(sO_Level3, 2760); + v->setSubVarAsInt(sO_Level4, 2763); + v->setSubVarAsInt(sO_Level5, 2766); + v->setSubVarAsInt(sO_Level6, 2769); + v->setSubVarAsInt(sO_Level7, 2772); + v->setSubVarAsInt(sO_Level8, 2775); + v->setSubVarAsInt(sO_Level9, 2778); + } +} + +void FullpipeEngine::setSwallowedEggsState() { + CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs); + + _swallowedEgg1 = v->getSubVarByName(sO_Egg1); + _swallowedEgg2 = v->getSubVarByName(sO_Egg2); + _swallowedEgg3 = v->getSubVarByName(sO_Egg3); + + _swallowedEgg1->_value.intValue = 0; + _swallowedEgg2->_value.intValue = 0; + _swallowedEgg3->_value.intValue = 0; +} + +int FullpipeEngine::getObjectEnumState(const char *name, const char *state) { + CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); + + if (!var) { + var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0); + } + + var = var->getSubVarByName(name); + if (var) { + var = var->getSubVarByName("ENUMSTATES"); + if (var) + return var->getSubVarAsInt(state); + } + + return 0; +} + +void FullpipeEngine::setObjectState(const char *name, int state) { + CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); + + if (!var) { + var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0); + } + + var->setSubVarAsInt(name, state); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index a6a58ffb1b..92c0052d68 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -44,11 +44,12 @@ enum FullpipeGameFeatures { }; class CGameLoader; +class CGameVar; extern int g_gameProjectVersion; extern int g_gameProjectValue; extern int g_scrollSpeed; - +extern int g_currSoundListCount; class FullpipeEngine : public ::Engine { protected: @@ -71,15 +72,26 @@ public: Common::KeyCode _keyState; uint16 _buttonState; - void updateEvents(); + void updateEvents(); - CGameLoader *g_gameLoader; + CGameLoader *_gameLoader; bool loadGam(const char *fname); int _gameProjectVersion; int _gameProjectValue; int _scrollSpeed; + void initObjectStates(); + void setLevelStates(); + void setSwallowedEggsState(); + + CGameVar *_swallowedEgg1; + CGameVar *_swallowedEgg2; + CGameVar *_swallowedEgg3; + + void setObjectState(const char *name, int state); + int getObjectEnumState(const char *name, const char *state); + public: bool _isSaveAllowed; diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h index 75c382bb66..39c4e5dd76 100644 --- a/engines/fullpipe/objectnames.h +++ b/engines/fullpipe/objectnames.h @@ -23,6 +23,7 @@ // This file is used in order to avoid usage of constants in Russian accross the code #define sO_Grandma "\xc1\xe0\xe1\xf3\xeb\xff" // "Бабуля" +#define sO_Jar_4 "\xc1\xe0\xed\xea\xe0_4" // "Банка_4" #define sO_Pool "\xc1\xe0\xf1\xf1\xe5\xe9\xed" // "Бассейн" #define sO_TumyTrampie "\xc1\xe0\xf2\xf3\xf2\xe0" // "Батута" #define sO_WithoutBoot "\xc1\xe5\xe7 \xe1\xee\xf2\xe8\xed\xea\xe0" // "Без ботинка" @@ -41,21 +42,24 @@ #define sO_InSmokeRoom "\xc2 \xea\xf3\xf0\xe8\xeb\xea\xe5" // "В курилке" #define sO_InSock "\xc2 \xed\xee\xf1\xea\xe5" // "В носке" #define sO_InGlasses "\xc2 \xee\xf7\xea\xe0\xf5" // "В очках" -#define sO_V_14 "\xc2_14" // "В_14" -#define sO_V_32_Lies "\xc2_32 \xeb\xe5\xe6\xe8\xf2" // "В_32 лежит" -#define sO_V_32_Stands "\xc2_32 \xf2\xee\xf0\xf7\xe8\xf2" // "В_32 торчит" -#define sO_V_7 "\xc2_7" // "В_7" -#define sO_Valve1_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc1_26" // "Вентиль1_26" -#define sO_Valve2_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc2_26" // "Вентиль2_26" -#define sO_Valve3_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc3_26" // "Вентиль3_26" -#define sO_Valve4_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc4_26" // "Вентиль4_26" -#define sO_Valve5_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc5_26" // "Вентиль5_26" +#define sO_In_14 "\xc2_14" // "В_14" +#define sO_In_32_Lies "\xc2_32 \xeb\xe5\xe6\xe8\xf2" // "В_32 лежит" +#define sO_In_32_Stands "\xc2_32 \xf2\xee\xf0\xf7\xe8\xf2" // "В_32 торчит" +#define sO_In_33 "\xc2_33" // "В_33" +#define sO_In_7 "\xc2_7" // "В_7" +#define sO_Together "\xc2\xe4\xe2\xee\xe5\xec" // "Вдвоем" +#define sO_Valve1_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc\x31_26" // "Вентиль1_26" +#define sO_Valve2_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc\x32_26" // "Вентиль2_26" +#define sO_Valve3_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc\x33_26" // "Вентиль3_26" +#define sO_Valve4_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc\x34_26" // "Вентиль4_26" +#define sO_Valve5_26 "\xc2\xe5\xed\xf2\xe8\xeb\xfc\x35_26" // "Вентиль5_26" #define sO_Valve_34 "\xc2\xe5\xed\xf2\xe8\xeb\xfc_34" // "Вентиль_34" #define sO_UpperHatch_23 "\xc2\xe5\xf0\xf5\xed\xe8\xe9 \xeb\xfe\xea_23" // "Верхний люк_23" #define sO_Taken "\xc2\xe7\xff\xf2" // "Взят" #define sO_HangsOnPipe "\xc2\xe8\xf1\xe8\xf2 \xed\xe0 \xf2\xf0\xf3\xe1\xe5" // "Висит на трубе" #define sO_On "\xc2\xea\xeb" // "Вкл" #define sO_TurnedOn "\xc2\xea\xeb\xfe\xf7\xe5\xed" // "Включен" +#define sO_Driver "\xc2\xee\xe4\xe8\xeb\xe0" // "Водила" #define sO_HareTheNooksiter "\xc2\xf3\xe3\xeb\xf3\xf1\xe5\xe4" // "Вуглусед" #define sO_Off "\xc2\xfb\xea\xeb" // "Выкл" #define sO_TurnedOff "\xc2\xfb\xea\xeb\xfe\xf7\xe5\xed" // "Выключен" @@ -86,6 +90,7 @@ #define sO_Full "\xc7\xe0\xef\xee\xeb\xed\xe5\xed \xf6\xe5\xeb\xe8\xea\xee\xec" // "Заполнен целиком" #define sO_MirroredTo "\xc7\xe5\xf0\xea\xe0\xeb\xfc\xed\xe0\xff \xea" // "Зеркальная к" #define sO_Playing "\xc8\xe3\xf0\xe0\xe5\xf2" // "Играет" +#define sO_Tub "\xca\xe0\xe4\xea\xe0" // "Кадка" #define sO_Cactus "\xca\xe0\xea\xf2\xf3\xf1" // "Кактус" #define sO_SwingingWithBoot "\xca\xe0\xf2\xe0\xe5\xf2\xf1\xff \xf1 \xe1\xee\xf2\xe8\xed\xea\xee\xec" // "Катается с ботинком" #define sO_Swinging "\xca\xe0\xf2\xe0\xe5\xf2\xf1\xff" // "Катается" @@ -106,7 +111,7 @@ #define sO_Fliers "\xcb\xe5\xf2\xf3\xed\xfb" // "Летуны" #define sO_Hatch_26 "\xcb\xfe\xea_26" // "Люк_26" #define sO_Hatch_34 "\xcb\xfe\xea_34" // "Люк_34" -#define sO_MommyOfHand_32 "\xcc\xe0\xec\xe0 \xf0\xf3\xf7\xea\xe8_32" // "Мама ручки_32" +#define sO_MommyOfHandle_32 "\xcc\xe0\xec\xe0 \xf0\xf3\xf7\xea\xe8_32" // "Мама ручки_32" #define sO_BigMumsy "\xcc\xe0\xec\xe0\xf8\xe0" // "Мамаша" #define sO_Bag_22 "\xcc\xe5\xf8\xee\xea_22" // "Мешок_22" #define sO_CoinSlot_1 "\xcc\xee\xed\xe5\xf2\xee\xef\xf0\xe8\xe5\xec\xed\xe8\xea 1" // "Монетоприемник 1" @@ -124,6 +129,7 @@ #define sO_NotHanging "\xcd\xe5 \xe2\xe8\xf1\xe8\xf2" // "Не висит" #define sO_NotGrown "\xcd\xe5 \xe2\xfb\xf0\xee\xf1" // "Не вырос" #define sO_NotCrackedEggs "\xcd\xe5 \xea\xee\xeb\xee\xeb \xff\xe9\xf6\xee" // "Не колол яйцо" +#define sO_NotFallen "\xcd\xe5 \xef\xe0\xe4\xe0\xeb" // "Не падал" #define sO_NotAvailable "\xcd\xe5\xe4\xee\xf1\xf2\xf3\xef\xed\xe0" // "Недоступна" #define sO_CannotTake "\xcd\xe5\xeb\xfc\xe7\xff \xe2\xe7\xff\xf2\xfc" // "Нельзя взять" #define sO_No "\xcd\xe5\xf2" // "Нет" @@ -131,6 +137,7 @@ #define sO_LowerPipe "\xcd\xe8\xe6\xed\xff\xff \xf2\xf0\xf3\xe1\xe0" // "Нижняя труба" #define sO_LowerPipe_21 "\xcd\xe8\xe6\xed\xff\xff \xf2\xf0\xf3\xe1\xe0_21" // "Нижняя труба_21" #define sO_WantsNothing "\xcd\xe8\xf7\xe5\xe3\xee \xed\xe5 \xf5\xee\xf7\xe5\xf2" // "Ничего не хочет" +#define sO_Leg "\xcd\xee\xe3\xe0" // "Нога" #define sO_FriesPit "\xcd\xee\xf0\xea\xe0 \xea\xee\xe7\xff\xe2\xea\xe8" // "Норка козявки" #define sO_Sock_26 "\xcd\xee\xf1\xee\xea_26" // "Носок_26" #define sO_ClockAxis "\xce\xf1\xfc \xf7\xe0\xf1\xee\xe2" // "Ось часов" @@ -138,7 +145,7 @@ #define sO_OpenedWithBoot "\xce\xf2\xea\xf0\xfb\xf2\xe0 \xf1 \xe1\xee\xf2\xe8\xed\xea\xee\xec" // "Открыта с ботинком" #define sO_OpenedShe "\xce\xf2\xea\xf0\xfb\xf2\xe0" // "Открыта" #define sO_WeirdWacko "\xce\xf2\xec\xee\xf0\xee\xe6\xe5\xed\xed\xfb\xe9" // "Отмороженный" -#define sO_NotFound "\xce\xf2\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Отсутствует" +#define sO_NotPresent "\xce\xf2\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Отсутствует" #define sO_Error "\xce\xf8\xe8\xe1\xea\xe0" // "Ошибка" #define sO_Passive "\xcf\xe0\xf1\xf1\xe8\xe2\xed\xe0" // "Пассивна" #define sO_First "\xcf\xe5\xf0\xe2\xfb\xe9" // "Первый" @@ -149,7 +156,7 @@ #define sO_FullPipe "\xcf\xee\xeb\xed\xe0\xff \xd2\xf0\xf3\xe1\xe0" // "Полная Труба" #define sO_RightStairs_9 "\xcf\xf0\xe0\xe2\xe0\xff \xeb\xe5\xf1\xf2\xed\xe8\xf6\xe0_9" // "Правая лестница_9" #define sO_RightPipe_17 "\xcf\xf0\xe0\xe2\xe0\xff \xf2\xf0\xf3\xe1\xe0_17" // "Правая труба_17" -#define sO_Present "\xcf\xf0\xe8\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Присутствует" +#define sO_Available "\xcf\xf0\xe8\xf1\xf3\xf2\xf1\xf2\xe2\xf3\xe5\xf2" // "Присутствует" #define sO_GulpedEgg "\xcf\xf0\xee\xe3\xeb\xee\xf7\xe5\xed\xed\xee\xe5 \xff\xe9\xf6\xee" // "Проглоченное яйцо" #define sO_GulpedEggs "\xcf\xf0\xee\xe3\xeb\xee\xf7\xe5\xed\xed\xfb\xe5 \xff\xe9\xf6\xe0" // "Проглоченные яйца" #define sO_BellyInflater "\xcf\xf3\xe7\xee\xe4\xf3\xe2" // "Пузодув" @@ -184,6 +191,7 @@ #define sO_WithDrawer "\xd1 \xff\xf9\xe8\xea\xee\xec" // "С ящиком" #define sO_Sugar "\xd1\xe0\xf5\xe0\xf0\xee\xea" // "Сахарок" #define sO_Convoluted "\xd1\xe2\xe5\xf0\xed\xf3\xf2" // "Свернут" +#define sO_IsFree "\xd1\xe2\xee\xe1\xee\xe4\xed\xe0" // "Свободна" #define sO_Sitting "\xd1\xe8\xe4\xe8\xf2" // "Сидит" #define sO_Laughing "\xd1\xec\xe5\xe5\xf2\xf1\xff" // "Смеется" #define sO_WithEveryone "\xd1\xee \xe2\xf1\xe5\xec\xe8" // "Со всеми" @@ -212,6 +220,7 @@ #define sO_Gone "\xd3\xe5\xf5\xe0\xeb\xe0" // "Уехала" #define sO_FallenOnce "\xd3\xef\xe0\xeb \xf0\xe0\xe7" // "Упал раз" #define sO_FallenBrush "\xd3\xef\xe0\xeb\xe0 \xf9\xe5\xf2\xea\xe0" // "Упала щетка" +#define sO_NotBroken "\xd6\xe5\xeb\xe0" // "Цела" #define sO_ScratchingBelly "\xd7\xe5\xf8\xe5\xf2 \xef\xf3\xe7\xee" // "Чешет пузо" #define sO_Level0 "\xdd\xf2\xe0\xe6 0" // "Этаж 0" #define sO_Level1 "\xdd\xf2\xe0\xe6 1" // "Этаж 1" @@ -226,7 +235,7 @@ #define sO_EggGulperGaveCoin "\xdf\xe9\xf6\xe5\xe3\xeb\xee\xf2 \xee\xf2\xe4\xe0\xeb \xec\xee\xed\xe5\xf2\xf3" // "Яйцеглот отдал монету" #define sO_EggGulper "\xdf\xe9\xf6\xe5\xe3\xeb\xee\xf2" // "Яйцеглот" #define sO_EggCracker "\xdf\xe9\xf6\xe5\xea\xee\xeb" // "Яйцекол" -#define sO_NotLayingEgg "\xdf\xe9\xf6\xee \xed\xe5 \xed\xe5\xf1\xe5\xf2" // "Яйцо не несет" -#define sO_Egg1 "\xdf\xe9\xf6\xee1" // "Яйцо1" -#define sO_Egg2 "\xdf\xe9\xf6\xee2" // "Яйцо2" -#define sO_Egg3 "\xdf\xe9\xf6\xee3" // "Яйцо3" +#define sO_NotCarryingEgg "\xdf\xe9\xf6\xee \xed\xe5 \xed\xe5\xf1\xe5\xf2" // "Яйцо не несет" +#define sO_Egg1 "\xdf\xe9\xf6\xee\x31" // "Яйцо1" +#define sO_Egg2 "\xdf\xe9\xf6\xee\x32" // "Яйцо2" +#define sO_Egg3 "\xdf\xe9\xf6\xee\x33" // "Яйцо3" diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 34d117bc24..be12424a33 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -315,7 +315,8 @@ class ExCommand : public CObject { virtual bool load(MfcArchive &file); }; - class CGameVar : public CObject { +class CGameVar : public CObject { + public: CGameVar *_nextVarObj; CGameVar *_prevVarObj; CGameVar *_parentVarObj; @@ -328,6 +329,12 @@ class ExCommand : public CObject { public: CGameVar(); virtual bool load(MfcArchive &file); + CGameVar *getSubVarByName(const char *name); + bool setSubVarAsInt(const char *name, int value); + int getSubVarAsInt(const char *name); + CGameVar *addSubVarAsInt(const char *name, int value); + bool addSubVar(CGameVar *subvar); + }; class InventoryPoolItem { @@ -435,6 +442,8 @@ class CGameLoader : public CObject { virtual bool load(MfcArchive &file); + CGameVar *_gameVar; + private: GameProject *_gameProject; CInteractionController *_interactionController; @@ -456,7 +465,6 @@ class CGameLoader : public CObject { int16 _field_F8; int16 _field_FA; PreloadItems _preloadItems; - CGameVar *_gameVar; char *_gameName; ExCommand _exCommand; int _updateCounter; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 7501f2baca..781fab2662 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -32,9 +32,11 @@ namespace Fullpipe { bool FullpipeEngine::loadGam(const char *fname) { - g_gameLoader = new CGameLoader(); + _gameLoader = new CGameLoader(); - if (g_gameLoader->loadFile(fname)) { + if (_gameLoader->loadFile(fname)) { + g_currSoundListCount = 0; + initObjectStates(); // TODO } else return false; @@ -45,8 +47,6 @@ bool FullpipeEngine::loadGam(const char *fname) { CGameLoader::CGameLoader() { _interactionController = new CInteractionController(); - // g_gameLoader = this; // FIXME - _gameProject = 0; //_gameName = "untitled"; @@ -483,6 +483,85 @@ bool CGameVar::load(MfcArchive &file) { return true; } +CGameVar *CGameVar::getSubVarByName(const char *name) { + CGameVar *sv = 0; + + if (_subVars != 0) { + sv = _subVars; + for (;sv && scumm_stricmp(sv->_stringObj, name); sv = sv->_nextVarObj) + ; + } + return sv; +} + +bool CGameVar::setSubVarAsInt(const char *name, int value) { + CGameVar *var = getSubVarByName(name); + + if (var) { + if (var->_varType == 0) { + var->_value.intValue = value; + + return true; + } + return false; + } + + var = new CGameVar(); + var->_varType = 0; + var->_value.intValue = value; + var->_stringObj = (char *)calloc(strlen(name) + 1, 1); + strcpy(var->_stringObj, name); + + return addSubVar(var); +} + +int CGameVar::getSubVarAsInt(const char *name) { + CGameVar *var = getSubVarByName(name); + + if (var) + return var->_value.intValue; + else + return 0; +} + +CGameVar *CGameVar::addSubVarAsInt(const char *name, int value) { + if (getSubVarByName(name)) { + return 0; + } else { + CGameVar *var = new CGameVar(); + + var->_varType = 0; + var->_value.intValue = value; + + var->_stringObj = (char *)calloc(strlen(name) + 1, 1); + strcpy(var->_stringObj, name); + + return (addSubVar(var) != 0) ? var : 0; + } +} + +bool CGameVar::addSubVar(CGameVar *subvar) { + CGameVar *var = _subVars; + + if (var) { + for (CGameVar *i = var->_nextVarObj; i; i = i->_nextVarObj) + var = i; + + var->_nextVarObj = subvar; + subvar->_prevVarObj = var; + subvar->_parentVarObj = var; + + return true; + } else { + var->_subVars = subvar; + subvar->_parentVarObj = var; + + return true; + } + + return false; +} + Sc2::Sc2() { _sceneId = 0; _field_2 = 0; diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index c46fe38620..9af7d14f67 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -25,6 +25,7 @@ #include "common/hash-str.h" #include "common/array.h" +#include "common/file.h" namespace Fullpipe { -- cgit v1.2.3 From 3e948052f7a0775d3b4d04e1eaef533951f1a719 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 14:13:58 -0400 Subject: FULLPIPE: Make Inventory2 inherit from Inventory --- engines/fullpipe/objects.h | 4 +--- engines/fullpipe/stateloader.cpp | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index be12424a33..49349f626c 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -405,8 +405,7 @@ class BigPicture { Picture pic; }; -class CInventory2 : public CObject { - CInventory _inventory; +class CInventory2 : public CInventory { InventoryItems _inventoryItems; InventoryIcons _inventoryIcons; int _selectedId; @@ -420,7 +419,6 @@ class CInventory2 : public CObject { public: CInventory2(); bool loadPartial(MfcArchive &file); - virtual bool load(MfcArchive &file); }; struct PreloadItem { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 781fab2662..99f25d4e04 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -234,10 +234,6 @@ CInventory2::CInventory2() { _topOffset = -65; } -bool CInventory2::load(MfcArchive &file) { - return _inventory.load(file); -} - bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartially int numInvs = file.readUint32LE(); -- cgit v1.2.3 From 8de8a901cb7946f5506e990224b78bdfb4ca737e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 14:44:59 -0400 Subject: FULLPIPE: Put all inventory-related classes into separate file --- engines/fullpipe/fullpipe.cpp | 1 - engines/fullpipe/inventory.cpp | 72 +++++++++++++++++++++++++ engines/fullpipe/inventory.h | 97 +++++++++++++++++++++++++++++++++ engines/fullpipe/module.mk | 1 + engines/fullpipe/motion.cpp | 1 - engines/fullpipe/objects.h | 114 ++------------------------------------- engines/fullpipe/stateloader.cpp | 98 --------------------------------- engines/fullpipe/utils.cpp | 55 ++++++++++++++++++- engines/fullpipe/utils.h | 47 ++++++++++++++++ 9 files changed, 274 insertions(+), 212 deletions(-) create mode 100644 engines/fullpipe/inventory.cpp create mode 100644 engines/fullpipe/inventory.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index c5099f57cb..406a6fdc48 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -30,7 +30,6 @@ #include "fullpipe/fullpipe.h" #include "fullpipe/ngiarchive.h" #include "fullpipe/objectnames.h" -#include "fullpipe/utils.h" #include "fullpipe/objects.h" namespace Fullpipe { diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp new file mode 100644 index 0000000000..03b7cbf8b7 --- /dev/null +++ b/engines/fullpipe/inventory.cpp @@ -0,0 +1,72 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" + +namespace Fullpipe { + +bool CInventory::load(MfcArchive &file) { + _sceneId = file.readUint16LE(); + int numInvs = file.readUint32LE(); + + for (int i = 0; i < numInvs; i++) { + InventoryPoolItem *t = new InventoryPoolItem(); + t->_id = file.readUint16LE(); + t->_pictureObjectNormalId = file.readUint16LE(); + t->_pictureObjectId1 = file.readUint16LE(); + t->_pictureObjectMouseInsideId = file.readUint16LE(); + t->_pictureObjectId3 = file.readUint16LE(); + t->_flags = file.readUint32LE(); + t->_field_C = 0; + t->_field_A = -536; + _itemsPool.push_back(*t); + } + + return true; +} + +CInventory2::CInventory2() { + _selectedId = -1; + _field_48 = -1; + _sceneObj = 0; + _picture = 0; + _isInventoryOut = 0; + _isLocked = 0; + _topOffset = -65; +} + +bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartially + int numInvs = file.readUint32LE(); + + for (int i = 0; i < numInvs; i++) { + InventoryItem *t = new InventoryItem(); + t->itemId = file.readUint16LE(); + t->count = file.readUint16LE(); + _inventoryItems.push_back(*t); + } + + return true; +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h new file mode 100644 index 0000000000..8b6271aa1b --- /dev/null +++ b/engines/fullpipe/inventory.h @@ -0,0 +1,97 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_INVENTORY_H +#define FULLPIPE_INVENTORY_H + +namespace Fullpipe { + +class Scene; +class BigPicture; + +class InventoryPoolItem { + public: + int16 _id; + int16 _pictureObjectNormalId; + int16 _pictureObjectId1; + int16 _pictureObjectMouseInsideId; + int16 _pictureObjectId3; + int16 _field_A; + int _field_C; + int _obj; + int _flags; +}; + +typedef Common::Array InventoryPoolItems; + +class CInventory : public CObject { + int16 _sceneId; + int16 _field_6; + InventoryPoolItems _itemsPool; + + public: + CInventory() { _sceneId = 0; } + virtual bool load(MfcArchive &file); +}; + +struct InventoryItem { + int16 itemId; + int16 count; +}; + +typedef Common::Array InventoryItems; + +class InventoryIcon { + int pictureObjectNormal; + int pictureObjectMouseInside; + int pictureObject3; + int x1; + int y1; + int x2; + int y2; + int16 inventoryItemId; + int16 field_1E; + int isSelected; + int isMouseInside; +}; + +typedef Common::Array InventoryIcons; + +class CInventory2 : public CInventory { + InventoryItems _inventoryItems; + InventoryIcons _inventoryIcons; + int _selectedId; + int _field_48; + int _isInventoryOut; + int _isLocked; + int _topOffset; + Scene *_sceneObj; + BigPicture *_picture; + + public: + CInventory2(); + bool loadPartial(MfcArchive &file); +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_INVENTORY_H */ diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index a2402e0272..e5a79523b2 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -3,6 +3,7 @@ MODULE := engines/fullpipe MODULE_OBJS = \ detection.o \ fullpipe.o \ + inventory.o \ motion.o \ ngiarchive.o \ stateloader.o \ diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index ec6a8bdb36..3ff61816ef 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -26,7 +26,6 @@ #include "common/array.h" #include "common/list.h" -#include "fullpipe/utils.h" #include "fullpipe/objects.h" #include "fullpipe/motion.h" diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 49349f626c..9ef2dfe22d 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -23,54 +23,10 @@ #ifndef FULLPIPE_OBJECTS_H #define FULLPIPE_OBJECTS_H -namespace Fullpipe { - -class CObject { - public: - virtual bool load(MfcArchive &in) { return true; } - virtual ~CObject() {} - - bool loadFile(const char *fname); -}; - -class CObList : public Common::List, public CObject { - public: - virtual bool load(MfcArchive &file); -}; - -class MemoryObject { - //CObject obj; - int filename; - int field_8; - int field_C; - int field_10; - char field_14; - char field_15; - char field_16; - char field_17; - int data; - int dataSize; - int flags; - int libHandle; -}; - -class CObArray : public Common::Array, public CObject { - public: - virtual bool load(MfcArchive &file); -}; - -class CDWordArray : public Common::Array, public CObject { - public: - virtual bool load(MfcArchive &file); -}; - -struct CNode { - CNode *pNext; - CNode *pPrev; - void *data; -}; +#include "fullpipe/utils.h" +#include "fullpipe/inventory.h" -typedef Common::Array CPtrList; +namespace Fullpipe { class SceneTag : public CObject { public: @@ -337,54 +293,6 @@ class CGameVar : public CObject { }; -class InventoryPoolItem { - public: - int16 _id; - int16 _pictureObjectNormalId; - int16 _pictureObjectId1; - int16 _pictureObjectMouseInsideId; - int16 _pictureObjectId3; - int16 _field_A; - int _field_C; - int _obj; - int _flags; -}; - -typedef Common::Array InventoryPoolItems; - -class CInventory : public CObject { - int16 _sceneId; - int16 _field_6; - InventoryPoolItems _itemsPool; - - public: - CInventory() { _sceneId = 0; } - virtual bool load(MfcArchive &file); -}; - -struct InventoryItem { - int16 itemId; - int16 count; -}; - -typedef Common::Array InventoryItems; - -class InventoryIcon { - int pictureObjectNormal; - int pictureObjectMouseInside; - int pictureObject3; - int x1; - int y1; - int x2; - int y2; - int16 inventoryItemId; - int16 field_1E; - int isSelected; - int isMouseInside; -}; - -typedef Common::Array InventoryIcons; - class Picture { MemoryObject obj; Common::Rect rect; @@ -405,22 +313,6 @@ class BigPicture { Picture pic; }; -class CInventory2 : public CInventory { - InventoryItems _inventoryItems; - InventoryIcons _inventoryIcons; - int _selectedId; - int _field_48; - int _isInventoryOut; - int _isLocked; - int _topOffset; - Scene *_sceneObj; - BigPicture *_picture; - - public: - CInventory2(); - bool loadPartial(MfcArchive &file); -}; - struct PreloadItem { int preloadId1; int preloadId2; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 99f25d4e04..d02d6f6e75 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -26,7 +26,6 @@ #include "common/array.h" #include "common/list.h" -#include "fullpipe/utils.h" #include "fullpipe/objects.h" namespace Fullpipe { @@ -76,15 +75,6 @@ CGameLoader::~CGameLoader() { delete _gameProject; } -bool CObject::loadFile(const char *fname) { - MfcArchive file; - - if (!file.open(fname)) - return false; - - return load(file); -} - bool CGameLoader::load(MfcArchive &file) { _gameName = file.readPascalString(); debug(6, "_gameName: %s", _gameName); @@ -204,68 +194,10 @@ SceneTag::~SceneTag() { free(_tag); } -bool CInventory::load(MfcArchive &file) { - _sceneId = file.readUint16LE(); - int numInvs = file.readUint32LE(); - - for (int i = 0; i < numInvs; i++) { - InventoryPoolItem *t = new InventoryPoolItem(); - t->_id = file.readUint16LE(); - t->_pictureObjectNormalId = file.readUint16LE(); - t->_pictureObjectId1 = file.readUint16LE(); - t->_pictureObjectMouseInsideId = file.readUint16LE(); - t->_pictureObjectId3 = file.readUint16LE(); - t->_flags = file.readUint32LE(); - t->_field_C = 0; - t->_field_A = -536; - _itemsPool.push_back(*t); - } - - return true; -} - -CInventory2::CInventory2() { - _selectedId = -1; - _field_48 = -1; - _sceneObj = 0; - _picture = 0; - _isInventoryOut = 0; - _isLocked = 0; - _topOffset = -65; -} - -bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartially - int numInvs = file.readUint32LE(); - - for (int i = 0; i < numInvs; i++) { - InventoryItem *t = new InventoryItem(); - t->itemId = file.readUint16LE(); - t->count = file.readUint16LE(); - _inventoryItems.push_back(*t); - } - - return true; -} - bool CInteractionController::load(MfcArchive &file) { return _interactions.load(file); } -bool CObList::load(MfcArchive &file) { - int count = file.readCount(); - - debug(9, "CObList::count: %d:", count); - - for (int i = 0; i < count; i++) { - debug(9, "CObList::[%d]", i); - CObject *t = file.readClass(); - - push_back(*t); - } - - return true; -} - CInputController::CInputController() { // TODO } @@ -399,20 +331,6 @@ bool CObjstateCommand::load(MfcArchive &file) { return true; } -bool CObArray::load(MfcArchive &file) { - int count = file.readCount(); - - resize(count); - - for (int i = 0; i < count; i++) { - CObject *t = file.readClass(); - - push_back(*t); - } - - return true; -} - bool PreloadItems::load(MfcArchive &file) { int count = file.readCount(); @@ -627,22 +545,6 @@ bool Sc2::load(MfcArchive &file) { return true; } -bool CDWordArray::load(MfcArchive &file) { - int count = file.readCount(); - - debug(9, "CDWordArray::count: %d", count); - - resize(count); - - for (int i = 0; i < count; i++) { - int32 t = file.readUint32LE(); - - push_back(t); - } - - return true; -} - bool PicAniInfo::load(MfcArchive &file) { type = file.readUint32LE(); objectId = file.readUint16LE(); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 6a09174bc6..b3d035bf06 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -24,12 +24,65 @@ #include "common/file.h" -#include "fullpipe/utils.h" #include "fullpipe/objects.h" #include "fullpipe/motion.h" namespace Fullpipe { +bool CObject::loadFile(const char *fname) { + MfcArchive file; + + if (!file.open(fname)) + return false; + + return load(file); +} + +bool CObList::load(MfcArchive &file) { + int count = file.readCount(); + + debug(9, "CObList::count: %d:", count); + + for (int i = 0; i < count; i++) { + debug(9, "CObList::[%d]", i); + CObject *t = file.readClass(); + + push_back(*t); + } + + return true; +} + +bool CObArray::load(MfcArchive &file) { + int count = file.readCount(); + + resize(count); + + for (int i = 0; i < count; i++) { + CObject *t = file.readClass(); + + push_back(*t); + } + + return true; +} + +bool CDWordArray::load(MfcArchive &file) { + int count = file.readCount(); + + debug(9, "CDWordArray::count: %d", count); + + resize(count); + + for (int i = 0; i < count; i++) { + int32 t = file.readUint32LE(); + + push_back(t); + } + + return true; +} + char *MfcArchive::readPascalString(bool twoByte) { char *tmp; int len; diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 9af7d14f67..88a06417cf 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -55,6 +55,53 @@ class MfcArchive : public Common::File { int getLevel() { return _level; } }; +class CObject { + public: + virtual bool load(MfcArchive &in) { return true; } + virtual ~CObject() {} + + bool loadFile(const char *fname); +}; + +class CObList : public Common::List, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +class MemoryObject { + //CObject obj; + int filename; + int field_8; + int field_C; + int field_10; + char field_14; + char field_15; + char field_16; + char field_17; + int data; + int dataSize; + int flags; + int libHandle; +}; + +class CObArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +class CDWordArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +struct CNode { + CNode *pNext; + CNode *pPrev; + void *data; +}; + +typedef Common::Array CPtrList; + } // End of namespace Fullpipe #endif /* FULLPIPE_UTILS_H */ -- cgit v1.2.3 From dac4f23f8464a3a5df3feebb2b74297df6a01c11 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 14:52:31 -0400 Subject: FULLPIPE: Turned InventoryPoolItem into struct --- engines/fullpipe/inventory.cpp | 25 +++++++++++++++++-------- engines/fullpipe/inventory.h | 22 ++++++++++++---------- 2 files changed, 29 insertions(+), 18 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 03b7cbf8b7..588b465415 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -32,20 +32,29 @@ bool CInventory::load(MfcArchive &file) { for (int i = 0; i < numInvs; i++) { InventoryPoolItem *t = new InventoryPoolItem(); - t->_id = file.readUint16LE(); - t->_pictureObjectNormalId = file.readUint16LE(); - t->_pictureObjectId1 = file.readUint16LE(); - t->_pictureObjectMouseInsideId = file.readUint16LE(); - t->_pictureObjectId3 = file.readUint16LE(); - t->_flags = file.readUint32LE(); - t->_field_C = 0; - t->_field_A = -536; + t->id = file.readUint16LE(); + t->pictureObjectNormalId = file.readUint16LE(); + t->pictureObjectId1 = file.readUint16LE(); + t->pictureObjectMouseInsideId = file.readUint16LE(); + t->pictureObjectId3 = file.readUint16LE(); + t->flags = file.readUint32LE(); + t->field_C = 0; + t->field_A = -536; _itemsPool.push_back(*t); } return true; } +int CInventory::getInventoryPoolItemIndexById(int itemId) { + for (int i = 0; i < _itemsPool.size(); i++) { + if (_itemsPool[i].id == itemId) + return i; + } + + return 0; +} + CInventory2::CInventory2() { _selectedId = -1; _field_48 = -1; diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 8b6271aa1b..30b23c3c98 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -28,17 +28,17 @@ namespace Fullpipe { class Scene; class BigPicture; -class InventoryPoolItem { +struct InventoryPoolItem { public: - int16 _id; - int16 _pictureObjectNormalId; - int16 _pictureObjectId1; - int16 _pictureObjectMouseInsideId; - int16 _pictureObjectId3; - int16 _field_A; - int _field_C; - int _obj; - int _flags; + int16 id; + int16 pictureObjectNormalId; + int16 pictureObjectId1; + int16 pictureObjectMouseInsideId; + int16 pictureObjectId3; + int16 field_A; + int field_C; + int obj; + int flags; }; typedef Common::Array InventoryPoolItems; @@ -51,6 +51,8 @@ class CInventory : public CObject { public: CInventory() { _sceneId = 0; } virtual bool load(MfcArchive &file); + + int getInventoryPoolItemIndexById(int itemId); }; struct InventoryItem { -- cgit v1.2.3 From 569b794bfec9b25e1f6a8bb64009840b2cc85d7f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 15:26:21 -0400 Subject: FULLPIPE: Continued work on Inventory --- engines/fullpipe/fullpipe.cpp | 5 +++++ engines/fullpipe/fullpipe.h | 7 +++++++ engines/fullpipe/inventory.cpp | 24 +++++++++++++++++++++++- engines/fullpipe/inventory.h | 5 +++++ engines/fullpipe/objects.h | 2 +- engines/fullpipe/stateloader.cpp | 8 ++++++++ 6 files changed, 49 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 406a6fdc48..1aa4f6c8c9 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -38,6 +38,7 @@ int g_gameProjectVersion = 0; int g_gameProjectValue = 0; int g_scrollSpeed = 0; int g_currSoundListCount = 0; +FullpipeEngine *g_fullpipe = 0; FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { // Setup mixer @@ -50,6 +51,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _rnd = new Common::RandomSource("fullpipe"); + g_fullpipe = this; } FullpipeEngine::~FullpipeEngine() { @@ -238,4 +240,7 @@ void FullpipeEngine::setObjectState(const char *name, int state) { var->setSubVarAsInt(name, state); } +void FullpipeEngine::accessScene(int sceneId) { +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 92c0052d68..52c0fd89a1 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -45,6 +45,7 @@ enum FullpipeGameFeatures { class CGameLoader; class CGameVar; +class CInventory2; extern int g_gameProjectVersion; extern int g_gameProjectValue; @@ -89,9 +90,13 @@ public: CGameVar *_swallowedEgg2; CGameVar *_swallowedEgg3; + CInventory2 *_inventory; + void setObjectState(const char *name, int state); int getObjectEnumState(const char *name, const char *state); + void accessScene(int sceneId); + public: bool _isSaveAllowed; @@ -101,6 +106,8 @@ public: }; +extern FullpipeEngine *g_fullpipe; + } // End of namespace Fullpipe #endif /* FULLPIPE_H */ diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 588b465415..877f260e57 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -47,7 +47,10 @@ bool CInventory::load(MfcArchive &file) { } int CInventory::getInventoryPoolItemIndexById(int itemId) { - for (int i = 0; i < _itemsPool.size(); i++) { + if (_itemsPool.size() <= 0) + return -1; + + for (uint i = 0; i < _itemsPool.size(); i++) { if (_itemsPool[i].id == itemId) return i; } @@ -55,6 +58,17 @@ int CInventory::getInventoryPoolItemIndexById(int itemId) { return 0; } +bool CInventory::setItemFlags(int itemId, int flags) { + int idx = getInventoryPoolItemIndexById(itemId); + + if (idx < 0) + return false; + else + _itemsPool[idx].flags = flags; + + return true; +} + CInventory2::CInventory2() { _selectedId = -1; _field_48 = -1; @@ -78,4 +92,12 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia return true; } +void CInventory2::addItem(int itemId, int value) { + warning("STUB: CInventory2::addItem"); +} + +void CInventory2::rebuildItemRects() { + g_fullpipe->accessScene(_sceneId); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 30b23c3c98..5f0131b173 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -44,6 +44,8 @@ struct InventoryPoolItem { typedef Common::Array InventoryPoolItems; class CInventory : public CObject { + friend class CInventory2; + int16 _sceneId; int16 _field_6; InventoryPoolItems _itemsPool; @@ -53,6 +55,7 @@ class CInventory : public CObject { virtual bool load(MfcArchive &file); int getInventoryPoolItemIndexById(int itemId); + bool setItemFlags(int itemId, int flags); }; struct InventoryItem { @@ -92,6 +95,8 @@ class CInventory2 : public CInventory { public: CInventory2(); bool loadPartial(MfcArchive &file); + void addItem(int itemId, int value); + void rebuildItemRects(); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 9ef2dfe22d..d6f46f7736 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -333,6 +333,7 @@ class CGameLoader : public CObject { virtual bool load(MfcArchive &file); CGameVar *_gameVar; + CInventory2 _inventory; private: GameProject *_gameProject; @@ -347,7 +348,6 @@ class CGameLoader : public CObject { int _field_28; int _field_2C; CInputController _inputController; - CInventory2 _inventory; Sc2Array _sc2array; void *_sceneSwitcher; void *_preloadCallback; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index d02d6f6e75..4e9d929e52 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -27,6 +27,7 @@ #include "common/list.h" #include "fullpipe/objects.h" +#include "fullpipe/gameobj.h" namespace Fullpipe { @@ -36,6 +37,13 @@ bool FullpipeEngine::loadGam(const char *fname) { if (_gameLoader->loadFile(fname)) { g_currSoundListCount = 0; initObjectStates(); + + //set_g_messageQueueCallback1(messageQueueCallback1); + //addMessageHandler2(global_messageHandler, 0, 4); + _inventory = &_gameLoader->_inventory; + _inventory->setItemFlags(ANI_INV_MAP, 0x10003); + _inventory->addItem(ANI_INV_MAP, 1); + _inventory->rebuildItemRects(); // TODO } else return false; -- cgit v1.2.3 From 2412eb23ad7bc0efe143ca19caad8d0d01deb784 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 15:34:29 -0400 Subject: FULLPIPE: Further refactoring classes into separate files --- engines/fullpipe/fullpipe.cpp | 3 -- engines/fullpipe/gfx.h | 75 +++++++++++++++++++++++++++++++++++ engines/fullpipe/module.mk | 1 + engines/fullpipe/objects.h | 84 ++-------------------------------------- engines/fullpipe/scene.cpp | 66 +++++++++++++++++++++++++++++++ engines/fullpipe/scene.h | 64 ++++++++++++++++++++++++++++++ engines/fullpipe/stateloader.cpp | 34 ---------------- 7 files changed, 209 insertions(+), 118 deletions(-) create mode 100644 engines/fullpipe/gfx.h create mode 100644 engines/fullpipe/scene.cpp create mode 100644 engines/fullpipe/scene.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 1aa4f6c8c9..6df26afe44 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -240,7 +240,4 @@ void FullpipeEngine::setObjectState(const char *name, int state) { var->setSubVarAsInt(name, state); } -void FullpipeEngine::accessScene(int sceneId) { -} - } // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h new file mode 100644 index 0000000000..7ecd4a5c59 --- /dev/null +++ b/engines/fullpipe/gfx.h @@ -0,0 +1,75 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_GFX_H +#define FULLPIPE_GFX_H + +namespace Fullpipe { + +class ShadowsItemArray : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +class Background { + CPtrList list; + int stringObj; + int x; + int y; + int16 messageQueueId; + int colorMemoryObj; + int bigPictureArray1Count; + int bigPictureArray2Count; + int bigPictureArray; +}; + +class Shadows { + //CObject obj; + int sceneId; + int staticAniObjectId; + int movementId; + ShadowsItemArray items; +}; + +class Picture { + MemoryObject obj; + Common::Rect rect; + int convertedBitmap; + int x; + int y; + int field_44; + int width; + int height; + int bitmap; + int field_54; + int memoryObject2; + int alpha; + int paletteData; +}; + +class BigPicture { + Picture pic; +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_GFX_H */ diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index e5a79523b2..fde81f1df2 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -6,6 +6,7 @@ MODULE_OBJS = \ inventory.o \ motion.o \ ngiarchive.o \ + scene.o \ stateloader.o \ utils.o diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index d6f46f7736..c39e0d0425 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -25,29 +25,11 @@ #include "fullpipe/utils.h" #include "fullpipe/inventory.h" +#include "fullpipe/gfx.h" +#include "fullpipe/scene.h" namespace Fullpipe { -class SceneTag : public CObject { - public: - int _field_4; - char *_tag; - int _scene; - int16 _sceneId; - int16 _field_12; - - public: - SceneTag(); - ~SceneTag(); - - virtual bool load(MfcArchive &file); -}; - -class SceneTagList : public Common::List, public CObject { - public: - virtual bool load(MfcArchive &file); -}; - class GameProject : public CObject { public: int _field_4; @@ -137,45 +119,6 @@ class CInputController { CInputController(); }; -class ShadowsItemArray : public Common::Array, public CObject { - public: - virtual bool load(MfcArchive &file); -}; - -class Background { - CPtrList list; - int stringObj; - int x; - int y; - int16 messageQueueId; - int colorMemoryObj; - int bigPictureArray1Count; - int bigPictureArray2Count; - int bigPictureArray; -}; - -class Shadows { - //CObject obj; - int sceneId; - int staticAniObjectId; - int movementId; - ShadowsItemArray items; -}; - -class Scene { - Background bg; - CPtrList staticANIObjectList1; - CPtrList staticANIObjectList2; - CPtrList messageQueueList; - CPtrList faObjectList; - Shadows *shadows; - int soundList; - int16 sceneId; - int stringObj; - int field_BC; - int libHandle; -}; - struct PicAniInfo { int32 type; int16 objectId; @@ -196,8 +139,7 @@ struct PicAniInfo { bool load(MfcArchive &file); }; -struct EntranceInfo -{ +struct EntranceInfo { int32 sceneId; int32 field_4; int32 messageQueueId; @@ -293,26 +235,6 @@ class CGameVar : public CObject { }; -class Picture { - MemoryObject obj; - Common::Rect rect; - int convertedBitmap; - int x; - int y; - int field_44; - int width; - int height; - int bitmap; - int field_54; - int memoryObject2; - int alpha; - int paletteData; -}; - -class BigPicture { - Picture pic; -}; - struct PreloadItem { int preloadId1; int preloadId2; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp new file mode 100644 index 0000000000..3b4b3086d8 --- /dev/null +++ b/engines/fullpipe/scene.cpp @@ -0,0 +1,66 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" + +namespace Fullpipe { + +void FullpipeEngine::accessScene(int sceneId) { +} + +bool SceneTagList::load(MfcArchive &file) { + int numEntries = file.readUint16LE(); + + for (int i = 0; i < numEntries; i++) { + SceneTag *t = new SceneTag(); + t->load(file); + push_back(*t); + } + + return true; +} + +SceneTag::SceneTag() { + _field_4 = 0; + _scene = 0; +} + +bool SceneTag::load(MfcArchive &file) { + _field_4 = 0; + _scene = 0; + + _sceneId = file.readUint16LE(); + + _tag = file.readPascalString(); + + debug(6, "sceneId: %d tag: %s", _sceneId, _tag); + + return true; +} + +SceneTag::~SceneTag() { + free(_tag); +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h new file mode 100644 index 0000000000..ee2ddd982b --- /dev/null +++ b/engines/fullpipe/scene.h @@ -0,0 +1,64 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_SCENE_H +#define FULLPIPE_SCENE_H + +namespace Fullpipe { + +class SceneTag : public CObject { + public: + int _field_4; + char *_tag; + int _scene; + int16 _sceneId; + int16 _field_12; + + public: + SceneTag(); + ~SceneTag(); + + virtual bool load(MfcArchive &file); +}; + +class SceneTagList : public Common::List, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + +class Scene { + Background bg; + CPtrList staticANIObjectList1; + CPtrList staticANIObjectList2; + CPtrList messageQueueList; + CPtrList faObjectList; + Shadows *shadows; + int soundList; + int16 sceneId; + int stringObj; + int field_BC; + int libHandle; +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_SCENE_H */ diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 4e9d929e52..a85e7f3c0c 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -168,40 +168,6 @@ GameProject::~GameProject() { free(_headerFilename); } -bool SceneTagList::load(MfcArchive &file) { - int numEntries = file.readUint16LE(); - - for (int i = 0; i < numEntries; i++) { - SceneTag *t = new SceneTag(); - t->load(file); - push_back(*t); - } - - return true; -} - -SceneTag::SceneTag() { - _field_4 = 0; - _scene = 0; -} - -bool SceneTag::load(MfcArchive &file) { - _field_4 = 0; - _scene = 0; - - _sceneId = file.readUint16LE(); - - _tag = file.readPascalString(); - - debug(6, "sceneId: %d tag: %s", _sceneId, _tag); - - return true; -} - -SceneTag::~SceneTag() { - free(_tag); -} - bool CInteractionController::load(MfcArchive &file) { return _interactions.load(file); } -- cgit v1.2.3 From bb4ea153ffa5eaf5be3e912e206566f7c9278a87 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 16:39:05 -0400 Subject: FULLPIPE: Started scene loading --- engines/fullpipe/fullpipe.cpp | 3 --- engines/fullpipe/fullpipe.h | 5 ++++- engines/fullpipe/scene.cpp | 47 +++++++++++++++++++++++++++++++++++++++- engines/fullpipe/scene.h | 35 +++++++++++++++++------------- engines/fullpipe/stateloader.cpp | 2 ++ engines/fullpipe/utils.cpp | 12 ++++++++++ engines/fullpipe/utils.h | 2 ++ 7 files changed, 86 insertions(+), 20 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 6df26afe44..d49fe9a773 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -28,7 +28,6 @@ #include "engines/util.h" #include "fullpipe/fullpipe.h" -#include "fullpipe/ngiarchive.h" #include "fullpipe/objectnames.h" #include "fullpipe/objects.h" @@ -66,8 +65,6 @@ Common::Error FullpipeEngine::run() { loadGam("fullpipe.gam"); - Common::Archive *arch = makeNGIArchive("3896.nl"); - return Common::kNoError; } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 52c0fd89a1..ce6935c25d 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -44,8 +44,10 @@ enum FullpipeGameFeatures { }; class CGameLoader; +class GameProject; class CGameVar; class CInventory2; +class Scene; extern int g_gameProjectVersion; extern int g_gameProjectValue; @@ -76,6 +78,7 @@ public: void updateEvents(); CGameLoader *_gameLoader; + GameProject *_gameProject; bool loadGam(const char *fname); int _gameProjectVersion; @@ -95,7 +98,7 @@ public: void setObjectState(const char *name, int state); int getObjectEnumState(const char *name, const char *state); - void accessScene(int sceneId); + Scene *accessScene(int sceneId); public: diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 3b4b3086d8..96ca7c05e6 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -23,10 +23,28 @@ #include "fullpipe/fullpipe.h" #include "fullpipe/objects.h" +#include "fullpipe/ngiarchive.h" namespace Fullpipe { -void FullpipeEngine::accessScene(int sceneId) { +Scene *FullpipeEngine::accessScene(int sceneId) { + SceneTag *t = 0; + + for (SceneTagList::iterator s = _gameProject->_sceneTagList->begin(); s != _gameProject->_sceneTagList->end(); ++s) { + if (s->_sceneId == sceneId) { + t = &(*s); + break; + } + } + + if (!t) + return 0; + + if (!t->_scene) { + t->loadScene(); + } + + return t->_scene; } bool SceneTagList::load(MfcArchive &file) { @@ -63,4 +81,31 @@ SceneTag::~SceneTag() { free(_tag); } +void SceneTag::loadScene() { + char *archname = genFileName(0, _sceneId, "nl"); + + Common::Archive *arch = makeNGIArchive(archname); + + char *fname = genFileName(0, _sceneId, "sc"); + + Common::SeekableReadStream *file = arch->createReadStreamForMember(fname); + + _scene = new Scene(); + + //_scene->load(*file); + + delete file; + + free(fname); + free(archname); + +} + +Scene::Scene() { +} + +bool Scene::load(MfcArchive &file) { + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index ee2ddd982b..d049267ad4 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -25,11 +25,29 @@ namespace Fullpipe { +class Scene : public CObject { + Background bg; + CPtrList staticANIObjectList1; + CPtrList staticANIObjectList2; + CPtrList messageQueueList; + CPtrList faObjectList; + Shadows *shadows; + int soundList; + int16 sceneId; + int stringObj; + int field_BC; + int libHandle; + + public: + Scene(); + virtual bool load(MfcArchive &file); +}; + class SceneTag : public CObject { public: int _field_4; char *_tag; - int _scene; + Scene *_scene; int16 _sceneId; int16 _field_12; @@ -38,6 +56,7 @@ class SceneTag : public CObject { ~SceneTag(); virtual bool load(MfcArchive &file); + void loadScene(); }; class SceneTagList : public Common::List, public CObject { @@ -45,20 +64,6 @@ class SceneTagList : public Common::List, public CObject { virtual bool load(MfcArchive &file); }; -class Scene { - Background bg; - CPtrList staticANIObjectList1; - CPtrList staticANIObjectList2; - CPtrList messageQueueList; - CPtrList faObjectList; - Shadows *shadows; - int soundList; - int16 sceneId; - int stringObj; - int field_BC; - int libHandle; -}; - } // End of namespace Fullpipe #endif /* FULLPIPE_SCENE_H */ diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index a85e7f3c0c..ea3655e763 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -91,6 +91,8 @@ bool CGameLoader::load(MfcArchive &file) { _gameProject->load(file); + g_fullpipe->_gameProject = _gameProject; + if (g_gameProjectVersion < 12) { error("Old gameProjectVersion: %d", g_gameProjectVersion); } diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index b3d035bf06..26c03ceeea 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -285,4 +285,16 @@ CObject *MfcArchive::parseClass(bool *isCopyReturned) { return res; } +char *genFileName(int superId, int sceneId, const char *ext) { + char *s = (char *)calloc(256, 1); + + if (superId) { + snprintf(s, 255, "%04d%04d.%s", superId, sceneId, ext); + } else { + snprintf(s, 255, "%04d.%s", sceneId, ext); + } + + return s; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 88a06417cf..409c5ded1a 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -102,6 +102,8 @@ struct CNode { typedef Common::Array CPtrList; +char *genFileName(int superId, int sceneId, const char *ext); + } // End of namespace Fullpipe #endif /* FULLPIPE_UTILS_H */ -- cgit v1.2.3 From 925f41b9c4055d39498c61c8f22388176ee25cce Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 17:21:37 -0400 Subject: FULLPIPE: Made MfcArchive work with both files and archives --- engines/fullpipe/scene.cpp | 7 +++++-- engines/fullpipe/utils.cpp | 10 +++++++--- engines/fullpipe/utils.h | 12 ++++++++++-- 3 files changed, 22 insertions(+), 7 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 96ca7c05e6..887647d347 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -92,19 +92,22 @@ void SceneTag::loadScene() { _scene = new Scene(); - //_scene->load(*file); + MfcArchive archive(file); + + _scene->load(archive); delete file; free(fname); free(archname); - } Scene::Scene() { } bool Scene::load(MfcArchive &file) { + debug(0, "Scene::load"); + return true; } diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 26c03ceeea..468d03b6f9 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -30,12 +30,14 @@ namespace Fullpipe { bool CObject::loadFile(const char *fname) { - MfcArchive file; + Common::File file; if (!file.open(fname)) return false; - return load(file); + MfcArchive archive(&file); + + return load(archive); } bool CObList::load(MfcArchive &file) { @@ -201,7 +203,7 @@ static CObject *createObject(int objectId) { return 0; } -MfcArchive::MfcArchive() { +MfcArchive::MfcArchive(Common::SeekableReadStream *stream) { for (int i = 0; classMap[i].name; i++) { _classMap[classMap[i].name] = classMap[i].id; } @@ -209,6 +211,8 @@ MfcArchive::MfcArchive() { _lastIndex = 1; _level = 0; + _stream = stream; + _objectMap.push_back(0); _objectIdMap.push_back(kNullObject); } diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 409c5ded1a..b349fc305d 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -33,7 +33,7 @@ class CObject; typedef Common::HashMap ClassMap; -class MfcArchive : public Common::File { +class MfcArchive : public Common::SeekableReadStream { ClassMap _classMap; Common::Array _objectMap; Common::Array _objectIdMap; @@ -41,8 +41,10 @@ class MfcArchive : public Common::File { int _lastIndex; int _level; + Common::SeekableReadStream *_stream; + public: - MfcArchive(); + MfcArchive(Common::SeekableReadStream *file); char *readPascalString(bool twoByte = false); int readCount(); @@ -53,6 +55,12 @@ class MfcArchive : public Common::File { void incLevel() { _level++; } void decLevel() { _level--; } int getLevel() { return _level; } + + virtual bool eos() const { return _stream->eos(); } + virtual uint32 read(void *dataPtr, uint32 dataSize) { return _stream->read(dataPtr, dataSize); } + virtual int32 pos() const { return _stream->pos(); } + virtual int32 size() const { return _stream->size(); } + virtual bool seek(int32 offset, int whence = SEEK_SET) { return _stream->seek(offset, whence); } }; class CObject { -- cgit v1.2.3 From 77ab4241d99df808b081a30163870ffa0d5688d6 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 18:13:18 -0400 Subject: FULLPIPE: Continued work on Scene loading. Pictures --- engines/fullpipe/fullpipe.cpp | 4 -- engines/fullpipe/fullpipe.h | 6 +-- engines/fullpipe/gfx.h | 94 +++++++++++++++++++++++++++------------- engines/fullpipe/module.mk | 1 + engines/fullpipe/scene.cpp | 8 +++- engines/fullpipe/scene.h | 22 +++++----- engines/fullpipe/stateloader.cpp | 24 +++++----- 7 files changed, 96 insertions(+), 63 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index d49fe9a773..c43e14beb6 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -33,10 +33,6 @@ namespace Fullpipe { -int g_gameProjectVersion = 0; -int g_gameProjectValue = 0; -int g_scrollSpeed = 0; -int g_currSoundListCount = 0; FullpipeEngine *g_fullpipe = 0; FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index ce6935c25d..034fda3caf 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -49,11 +49,6 @@ class CGameVar; class CInventory2; class Scene; -extern int g_gameProjectVersion; -extern int g_gameProjectValue; -extern int g_scrollSpeed; -extern int g_currSoundListCount; - class FullpipeEngine : public ::Engine { protected: @@ -84,6 +79,7 @@ public: int _gameProjectVersion; int _gameProjectValue; int _scrollSpeed; + int _currSoundListCount; void initObjectStates(); void setLevelStates(); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 7ecd4a5c59..e52d9b7f5b 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -30,16 +30,70 @@ class ShadowsItemArray : public Common::Array, public CObject { virtual bool load(MfcArchive &file); }; -class Background { - CPtrList list; - int stringObj; - int x; - int y; - int16 messageQueueId; - int colorMemoryObj; - int bigPictureArray1Count; - int bigPictureArray2Count; - int bigPictureArray; +class Picture : public MemoryObject { + Common::Rect _rect; + int _convertedBitmap; + int _x; + int _y; + int _field_44; + int _width; + int _height; + int _bitmap; + int _field_54; + int _memoryObject2; + int _alpha; + int _paletteData; +}; + +class BigPicture : public Picture { + +}; + +class GameObject : public CObject { + friend class PictureObject; + + int16 _field_4; + int16 _field_6; + int _field_8; + int16 _flags; + int16 _id; + char *_stringObj; + int _ox; + int _oy; + int _priority; + int _field_20; + + public: + GameObject(); + virtual bool load(MfcArchive &file); +}; + +class PictureObject : public GameObject { + Picture *_picture; + CPtrList *_pictureObject2List; + int _ox2; + int _oy2; + + public: + PictureObject(); + bool load(MfcArchive &file, bool bigPicture); +}; + +class Background : public CObject { + CPtrList _list; + char *_stringObj; + int _x; + int _y; + int16 _messageQueueId; + int _colorMemoryObj; + int _bigPictureArray1Count; + int _bigPictureArray2Count; + int _bigPictureArray; + + public: + Background(); + virtual bool load(MfcArchive &file); + void addPictureObject(PictureObject *pct); }; class Shadows { @@ -50,26 +104,6 @@ class Shadows { ShadowsItemArray items; }; -class Picture { - MemoryObject obj; - Common::Rect rect; - int convertedBitmap; - int x; - int y; - int field_44; - int width; - int height; - int bitmap; - int field_54; - int memoryObject2; - int alpha; - int paletteData; -}; - -class BigPicture { - Picture pic; -}; - } // End of namespace Fullpipe #endif /* FULLPIPE_GFX_H */ diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index fde81f1df2..a64727af44 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -3,6 +3,7 @@ MODULE := engines/fullpipe MODULE_OBJS = \ detection.o \ fullpipe.o \ + gfx.o \ inventory.o \ motion.o \ ngiarchive.o \ diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 887647d347..fb0a771376 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -103,10 +103,16 @@ void SceneTag::loadScene() { } Scene::Scene() { + _sceneId = 0; + _field_BC = 0; + _shadows = 0; + _soundList = 0; } bool Scene::load(MfcArchive &file) { - debug(0, "Scene::load"); + warning("STUB: Scene::load"); + + _bg.load(file); return true; } diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index d049267ad4..df532b2355 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -26,17 +26,17 @@ namespace Fullpipe { class Scene : public CObject { - Background bg; - CPtrList staticANIObjectList1; - CPtrList staticANIObjectList2; - CPtrList messageQueueList; - CPtrList faObjectList; - Shadows *shadows; - int soundList; - int16 sceneId; - int stringObj; - int field_BC; - int libHandle; + Background _bg; + CPtrList _staticANIObjectList1; + CPtrList _staticANIObjectList2; + CPtrList _messageQueueList; + CPtrList _faObjectList; + Shadows *_shadows; + int _soundList; + int16 _sceneId; + int _stringObj; + int _field_BC; + int _libHandle; public: Scene(); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index ea3655e763..d7cc9cf00c 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -35,7 +35,7 @@ bool FullpipeEngine::loadGam(const char *fname) { _gameLoader = new CGameLoader(); if (_gameLoader->loadFile(fname)) { - g_currSoundListCount = 0; + g_fullpipe->_currSoundListCount = 0; initObjectStates(); //set_g_messageQueueCallback1(messageQueueCallback1); @@ -93,8 +93,8 @@ bool CGameLoader::load(MfcArchive &file) { g_fullpipe->_gameProject = _gameProject; - if (g_gameProjectVersion < 12) { - error("Old gameProjectVersion: %d", g_gameProjectVersion); + if (g_fullpipe->_gameProjectVersion < 12) { + error("Old gameProjectVersion: %d", g_fullpipe->_gameProjectVersion); } _gameName = file.readPascalString(); @@ -140,25 +140,25 @@ bool GameProject::load(MfcArchive &file) { _headerFilename = 0; _field_10 = 12; - g_gameProjectVersion = file.readUint32LE(); - g_gameProjectValue = file.readUint16LE(); - g_scrollSpeed = file.readUint32LE(); + g_fullpipe->_gameProjectVersion = file.readUint32LE(); + g_fullpipe->_gameProjectValue = file.readUint16LE(); + g_fullpipe->_scrollSpeed = file.readUint32LE(); _headerFilename = file.readPascalString(); - debug(1, "_gameProjectVersion = %d", g_gameProjectVersion); - debug(1, "_gameProjectValue = %d", g_gameProjectValue); - debug(1, "_scrollSpeed = %d", g_scrollSpeed); + debug(1, "_gameProjectVersion = %d", g_fullpipe->_gameProjectVersion); + debug(1, "_gameProjectValue = %d", g_fullpipe->_gameProjectValue); + debug(1, "_scrollSpeed = %d", g_fullpipe->_scrollSpeed); debug(1, "_headerFilename = %s", _headerFilename); _sceneTagList = new SceneTagList(); _sceneTagList->load(file); - if (g_gameProjectVersion >= 3) + if (g_fullpipe->_gameProjectVersion >= 3) _field_4 = file.readUint32LE(); - if (g_gameProjectVersion >= 5) { + if (g_fullpipe->_gameProjectVersion >= 5) { file.readUint32LE(); file.readUint32LE(); } @@ -269,7 +269,7 @@ bool ExCommand::load(MfcArchive &file) { _field_3C = 0; - if (g_gameProjectVersion >= 12) { + if (g_fullpipe->_gameProjectVersion >= 12) { _flags = file.readUint32LE(); _parId = file.readUint32LE(); } -- cgit v1.2.3 From 47faa885015f619b730d8716c8527ae5819cb35f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 20 Jun 2013 21:49:28 -0400 Subject: FULLPIPE: Furhter work on picture loading --- engines/fullpipe/gfx.h | 8 +++++++- engines/fullpipe/utils.h | 3 +-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index e52d9b7f5b..4ecf4f485d 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -43,10 +43,16 @@ class Picture : public MemoryObject { int _memoryObject2; int _alpha; int _paletteData; + + public: + Picture(); + virtual bool load(MfcArchive &file); }; class BigPicture : public Picture { - + public: + BigPicture(); + virtual bool load(MfcArchive &file); }; class GameObject : public CObject { diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index b349fc305d..f1e4080f49 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -76,8 +76,7 @@ class CObList : public Common::List, public CObject { virtual bool load(MfcArchive &file); }; -class MemoryObject { - //CObject obj; +class MemoryObject : CObject { int filename; int field_8; int field_C; -- cgit v1.2.3 From 29f323fd27d67aede4668e07984eabd69180aee5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 21 Jun 2013 21:30:38 -0400 Subject: FULLPIPE: Completed Background loading --- engines/fullpipe/fullpipe.h | 3 +++ engines/fullpipe/gfx.h | 7 ++--- engines/fullpipe/ngiarchive.cpp | 33 +++-------------------- engines/fullpipe/ngiarchive.h | 27 +++++++++++++++++++ engines/fullpipe/scene.cpp | 2 ++ engines/fullpipe/utils.cpp | 60 +++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/utils.h | 41 +++++++++++++++++++--------- 7 files changed, 129 insertions(+), 44 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 034fda3caf..013303d71e 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -48,6 +48,7 @@ class GameProject; class CGameVar; class CInventory2; class Scene; +class NGIArchive; class FullpipeEngine : public ::Engine { protected: @@ -96,6 +97,8 @@ public: Scene *accessScene(int sceneId); + NGIArchive *_currArchive; + public: bool _isSaveAllowed; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 4ecf4f485d..6df8e7be84 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -40,13 +40,14 @@ class Picture : public MemoryObject { int _height; int _bitmap; int _field_54; - int _memoryObject2; + MemoryObject2 *_memoryObject2; int _alpha; - int _paletteData; + byte *_paletteData; public: Picture(); virtual bool load(MfcArchive &file); + void setAOIDs(); }; class BigPicture : public Picture { @@ -94,7 +95,7 @@ class Background : public CObject { int _colorMemoryObj; int _bigPictureArray1Count; int _bigPictureArray2Count; - int _bigPictureArray; + BigPicture ***_bigPictureArray; public: Background(); diff --git a/engines/fullpipe/ngiarchive.cpp b/engines/fullpipe/ngiarchive.cpp index 801d020495..5d895c17a0 100644 --- a/engines/fullpipe/ngiarchive.cpp +++ b/engines/fullpipe/ngiarchive.cpp @@ -33,33 +33,6 @@ namespace Fullpipe { -#define NGI_FILENAME_MAX 13 - -struct NgiHeader { - int32 pos; - int32 extVal; - int32 flags; - int32 size; - char filename[NGI_FILENAME_MAX]; -}; - -typedef Common::HashMap NgiHeadersMap; - -class NGIArchive : public Common::Archive { - NgiHeadersMap _headers; - Common::String _ngiFilename; - -public: - NGIArchive(const Common::String &name); - virtual ~NGIArchive(); - - // Archive implementation - virtual bool hasFile(const Common::String &name) const; - virtual int listMembers(Common::ArchiveMemberList &list) const; - virtual const Common::ArchiveMemberPtr getMember(const Common::String &name) const; - virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const; -}; - NGIArchive::NGIArchive(const Common::String &filename) : _ngiFilename(filename) { Common::File ngiFile; @@ -118,6 +91,8 @@ NGIArchive::NGIArchive(const Common::String &filename) : _ngiFilename(filename) free(fat); + g_fullpipe->_currArchive = this; + debug(0, "NGIArchive::NGIArchive(%s): Located %d files", filename.c_str(), _headers.size()); } @@ -127,6 +102,8 @@ NGIArchive::~NGIArchive() { for ( ; it != _headers.end(); ++it) { delete it->_value; } + + g_fullpipe->_currArchive = 0; } bool NGIArchive::hasFile(const Common::String &name) const { @@ -163,8 +140,6 @@ Common::SeekableReadStream *NGIArchive::createReadStreamForMember(const Common:: archiveFile.open(_ngiFilename); archiveFile.seek(hdr->pos, SEEK_SET); - // TODO: It would be good if ArjFile could decompress files in a streaming - // mode, so it would not need to pre-allocate the entire output. byte *data = (byte *)malloc(hdr->size); assert(data); diff --git a/engines/fullpipe/ngiarchive.h b/engines/fullpipe/ngiarchive.h index ee977c6140..a5b05a2e50 100644 --- a/engines/fullpipe/ngiarchive.h +++ b/engines/fullpipe/ngiarchive.h @@ -29,6 +29,33 @@ namespace Fullpipe { class Archive; +#define NGI_FILENAME_MAX 13 + +struct NgiHeader { + int32 pos; + int32 extVal; + int32 flags; + int32 size; + char filename[NGI_FILENAME_MAX]; +}; + +typedef Common::HashMap NgiHeadersMap; + +class NGIArchive : public Common::Archive { + NgiHeadersMap _headers; + Common::String _ngiFilename; + +public: + NGIArchive(const Common::String &name); + virtual ~NGIArchive(); + + // Archive implementation + virtual bool hasFile(const Common::String &name) const; + virtual int listMembers(Common::ArchiveMemberList &list) const; + virtual const Common::ArchiveMemberPtr getMember(const Common::String &name) const; + virtual Common::SeekableReadStream *createReadStreamForMember(const Common::String &name) const; +}; + /** * This factory method creates an Archive instance corresponding to the content * of the NGI compressed file with the given name. diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index fb0a771376..4f17230d6c 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -98,6 +98,8 @@ void SceneTag::loadScene() { delete file; + g_fullpipe->_currArchive = 0; + free(fname); free(archname); } diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 468d03b6f9..0462c4ec3e 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -23,9 +23,11 @@ #include "fullpipe/fullpipe.h" #include "common/file.h" +#include "common/memstream.h" #include "fullpipe/objects.h" #include "fullpipe/motion.h" +#include "fullpipe/ngiarchive.h" namespace Fullpipe { @@ -102,6 +104,64 @@ char *MfcArchive::readPascalString(bool twoByte) { return tmp; } +MemoryObject::MemoryObject() { + _filename = 0; + _field_8 = 0; + _field_C = 0; + _field_10 = -1; + _field_14 = 1; + _dataSize = 0; + _flags = 0; + _libHandle = 0; + _data = 0; +} + +bool MemoryObject::load(MfcArchive &file) { + _filename = file.readPascalString(); + + if (g_fullpipe->_currArchive) { + _field_14 = 0; + _libHandle = g_fullpipe->_currArchive; + } + + return true; +} + +void MemoryObject::loadFile(char *filename) { + if (!_data) { + if (g_fullpipe->_currArchive != _libHandle) { + assert(0); + } + + Common::SeekableReadStream *s = _libHandle->createReadStreamForMember(filename); + + if (s) { + debug(0, "Reading %s", filename); + assert(s->size() > 0); + _data = calloc(s->size(), 1); + s->read(_data, s->size()); + + delete s; + } + } +} + +MemoryObject2::MemoryObject2() { + _data2 = 0; +} + +bool MemoryObject2::load(MfcArchive &file) { + MemoryObject::load(file); + + _flags |= 1; + + if (_filename) { + MemoryObject::loadFile(_filename); + } + + return true; +} + int MfcArchive::readCount() { int count = readUint16LE(); diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index f1e4080f49..bb9ed89935 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -30,6 +30,7 @@ namespace Fullpipe { class CObject; +class NGIArchive; typedef Common::HashMap ClassMap; @@ -77,18 +78,34 @@ class CObList : public Common::List, public CObject { }; class MemoryObject : CObject { - int filename; - int field_8; - int field_C; - int field_10; - char field_14; - char field_15; - char field_16; - char field_17; - int data; - int dataSize; - int flags; - int libHandle; + friend class MemoryObject2; + friend class Picture; + + char *_filename; + int _field_8; + int _field_C; + int _field_10; + char _field_14; + char _field_15; + char _field_16; + char _field_17; + void *_data; + int _dataSize; + int _flags; + NGIArchive *_libHandle; + + public: + MemoryObject(); + virtual bool load(MfcArchive &file); + void loadFile(char *filename); +}; + +class MemoryObject2 : public MemoryObject { + void *_data2; + + public: + MemoryObject2(); + virtual bool load(MfcArchive &file); }; class CObArray : public Common::Array, public CObject { -- cgit v1.2.3 From 751f435df0ef424293e5bb44e205e898897aea6a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 21 Jun 2013 22:04:17 -0400 Subject: FULLPIPE: Continued on scene loading --- engines/fullpipe/objects.h | 46 +++++++++---------- engines/fullpipe/scene.cpp | 28 ++++++++++++ engines/fullpipe/scene.h | 2 +- engines/fullpipe/statics.h | 112 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 164 insertions(+), 24 deletions(-) create mode 100644 engines/fullpipe/statics.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index c39e0d0425..c12905ec58 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -120,33 +120,33 @@ class CInputController { }; struct PicAniInfo { - int32 type; - int16 objectId; - int16 field_6; - int32 field_8; - int16 field_C; - int16 field_E; - int32 ox; - int32 oy; - int32 priority; - int16 staticsId; - int16 movementId; - int16 dynamicPhaseIndex; - int16 flags; - int32 field_24; - int32 someDynamicPhaseIndex; - - bool load(MfcArchive &file); + int32 type; + int16 objectId; + int16 field_6; + int32 field_8; + int16 field_C; + int16 field_E; + int32 ox; + int32 oy; + int32 priority; + int16 staticsId; + int16 movementId; + int16 dynamicPhaseIndex; + int16 flags; + int32 field_24; + int32 someDynamicPhaseIndex; + + bool load(MfcArchive &file); }; struct EntranceInfo { - int32 sceneId; - int32 field_4; - int32 messageQueueId; - byte gap_C[292]; // FIXME - int32 field_130; + int32 sceneId; + int32 field_4; + int32 messageQueueId; + byte gap_C[292]; // FIXME + int32 field_130; - bool load(MfcArchive &file); + bool load(MfcArchive &file); }; class CMotionController; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 4f17230d6c..7b74c18f97 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -24,6 +24,7 @@ #include "fullpipe/objects.h" #include "fullpipe/ngiarchive.h" +#include "fullpipe/statics.h" namespace Fullpipe { @@ -116,6 +117,33 @@ bool Scene::load(MfcArchive &file) { _bg.load(file); + _sceneId = file.readUint16LE(); + + _stringObj = file.readPascalString(); + debug(0, "scene: <%s>", _stringObj); + + int count = file.readUint16LE(); + + for (int i = 0; i < count; i++) { + int aniNum = file.readUint16LE(); + char *aniname = genFileName(0, aniNum, "ani"); + + Common::SeekableReadStream *f = g_fullpipe->_currArchive->createReadStreamForMember(aniname); + + StaticANIObject *ani = new StaticANIObject(); + + MfcArchive archive(f); + + ani->load(archive); + ani->_sceneId = _sceneId; + + _staticANIObjectList1.push_back(ani); + + delete f; + free(aniname); + + + } return true; } diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index df532b2355..1c7a9fda04 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -34,7 +34,7 @@ class Scene : public CObject { Shadows *_shadows; int _soundList; int16 _sceneId; - int _stringObj; + char *_stringObj; int _field_BC; int _libHandle; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h new file mode 100644 index 0000000000..ef4f2a5fb3 --- /dev/null +++ b/engines/fullpipe/statics.h @@ -0,0 +1,112 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_STATICS_H +#define FULLPIPE_STATICS_H + +namespace Fullpipe { + +class CStepArray : public CObject { + int _currPointIndex; + int _points; + int _maxPointIndex; + int _pointsCount; + int _isEos; +}; + +class StaticPhase : public Picture { + int16 _initialCountdown; + int16 _countdown; + int16 _field_68; + int16 _field_6A; + int _exCommand; +}; + +class DynamicPhase : public StaticPhase { + int _someX; + int _someY; + Common::Rect *_rectPtr; + int16 _field_7C; + int16 _field_7E; + int _flags; +}; + +class Statics : public DynamicPhase { + int16 _staticsId; + int16 _field_86; + char *_stringObj; + int _picture; +}; + +class Movement : public GameObject { + int _field_24; + int _field_28; + int _lastFrameSpecialFlag; + int _flipFlag; + int _updateFlag1; + Statics *_staticsObj1; + Statics *_staticsObj2; + int _mx; + int _my; + int _m2x; + int _m2y; + int _field_50; + int _counterMax; + int _counter; + CPtrList _dynamicPhases; + int _field_78; + int _framePosOffsets; + int _currMovementObj; + int _field_84; + DynamicPhase *_currDynamicPhase; + int _field_8C; + int _currDynamicPhaseIndex; + int _field_94; +}; + +class StaticANIObject : public GameObject { + Movement *_movementObj; + Statics *_staticsObj; + int _shadowsOn; + int16 _field_30; + int16 _field_32; + int _field_34; + int _initialCounter; + int _callback1; + int _callback2; + CPtrList _movements; + CPtrList _staticsList; + CStepArray _stepArray; + int16 _field_96; + int _messageQueueId; + int _messageNum; + int _animExFlag; + int _counter; + int _someDynamicPhaseIndex; + + public: + int16 _sceneId; +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_STATICS_H */ -- cgit v1.2.3 From 0b6591e4912117e730f4227975e83285583933e0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 22 Jun 2013 13:26:49 -0400 Subject: FULLPIPE: Continued work on scene loading --- engines/fullpipe/gfx.cpp | 200 +++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/gfx.h | 3 +- engines/fullpipe/inventory.h | 3 +- engines/fullpipe/module.mk | 1 + engines/fullpipe/motion.h | 98 ++++++++++----------- engines/fullpipe/scene.cpp | 5 +- engines/fullpipe/statics.cpp | 114 ++++++++++++++++++++++++ engines/fullpipe/statics.h | 22 ++++- engines/fullpipe/utils.h | 2 +- 9 files changed, 388 insertions(+), 60 deletions(-) create mode 100644 engines/fullpipe/gfx.cpp create mode 100644 engines/fullpipe/statics.cpp (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp new file mode 100644 index 0000000000..26f7f3e3a9 --- /dev/null +++ b/engines/fullpipe/gfx.cpp @@ -0,0 +1,200 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" + +namespace Fullpipe { + +Background::Background() { + _x = 0; + _y = 0; + _messageQueueId = 0; + _bigPictureArray1Count = 0; + _bigPictureArray2Count = 0; + _bigPictureArray = 0; +} + +bool Background::load(MfcArchive &file) { + _stringObj = file.readPascalString(); + + int count = file.readUint16LE(); + + for (int i = 0; i < count; i++) { + PictureObject *pct = new PictureObject(); + + pct->load(file, i == 0); + addPictureObject(pct); + } + + assert(g_fullpipe->_gameProjectVersion >= 4); + + _bigPictureArray1Count = file.readUint32LE(); + + assert(g_fullpipe->_gameProjectVersion >= 5); + + _bigPictureArray2Count = file.readUint32LE(); + + _bigPictureArray = (BigPicture ***)calloc(_bigPictureArray1Count, sizeof(BigPicture **)); + + debug(0, "bigPictureArray[%d][%d]", _bigPictureArray1Count, _bigPictureArray2Count); + + for (int i = 0; i < _bigPictureArray1Count; i++) { + _bigPictureArray[i] = (BigPicture **)calloc(_bigPictureArray2Count, sizeof(BigPicture *)); + for (int j = 0; j < _bigPictureArray2Count; j++) { + _bigPictureArray[i][j] = new BigPicture(); + + _bigPictureArray[i][j]->load(file); + } + } + + return true; +} + +void Background::addPictureObject(PictureObject *pct) { + warning("STUB: Background::addPictureObject"); +} + +PictureObject::PictureObject() { + _ox = 0; + _oy = 0; + _picture = 0; +} + +bool PictureObject::load(MfcArchive &file, bool bigPicture) { + GameObject::load(file); + + if (bigPicture) + _picture = new BigPicture(); + else + _picture = new Picture(); + + _picture->load(file); + + _pictureObject2List = new CPtrList(); + + int count = file.readUint16LE(); + + if (count > 0) { + GameObject *o = new GameObject(); + + o->load(file); + _pictureObject2List->push_back(o); + } + + _ox2 = _ox; + _oy2 = _oy; + + return true; +} + +GameObject::GameObject() { + _field_4 = 0; + _flags = 0; + _id = 0; + _ox = 0; + _oy = 0; + _priority = 0; + _field_20 = 0; + _field_8 = 0; +} + +bool GameObject::load(MfcArchive &file) { + _field_4 = 0; + _flags = 0; + _field_20 = 0; + + _id = file.readUint16LE(); + + _stringObj = file.readPascalString(); + _ox = file.readUint32LE(); + _oy = file.readUint32LE(); + _priority = file.readUint16LE(); + + if (g_fullpipe->_gameProjectVersion >= 11) { + _field_8 = file.readUint32LE(); + } + + return true; +} + +Picture::Picture() { + _x = 0; + _y = 0; + _field_44 = 0; + _field_54 = 0; + _bitmap = 0; + _alpha = -1; + _paletteData = 0; + _convertedBitmap = 0; +} + +bool Picture::load(MfcArchive &file) { + MemoryObject::load(file); + + _x = file.readUint32LE(); + _y = file.readUint32LE(); + _field_44 = file.readUint16LE(); + + assert(g_fullpipe->_gameProjectVersion >= 2); + + _width = file.readUint32LE(); + _height = file.readUint32LE(); + + _flags |= 1; + + _memoryObject2 = new MemoryObject2; + _memoryObject2->load(file); + + if (_memoryObject2->_data) { + setAOIDs(); + } + + assert (g_fullpipe->_gameProjectVersion >= 12); + + _alpha = file.readUint32LE(); + + int havePal = file.readUint32LE(); + + if (havePal > 0) { + _paletteData = (byte *)calloc(1024, 1); + file.read(_paletteData, 1024); + } + + return true; +} + +void Picture::setAOIDs() { + warning("STUB: Picture::setAOIDs()"); +} + +BigPicture::BigPicture() { +} + +bool BigPicture::load(MfcArchive &file) { + Picture::load(file); + + return true; +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 6df8e7be84..ae06910abd 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -57,8 +57,7 @@ class BigPicture : public Picture { }; class GameObject : public CObject { - friend class PictureObject; - + protected: int16 _field_4; int16 _field_6; int _field_8; diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 5f0131b173..fadadd56b2 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -44,8 +44,7 @@ struct InventoryPoolItem { typedef Common::Array InventoryPoolItems; class CInventory : public CObject { - friend class CInventory2; - + protected: int16 _sceneId; int16 _field_6; InventoryPoolItems _itemsPool; diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index a64727af44..77dcfaa2c3 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -9,6 +9,7 @@ MODULE_OBJS = \ ngiarchive.o \ scene.o \ stateloader.o \ + statics.o \ utils.o # This module can be built as a plugin diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index fb7b45446e..39fadbe6e2 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -52,20 +52,20 @@ class CMctlCompound : public CMotionController { }; class Unk2 : public CObject { - int _items; - int _count; + int _items; + int _count; public: Unk2() : _items(0), _count(0) {} }; class CMovGraphNode : public CObject { - int _x; - int _y; - int _distance; - int16 _field_10; - int16 _field_12; - int _field_14; + int _x; + int _y; + int _distance; + int16 _field_10; + int16 _field_12; + int _field_14; public: CMovGraphNode() : _x(0), _y(0), _distance(0), _field_10(0), _field_14(0) {} @@ -73,7 +73,7 @@ class CMovGraphNode : public CObject { }; class CMovGraphReact : public CObject { - // Empty + // Empty }; class CMctlCompoundArrayItem : public CMotionController { @@ -87,64 +87,64 @@ class CMctlCompoundArrayItem : public CMotionController { int _field_28; public: - CMctlCompoundArrayItem() : _movGraphReactObj(0) {} + CMctlCompoundArrayItem() : _movGraphReactObj(0) {} }; class CReactParallel : public CMovGraphReact { - //CRgn _rgn; - int _x1; - int _y1; - int _x2; - int _y2; - int _dx; - int _dy; - Common::Point **_points; + //CRgn _rgn; + int _x1; + int _y1; + int _x2; + int _y2; + int _dx; + int _dy; + Common::Point **_points; public: - CReactParallel(); - virtual bool load(MfcArchive &file); - void createRegion(); + CReactParallel(); + virtual bool load(MfcArchive &file); + void createRegion(); }; class CReactPolygonal : public CMovGraphReact { - //CRgn _rgn; - int _field_C; - int _field_10; - int _pointCount; - Common::Point **_points; + //CRgn _rgn; + int _field_C; + int _field_10; + int _pointCount; + Common::Point **_points; public: - CReactPolygonal(); - virtual bool load(MfcArchive &file); - void createRegion(); + CReactPolygonal(); + virtual bool load(MfcArchive &file); + void createRegion(); }; class CMovGraphLink : public CObject { - CMovGraphNode *_movGraphNode1; - CMovGraphNode *_movGraphNode2; - CDWordArray _dwordArray1; - CDWordArray _dwordArray2; - int _flags; - int _field_38; - int _field_3C; - double _distance; - double _angle; - CMovGraphReact *_movGraphReact; - char *_name; + CMovGraphNode *_movGraphNode1; + CMovGraphNode *_movGraphNode2; + CDWordArray _dwordArray1; + CDWordArray _dwordArray2; + int _flags; + int _field_38; + int _field_3C; + double _distance; + double _angle; + CMovGraphReact *_movGraphReact; + char *_name; public: - CMovGraphLink(); - virtual bool load(MfcArchive &file); + CMovGraphLink(); + virtual bool load(MfcArchive &file); }; class CMovGraph : public CMotionController { - CObList _nodes; - CObList _links; - int _field_44; - int _items; - int _itemsCount; - int (*_callback1)(int, int, int); - Unk2 _unk2; + CObList _nodes; + CObList _links; + int _field_44; + int _items; + int _itemsCount; + int (*_callback1)(int, int, int); + Unk2 _unk2; public: CMovGraph(); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 7b74c18f97..238d6050aa 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -113,8 +113,6 @@ Scene::Scene() { } bool Scene::load(MfcArchive &file) { - warning("STUB: Scene::load"); - _bg.load(file); _sceneId = file.readUint16LE(); @@ -141,9 +139,10 @@ bool Scene::load(MfcArchive &file) { delete f; free(aniname); + } + warning("STUB: Scene::load"); - } return true; } diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp new file mode 100644 index 0000000000..5db1154c8b --- /dev/null +++ b/engines/fullpipe/statics.cpp @@ -0,0 +1,114 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" +#include "fullpipe/ngiarchive.h" +#include "fullpipe/statics.h" + +namespace Fullpipe { + +StaticANIObject::StaticANIObject() { + _shadowsOn = 1; + _field_30 = 0; + _field_34 = 1; + _initialCounter = 0; + _messageQueueId = 0; + _animExFlag = 0; + _counter = 0; + _movementObj = 0; + _staticsObj = 0; + _flags = 0; + _callback1 = 0; + _callback2 = 0; + _sceneId = -1; + _someDynamicPhaseIndex = -1; +} + +bool StaticANIObject::load(MfcArchive &file) { + GameObject::load(file); + + int count = file.readUint16LE(); + + for (int i = 0; i < count; i++) { + Statics *st = new Statics(); + + st->load(file); + _staticsList.push_back(st); + } + + count = file.readUint16LE(); + + for (int i = 0; i < count; i++) { + int movNum = file.readUint16LE(); + + char *movname = genFileName(_id, movNum, "mov"); + + Common::SeekableReadStream *f = g_fullpipe->_currArchive->createReadStreamForMember(movname); + + Movement *mov = new Movement(); + + MfcArchive archive(f); + + mov->load(archive, this); + + _movements.push_back(mov); + + delete f; + free(movname); + } + + Common::Point pt; + if (count) { // We have movements + ((Movement *)_movements[0])->getCurrDynamicPhaseXY(pt); + } else { + pt.x = pt.y = 100; + } + + setOXY(pt.x, pt.y); + + return true; +} + +void StaticANIObject::setOXY(int x, int y) { +} + +Movement::Movement() { +} + +bool Movement::load(MfcArchive &file) { + warning("STUB: Movement::load"); + return true; +} +bool Movement::load(MfcArchive &file, StaticANIObject *ani) { + return true; +} + +Common::Point *Movement::getCurrDynamicPhaseXY(Common::Point &p) { + p.x = _currDynamicPhase->_x; + p.y = _currDynamicPhase->_y; + + return &p; +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index ef4f2a5fb3..82c24eb095 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -42,8 +42,10 @@ class StaticPhase : public Picture { }; class DynamicPhase : public StaticPhase { - int _someX; - int _someY; + friend class Movement; + + int _x; + int _y; Common::Rect *_rectPtr; int16 _field_7C; int16 _field_7E; @@ -57,6 +59,8 @@ class Statics : public DynamicPhase { int _picture; }; +class StaticANIObject; + class Movement : public GameObject { int _field_24; int _field_28; @@ -74,13 +78,20 @@ class Movement : public GameObject { int _counter; CPtrList _dynamicPhases; int _field_78; - int _framePosOffsets; + Common::Point *_framePosOffsets; int _currMovementObj; int _field_84; DynamicPhase *_currDynamicPhase; int _field_8C; int _currDynamicPhaseIndex; int _field_94; + + public: + Movement(); + virtual bool load(MfcArchive &file); + bool load(MfcArchive &file, StaticANIObject *ani); + + Common::Point *getCurrDynamicPhaseXY(Common::Point &p); }; class StaticANIObject : public GameObject { @@ -105,6 +116,11 @@ class StaticANIObject : public GameObject { public: int16 _sceneId; + + public: + StaticANIObject(); + virtual bool load(MfcArchive &file); + void setOXY(int x, int y); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index bb9ed89935..94fdf4b5ca 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -78,9 +78,9 @@ class CObList : public Common::List, public CObject { }; class MemoryObject : CObject { - friend class MemoryObject2; friend class Picture; + protected: char *_filename; int _field_8; int _field_C; -- cgit v1.2.3 From 1c1d8db613fccbab568efd1e57a86a419dc813c9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 13 Jul 2013 11:51:22 +0300 Subject: FULLPIPE: Now StaticANIObject is loaded fully --- engines/fullpipe/gfx.cpp | 7 +- engines/fullpipe/gfx.h | 5 +- engines/fullpipe/statics.cpp | 214 +++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/statics.h | 38 ++++++-- engines/fullpipe/utils.cpp | 2 + 5 files changed, 257 insertions(+), 9 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 26f7f3e3a9..8b801a7031 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -57,7 +57,7 @@ bool Background::load(MfcArchive &file) { _bigPictureArray = (BigPicture ***)calloc(_bigPictureArray1Count, sizeof(BigPicture **)); - debug(0, "bigPictureArray[%d][%d]", _bigPictureArray1Count, _bigPictureArray2Count); + debug(6, "bigPictureArray[%d][%d]", _bigPictureArray1Count, _bigPictureArray2Count); for (int i = 0; i < _bigPictureArray1Count; i++) { _bigPictureArray[i] = (BigPicture **)calloc(_bigPictureArray2Count, sizeof(BigPicture *)); @@ -138,6 +138,11 @@ bool GameObject::load(MfcArchive &file) { return true; } +void GameObject::setOXY(int x, int y) { + _ox = x; + _oy = y; +} + Picture::Picture() { _x = 0; _y = 0; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index ae06910abd..7b304eab22 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -31,6 +31,8 @@ class ShadowsItemArray : public Common::Array, public CObject { }; class Picture : public MemoryObject { + friend class Movement; + Common::Rect _rect; int _convertedBitmap; int _x; @@ -57,7 +59,7 @@ class BigPicture : public Picture { }; class GameObject : public CObject { - protected: + public: int16 _field_4; int16 _field_6; int _field_8; @@ -72,6 +74,7 @@ class GameObject : public CObject { public: GameObject(); virtual bool load(MfcArchive &file); + void setOXY(int x, int y); }; class PictureObject : public GameObject { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 5db1154c8b..04aa8cf85c 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -25,6 +25,7 @@ #include "fullpipe/objects.h" #include "fullpipe/ngiarchive.h" #include "fullpipe/statics.h" +#include "fullpipe/gameobj.h" namespace Fullpipe { @@ -58,6 +59,7 @@ bool StaticANIObject::load(MfcArchive &file) { } count = file.readUint16LE(); + debug(7, "Movements: %d", count); for (int i = 0; i < count; i++) { int movNum = file.readUint16LE(); @@ -91,9 +93,75 @@ bool StaticANIObject::load(MfcArchive &file) { } void StaticANIObject::setOXY(int x, int y) { + _ox = x; + _oy = y; + + if (_movementObj) + _movementObj->setOXY(x, y); +} + +Statics *StaticANIObject::getStaticsById(int itemId) { + for (uint i = 0; i < _staticsList.size(); i++) + if (((Statics *)_staticsList[i])->_staticsId == itemId) + return (Statics *)_staticsList[i]; + + return 0; +} + +Movement *StaticANIObject::getMovementById(int itemId) { + for (uint i = 0; i < _movements.size(); i++) + if (((Movement *)_movements[i])->_id == itemId) + return (Movement *)_movements[i]; + + return 0; +} + +Statics *StaticANIObject::addStatics(Statics *ani) { + warning("STUB: StaticANIObject::addStatics"); + + return 0; +} + +Statics::Statics() { + _staticsId = 0; + _picture = 0; +} + +bool Statics::load(MfcArchive &file) { + DynamicPhase::load(file); + + _staticsId = file.readUint16LE(); + + _stringObj = file.readPascalString(); + debug(7, "statics: <%s>", _stringObj); + + _picture = new Picture(); + _picture->load(file); + + return true; } Movement::Movement() { + _lastFrameSpecialFlag = 0; + _flipFlag = 0; + _updateFlag1 = 0; + _staticsObj1 = 0; + _staticsObj2 = 0; + _mx = 0; + _my = 0; + _m2x = 0; + _m2y = 0; + _field_50 = 1; + _field_78 = 0; + _framePosOffsets = 0; + _field_84 = 0; + _currDynamicPhase = 0; + _field_8C = 0; + _currDynamicPhaseIndex = 0; + _field_94 = 0; + _currMovementObj = 0; + _counter = 0; + _counterMax = 83; } bool Movement::load(MfcArchive &file) { @@ -101,6 +169,84 @@ bool Movement::load(MfcArchive &file) { return true; } bool Movement::load(MfcArchive &file, StaticANIObject *ani) { + GameObject::load(file); + + int dynCount = file.readUint16LE(); + + debug(7, "dynCount: %d _id: %d", dynCount, _id); + if (dynCount != 0xffff || _id == MV_MAN_TURN_LU) { + _framePosOffsets = (Common::Point **)calloc(dynCount + 2, sizeof(Common::Point *)); + + for (int i = 0; i < dynCount + 2; i++) + _framePosOffsets[i] = new Common::Point(); + + for (int i = 0; i < dynCount; i++) { + DynamicPhase *ph = new DynamicPhase(); + ph->load(file); + + _dynamicPhases.push_back(ph); + + _framePosOffsets[i]->x = ph->_x; + _framePosOffsets[i]->y = ph->_y; + } + + int staticsid = file.readUint16LE(); + + _staticsObj1 = ani->getStaticsById(staticsid); + + if (!_staticsObj1 && (staticsid & 0x4000)) { + Statics *s = ani->getStaticsById(staticsid ^ 0x4000); + _staticsObj1 = ani->addStatics(s); + } + + _mx = file.readUint32LE(); + _my = file.readUint32LE(); + + staticsid = file.readUint16LE(); + + _staticsObj2 = ani->getStaticsById(staticsid); + + if (!_staticsObj2 && (staticsid & 0x4000)) { + Statics *s = ani->getStaticsById(staticsid ^ 0x4000); + _staticsObj2 = ani->addStatics(s); + } + + _m2x = file.readUint32LE(); + _m2y = file.readUint32LE(); + + if (_staticsObj2) { + _dynamicPhases.push_back(_staticsObj2); + + _framePosOffsets[_dynamicPhases.size() - 1]->x = _m2x; + _framePosOffsets[_dynamicPhases.size() - 1]->y = _m2y; + } + + } else { + int movid = file.readUint16LE(); + + _currMovementObj = ani->getMovementById(movid); + _staticsObj1 = 0; + _staticsObj2 = 0; + + initStatics(ani); + } + + if (_staticsObj1 && _staticsObj2) { + if ((_staticsObj1->_staticsId ^ _staticsObj2->_staticsId) & 0x4000) + _flipFlag = 1; + } + + if (g_fullpipe->_gameProjectVersion >= 8) + _field_50 = file.readUint32LE(); + + if (g_fullpipe->_gameProjectVersion < 12) + _counterMax = 83; + else + _counterMax = file.readUint32LE(); + + _counter = 0; + updateCurrDynamicPhase(); + return true; } @@ -111,4 +257,72 @@ Common::Point *Movement::getCurrDynamicPhaseXY(Common::Point &p) { return &p; } +void Movement::initStatics(StaticANIObject *ani) { + warning("STUB: Movement::initStatics"); +} + +void Movement::updateCurrDynamicPhase() { + if (_dynamicPhases.size() == 0) + return; + + if (_dynamicPhases[_currDynamicPhaseIndex]) { + _currDynamicPhase = (DynamicPhase *)_dynamicPhases[_currDynamicPhaseIndex]; + } +} + +DynamicPhase::DynamicPhase() { + _someX = 0; + _rect = 0; + _field_7C = 0; + _flags = 0; + _someY = 0; +} + +bool DynamicPhase::load(MfcArchive &file) { + StaticPhase::load(file); + + _field_7C = file.readUint16LE(); + _rect = new Common::Rect(); + _rect->left = file.readUint32LE(); + _rect->top = file.readUint32LE(); + _rect->right = file.readUint32LE(); + _rect->bottom = file.readUint32LE(); + + assert (g_fullpipe->_gameProjectVersion >= 1); + + _someX = file.readUint32LE(); + _someY = file.readUint32LE(); + + assert (g_fullpipe->_gameProjectVersion >= 12); + + _flags = file.readUint32LE(); + + return true; +} + +StaticPhase::StaticPhase() { + _field_6A = 1; + _initialCountdown = 0; + _countdown = 0; + _field_68 = 0; + _exCommand = 0; +} + +bool StaticPhase::load(MfcArchive &file) { + Picture::load(file); + + _initialCountdown = file.readUint16LE(); + _field_6A = file.readUint16LE(); + + if (g_fullpipe->_gameProjectVersion >= 12) { + _exCommand = (ExCommand *)file.readClass(); + + return true; + } + + assert (g_fullpipe->_gameProjectVersion >= 12); + + return true; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 82c24eb095..7c52e18d33 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -38,25 +38,41 @@ class StaticPhase : public Picture { int16 _countdown; int16 _field_68; int16 _field_6A; - int _exCommand; + ExCommand *_exCommand; + + public: + StaticPhase(); + virtual bool load(MfcArchive &file); }; class DynamicPhase : public StaticPhase { friend class Movement; - int _x; - int _y; - Common::Rect *_rectPtr; + int _someX; + int _someY; + Common::Rect *_rect; int16 _field_7C; int16 _field_7E; int _flags; + + public: + DynamicPhase(); + virtual bool load(MfcArchive &file); }; class Statics : public DynamicPhase { + friend class StaticANIObject; + friend class Movement; + int16 _staticsId; int16 _field_86; char *_stringObj; - int _picture; + Picture *_picture; + + public: + Statics(); + virtual bool load(MfcArchive &file); + Statics *getStaticsById(int itemId); }; class StaticANIObject; @@ -78,8 +94,8 @@ class Movement : public GameObject { int _counter; CPtrList _dynamicPhases; int _field_78; - Common::Point *_framePosOffsets; - int _currMovementObj; + Common::Point **_framePosOffsets; + Movement *_currMovementObj; int _field_84; DynamicPhase *_currDynamicPhase; int _field_8C; @@ -92,6 +108,9 @@ class Movement : public GameObject { bool load(MfcArchive &file, StaticANIObject *ani); Common::Point *getCurrDynamicPhaseXY(Common::Point &p); + + void initStatics(StaticANIObject *ani); + void updateCurrDynamicPhase(); }; class StaticANIObject : public GameObject { @@ -120,7 +139,12 @@ class StaticANIObject : public GameObject { public: StaticANIObject(); virtual bool load(MfcArchive &file); + void setOXY(int x, int y); + Statics *getStaticsById(int id); + Movement *getMovementById(int id); + + Statics *addStatics(Statics *ani); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 0462c4ec3e..5b6c972a0a 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -358,6 +358,8 @@ char *genFileName(int superId, int sceneId, const char *ext) { snprintf(s, 255, "%04d.%s", sceneId, ext); } + debug(7, "genFileName: %s", s); + return s; } -- cgit v1.2.3 From 68c5cfdf2c35d82b506dd4fc0c4335608a22a404 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 23 Jun 2013 23:32:51 -0400 Subject: FULLPIPE: Continued Scene loading --- engines/fullpipe/gfx.cpp | 2 ++ engines/fullpipe/gfx.h | 3 ++- engines/fullpipe/scene.cpp | 54 ++++++++++++++++++++++++++++++++++++++++++---- engines/fullpipe/scene.h | 6 +++--- engines/fullpipe/utils.cpp | 1 - 5 files changed, 57 insertions(+), 9 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 8b801a7031..0305a004b8 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -33,6 +33,8 @@ Background::Background() { _bigPictureArray1Count = 0; _bigPictureArray2Count = 0; _bigPictureArray = 0; + _stringObj = 0; + _colorMemoryObj = 0; } bool Background::load(MfcArchive &file) { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 7b304eab22..53c10ee870 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -89,12 +89,13 @@ class PictureObject : public GameObject { }; class Background : public CObject { + protected: CPtrList _list; char *_stringObj; int _x; int _y; int16 _messageQueueId; - int _colorMemoryObj; + MemoryObject *_colorMemoryObj; int _bigPictureArray1Count; int _bigPictureArray2Count; BigPicture ***_bigPictureArray; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 238d6050aa..af031db735 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -113,14 +113,15 @@ Scene::Scene() { } bool Scene::load(MfcArchive &file) { - _bg.load(file); + Background::load(file); _sceneId = file.readUint16LE(); - _stringObj = file.readPascalString(); - debug(0, "scene: <%s>", _stringObj); + _scstringObj = file.readPascalString(); + debug(0, "scene: <%s>", _scstringObj); int count = file.readUint16LE(); + debug(7, "scene.ani: %d", count); for (int i = 0; i < count; i++) { int aniNum = file.readUint16LE(); @@ -141,7 +142,52 @@ bool Scene::load(MfcArchive &file) { free(aniname); } - warning("STUB: Scene::load"); + count = file.readUint16LE(); + debug(7, "scene.mq: %d", count); + + for (int i = 0; i < count; i++) { + int qNum = file.readUint16LE(); + char *qname = genFileName(0, qNum, "qu"); + + Common::SeekableReadStream *f = g_fullpipe->_currArchive->createReadStreamForMember(qname); + MfcArchive archive(f); + + MessageQueue *mq = new MessageQueue(); + + mq->load(archive); + + _messageQueueList.push_back(mq); + + delete f; + free(qname); + } + + count = file.readUint16LE(); + debug(7, "scene.fa: %d", count); + + for (int i = 0; i < count; i++) { + // There are no .FA files + assert(0); + } + + _libHandle = g_fullpipe->_currArchive; + + if (_list.size() > 0 && _stringObj && strlen(_stringObj) > 1) { + char fname[260]; + + strcpy(fname, _stringObj); + strcpy(strrchr(fname, '.') + 1, "col"); + + MemoryObject *col = new MemoryObject(); + col->loadFile(fname); + + _colorMemoryObj = col; + + } + + char *shdname = genFileName(0, _sceneId, "shd"); + + warning("STUB: Scene::load (%d bytes left)", file.size() - file.pos()); return true; } diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 1c7a9fda04..31af782a44 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -25,7 +25,7 @@ namespace Fullpipe { -class Scene : public CObject { +class Scene : public Background { Background _bg; CPtrList _staticANIObjectList1; CPtrList _staticANIObjectList2; @@ -34,9 +34,9 @@ class Scene : public CObject { Shadows *_shadows; int _soundList; int16 _sceneId; - char *_stringObj; + char *_scstringObj; int _field_BC; - int _libHandle; + NGIArchive *_libHandle; public: Scene(); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 5b6c972a0a..ff3cd71d42 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -136,7 +136,6 @@ void MemoryObject::loadFile(char *filename) { Common::SeekableReadStream *s = _libHandle->createReadStreamForMember(filename); if (s) { - debug(0, "Reading %s", filename); assert(s->size() > 0); _data = calloc(s->size(), 1); s->read(_data, s->size()); -- cgit v1.2.3 From 00971bf2092c5e9c33d5475bb91075d2bcc32557 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 24 Jun 2013 08:28:07 -0400 Subject: FULLPIPE: Shadows loading --- engines/fullpipe/gfx.cpp | 15 +++++++++++++++ engines/fullpipe/gfx.h | 20 +++++++++++--------- engines/fullpipe/scene.cpp | 5 +++++ 3 files changed, 31 insertions(+), 9 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 0305a004b8..79a1e1da70 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -204,4 +204,19 @@ bool BigPicture::load(MfcArchive &file) { return true; } +Shadows::Shadows() { + _staticAniObjectId = 0; + _movementId = 0; + _sceneId = 0; +} + +bool Shadows::load(MfcArchive &file) { + _sceneId = file.readUint32LE(); + _staticAniObjectId = file.readUint32LE(); + _movementId = file.readUint32LE(); + + return true; +} + + } // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 53c10ee870..edf884dbca 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -25,9 +25,8 @@ namespace Fullpipe { -class ShadowsItemArray : public Common::Array, public CObject { - public: - virtual bool load(MfcArchive &file); +class ShadowsItemArray : public CObArray { + // empty }; class Picture : public MemoryObject { @@ -106,12 +105,15 @@ class Background : public CObject { void addPictureObject(PictureObject *pct); }; -class Shadows { - //CObject obj; - int sceneId; - int staticAniObjectId; - int movementId; - ShadowsItemArray items; +class Shadows : public CObject { + int _sceneId; + int _staticAniObjectId; + int _movementId; + ShadowsItemArray _items; + + public: + Shadows(); + virtual bool load(MfcArchive &file); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index af031db735..0a79ef5f0f 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -187,6 +187,11 @@ bool Scene::load(MfcArchive &file) { char *shdname = genFileName(0, _sceneId, "shd"); + Shadows *shd = new Shadows(); + + if (shd->loadFile(shdname)) + _shadows = shd; + warning("STUB: Scene::load (%d bytes left)", file.size() - file.pos()); return true; -- cgit v1.2.3 From 5f7cf0131c95c165db8ce5b1933917e4da037845 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 24 Jun 2013 16:22:26 -0400 Subject: FULLPIPE: Started sound loading --- engines/fullpipe/fullpipe.cpp | 8 ++++++++ engines/fullpipe/fullpipe.h | 2 ++ engines/fullpipe/module.mk | 1 + engines/fullpipe/objects.h | 1 + engines/fullpipe/scene.cpp | 26 ++++++++++++++++++++++++++ engines/fullpipe/scene.h | 3 ++- 6 files changed, 40 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index c43e14beb6..a6a52bbccb 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -46,6 +46,14 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _rnd = new Common::RandomSource("fullpipe"); + _gameProjectVersion = 0; + _gameProjectValue = 0; + _scrollSpeed = 0; + _currSoundListCount = 0; + + _soundEnabled = true; + _flgSoundList = true; + g_fullpipe = this; } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 013303d71e..d6b38f2d7e 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -81,6 +81,8 @@ public: int _gameProjectValue; int _scrollSpeed; int _currSoundListCount; + bool _soundEnabled; + bool _flgSoundList; void initObjectStates(); void setLevelStates(); diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 77dcfaa2c3..1b115a3463 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -8,6 +8,7 @@ MODULE_OBJS = \ motion.o \ ngiarchive.o \ scene.o \ + sound.o \ stateloader.o \ statics.o \ utils.o diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index c12905ec58..52383cc24c 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -26,6 +26,7 @@ #include "fullpipe/utils.h" #include "fullpipe/inventory.h" #include "fullpipe/gfx.h" +#include "fullpipe/sound.h" #include "fullpipe/scene.h" namespace Fullpipe { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 0a79ef5f0f..3dc98bf7c9 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -192,9 +192,35 @@ bool Scene::load(MfcArchive &file) { if (shd->loadFile(shdname)) _shadows = shd; + free(shdname); + + char *slsname = genFileName(0, _sceneId, "sls"); + + if (g_fullpipe->_soundEnabled) { + _soundList = new SoundList(); + + if (g_fullpipe->_flgSoundList) { + char *nlname = genFileName(17, _sceneId, "nl"); + + _soundList->loadFile(slsname, nlname); + + free(nlname); + } else { + _soundList->loadFile(slsname, 0); + } + } + + free(slsname); + + initStaticANIObjects(); + warning("STUB: Scene::load (%d bytes left)", file.size() - file.pos()); return true; } +void Scene::initStaticANIObjects() { + warning("STUB: Scene::initStaticANIObjects"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 31af782a44..a797c69e02 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -32,7 +32,7 @@ class Scene : public Background { CPtrList _messageQueueList; CPtrList _faObjectList; Shadows *_shadows; - int _soundList; + SoundList *_soundList; int16 _sceneId; char *_scstringObj; int _field_BC; @@ -41,6 +41,7 @@ class Scene : public Background { public: Scene(); virtual bool load(MfcArchive &file); + void initStaticANIObjects(); }; class SceneTag : public CObject { -- cgit v1.2.3 From 679c46a5bff2234b234190ecb6ed34c483c74420 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 25 Jun 2013 16:50:27 -0400 Subject: FULLPIPE: Finished sound loading --- engines/fullpipe/sound.cpp | 100 +++++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/sound.h | 55 +++++++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 engines/fullpipe/sound.cpp create mode 100644 engines/fullpipe/sound.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp new file mode 100644 index 0000000000..bdbc8da762 --- /dev/null +++ b/engines/fullpipe/sound.cpp @@ -0,0 +1,100 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" +#include "fullpipe/ngiarchive.h" + +namespace Fullpipe { + +SoundList::SoundList() { + _soundItems = 0; + _soundItemsCount = 0; + _libHandle = 0; +} + +bool SoundList::load(MfcArchive &file, char *fname) { + _soundItemsCount = file.readUint32LE(); + _soundItems = (Sound **)calloc(_soundItemsCount, sizeof(Sound *)); + + if (fname) { + _libHandle = (NGIArchive *)makeNGIArchive(fname); + } else { + _libHandle = 0; + } + + for (int i = 0; i < _soundItemsCount; i++) { + Sound *snd = new Sound(); + + _soundItems[i] = 0; + snd->load(file, _libHandle); + } + + return true; + +} + +bool SoundList::loadFile(const char *fname, char *libname) { + Common::File file; + + if (!file.open(fname)) + return false; + + MfcArchive archive(&file); + + return load(archive, libname); +} + +Sound::Sound() { + _id = 0; + _directSoundBuffer = 0; + _soundData = 0; + _objectId = 0; + memset(_directSoundBuffers, 0, sizeof(_directSoundBuffers)); +} + + +bool Sound::load(MfcArchive &file, NGIArchive *archive) { + MemoryObject::load(file); + + _id = file.readUint32LE(); + _description = file.readPascalString(); + + assert(g_fullpipe->_gameProjectVersion >= 6); + + _objectId = file.readUint16LE(); + + if (archive && archive->hasFile(_filename)) { + Common::SeekableReadStream *s = archive->createReadStreamForMember(_filename); + + _soundData = (byte *)calloc(s->size(), 1); + + s->read(_soundData, s->size()); + + delete s; + } + + return true; +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h new file mode 100644 index 0000000000..4585aa79f7 --- /dev/null +++ b/engines/fullpipe/sound.h @@ -0,0 +1,55 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_SOUND_H +#define FULLPIPE_SOUND_H + +namespace Fullpipe { + +class Sound : public MemoryObject { + int _id; + char *_description; + int16 _objectId; + int16 _field_32; + int _directSoundBuffer; + int _directSoundBuffers[7]; + byte *_soundData; + + public: + Sound(); + bool load(MfcArchive &file, NGIArchive *archive); +}; + +class SoundList : public CObject { + Sound **_soundItems; + int _soundItemsCount; + NGIArchive *_libHandle; + + public: + SoundList(); + bool load(MfcArchive &file, char *fname); + bool loadFile(const char *fname, char *libname); +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_SOUND_H */ -- cgit v1.2.3 From 8b50154626212d5f857701b01511ef942766d007 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 26 Jun 2013 15:39:46 -0400 Subject: FULLPIPE: Fix loading .qu files Checked with all scenes. Everything loads fine. --- engines/fullpipe/scene.cpp | 2 ++ engines/fullpipe/stateloader.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 3dc98bf7c9..3a9b96cdfc 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -152,6 +152,8 @@ bool Scene::load(MfcArchive &file) { Common::SeekableReadStream *f = g_fullpipe->_currArchive->createReadStreamForMember(qname); MfcArchive archive(f); + archive.readUint16LE(); // Skip 2 bytes + MessageQueue *mq = new MessageQueue(); mq->load(archive); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index d7cc9cf00c..eab8bef21d 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -227,6 +227,8 @@ bool MessageQueue::load(MfcArchive &file) { int count = file.readUint16LE(); + assert(g_fullpipe->_gameProjectVersion >= 12); + _stringObj = file.readPascalString(); for (int i = 0; i < count; i++) { -- cgit v1.2.3 From 88b3e2744038f23d3f7d3944f4a1ead6fba69763 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 26 Jun 2013 19:45:23 -0400 Subject: FULLPIPE: Load all scenes for debugging purposes --- engines/fullpipe/stateloader.cpp | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index eab8bef21d..3c5a442496 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -43,6 +43,62 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory = &_gameLoader->_inventory; _inventory->setItemFlags(ANI_INV_MAP, 0x10003); _inventory->addItem(ANI_INV_MAP, 1); + +#if 1 + g_fullpipe->accessScene(301); + g_fullpipe->accessScene(302); + g_fullpipe->accessScene(303); + g_fullpipe->accessScene(304); + g_fullpipe->accessScene(305); + g_fullpipe->accessScene(321); + g_fullpipe->accessScene(635); + g_fullpipe->accessScene(649); + g_fullpipe->accessScene(650); + g_fullpipe->accessScene(651); + g_fullpipe->accessScene(652); + g_fullpipe->accessScene(653); + g_fullpipe->accessScene(654); + g_fullpipe->accessScene(655); + g_fullpipe->accessScene(726); + g_fullpipe->accessScene(858); + g_fullpipe->accessScene(903); + g_fullpipe->accessScene(1137); + g_fullpipe->accessScene(1138); + g_fullpipe->accessScene(1139); + g_fullpipe->accessScene(1140); + g_fullpipe->accessScene(1141); + g_fullpipe->accessScene(1142); + g_fullpipe->accessScene(1143); + g_fullpipe->accessScene(1144); + g_fullpipe->accessScene(1546); + g_fullpipe->accessScene(1547); + g_fullpipe->accessScene(1548); + g_fullpipe->accessScene(1549); + g_fullpipe->accessScene(1550); + g_fullpipe->accessScene(1551); + g_fullpipe->accessScene(1552); + g_fullpipe->accessScene(2062); + g_fullpipe->accessScene(2063); + g_fullpipe->accessScene(2064); + g_fullpipe->accessScene(2065); + g_fullpipe->accessScene(2066); + g_fullpipe->accessScene(2067); + g_fullpipe->accessScene(2068); + g_fullpipe->accessScene(2069); + g_fullpipe->accessScene(2070); + g_fullpipe->accessScene(2071); + g_fullpipe->accessScene(2072); + g_fullpipe->accessScene(2460); + g_fullpipe->accessScene(3896); + g_fullpipe->accessScene(3907); + g_fullpipe->accessScene(4620); + g_fullpipe->accessScene(4999); + g_fullpipe->accessScene(5000); + g_fullpipe->accessScene(5001); + g_fullpipe->accessScene(5166); + g_fullpipe->accessScene(5222); +#endif + _inventory->rebuildItemRects(); // TODO } else -- cgit v1.2.3 From 305692fefe567228441e6edea5225d0b4853a9f8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 26 Jun 2013 19:46:11 -0400 Subject: FULLPIPE: Fix MemoryObject loading --- engines/fullpipe/utils.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index ff3cd71d42..14388f7db3 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -129,14 +129,12 @@ bool MemoryObject::load(MfcArchive &file) { void MemoryObject::loadFile(char *filename) { if (!_data) { - if (g_fullpipe->_currArchive != _libHandle) { - assert(0); - } - - Common::SeekableReadStream *s = _libHandle->createReadStreamForMember(filename); + Common::SeekableReadStream *s = g_fullpipe->_currArchive->createReadStreamForMember(filename); if (s) { assert(s->size() > 0); + + debug(0, "Loading %s", filename); _data = calloc(s->size(), 1); s->read(_data, s->size()); -- cgit v1.2.3 From ee5dc16eaa138bfeca7f914b4314ef03bcfd7352 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 26 Jun 2013 19:46:47 -0400 Subject: FULLPIPE: Implement Background::addPictureObject --- engines/fullpipe/fullpipe.cpp | 2 ++ engines/fullpipe/gfx.cpp | 20 +++++++++++++++++++- engines/fullpipe/gfx.h | 3 ++- engines/fullpipe/scene.cpp | 2 +- 4 files changed, 24 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index a6a52bbccb..9db96ae01d 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -51,6 +51,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _scrollSpeed = 0; _currSoundListCount = 0; + _currArchive = 0; + _soundEnabled = true; _flgSoundList = true; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 79a1e1da70..531bfd92bf 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -74,7 +74,25 @@ bool Background::load(MfcArchive &file) { } void Background::addPictureObject(PictureObject *pct) { - warning("STUB: Background::addPictureObject"); + if (pct->_field_4) + renumPictures(pct); + + bool inserted = false; + for (uint i = 0; i < _picObjList.size(); i++) { + if (((PictureObject *)_picObjList[i])->_priority == pct->_priority) { + _picObjList.insert_at(i, pct); + inserted = true; + break; + } + } + + if (!inserted) { + _picObjList.push_back(pct); + } +} + +void Background::renumPictures(PictureObject *pct) { + warning("STUB: Background::renumPictures"); } PictureObject::PictureObject() { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index edf884dbca..b8f6194848 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -89,7 +89,7 @@ class PictureObject : public GameObject { class Background : public CObject { protected: - CPtrList _list; + CPtrList _picObjList; char *_stringObj; int _x; int _y; @@ -103,6 +103,7 @@ class Background : public CObject { Background(); virtual bool load(MfcArchive &file); void addPictureObject(PictureObject *pct); + void renumPictures(PictureObject *pct); }; class Shadows : public CObject { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 3a9b96cdfc..ee7a4dd570 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -174,7 +174,7 @@ bool Scene::load(MfcArchive &file) { _libHandle = g_fullpipe->_currArchive; - if (_list.size() > 0 && _stringObj && strlen(_stringObj) > 1) { + if (_picObjList.size() > 0 && _stringObj && strlen(_stringObj) > 1) { char fname[260]; strcpy(fname, _stringObj); -- cgit v1.2.3 From d4e572843df01ce2307ca696ebc1db2775701205 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 26 Jun 2013 20:46:14 -0400 Subject: FULLPIPE: Transcode Cyrillic into UTF-8 for debugging convenience --- engines/fullpipe/scene.cpp | 2 +- engines/fullpipe/stateloader.cpp | 2 +- engines/fullpipe/utils.cpp | 48 +++++++++++++++++++++++++++++++++++++++- engines/fullpipe/utils.h | 1 + 4 files changed, 50 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index ee7a4dd570..fb51b3b121 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -118,7 +118,7 @@ bool Scene::load(MfcArchive &file) { _sceneId = file.readUint16LE(); _scstringObj = file.readPascalString(); - debug(0, "scene: <%s>", _scstringObj); + debug(0, "scene: <%s>", transCyrillic((byte *)_scstringObj)); int count = file.readUint16LE(); debug(7, "scene.ani: %d", count); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 3c5a442496..1f9b090d01 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -401,7 +401,7 @@ bool CGameVar::load(MfcArchive &file) { for (int i = 0; i < file.getLevel(); i++) debugN(6, " "); - debugN(6, "<%s>: ", _stringObj); + debugN(6, "<%s>: ", transCyrillic((byte *)_stringObj)); switch (_varType) { case 0: diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 14388f7db3..0b75ab5ede 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -99,7 +99,7 @@ char *MfcArchive::readPascalString(bool twoByte) { tmp = (char *)calloc(len + 1, 1); read(tmp, len); - debug(9, "readPascalString: %d <%s>", len, tmp); + debug(9, "readPascalString: %d <%s>", len, transCyrillic((byte *)tmp)); return tmp; } @@ -360,4 +360,50 @@ char *genFileName(int superId, int sceneId, const char *ext) { return s; } +// Translates cp-1251..utf-8 +byte *transCyrillic(byte *s) { + static byte tmp[1024]; + + static int trans[] = { 0xa8, 0xd081, 0xb8, 0xd191, 0xc0, 0xd090, + 0xc1, 0xd091, 0xc2, 0xd092, 0xc3, 0xd093, 0xc4, 0xd094, + 0xc5, 0xd095, 0xc6, 0xd096, 0xc7, 0xd097, 0xc8, 0xd098, + 0xc9, 0xd099, 0xca, 0xd09a, 0xcb, 0xd09b, 0xcc, 0xd09c, + 0xcd, 0xd09d, 0xce, 0xd09e, 0xcf, 0xd09f, 0xd0, 0xd0a0, + 0xd1, 0xd0a1, 0xd2, 0xd0a2, 0xd3, 0xd0a3, 0xd4, 0xd0a4, + 0xd5, 0xd0a5, 0xd6, 0xd0a6, 0xd7, 0xd0a7, 0xd8, 0xd0a8, + 0xd9, 0xd0a9, 0xda, 0xd0aa, 0xdb, 0xd0ab, 0xdc, 0xd0ac, + 0xdd, 0xd0ad, 0xde, 0xd0ae, 0xdf, 0xd0af, 0xe0, 0xd0b0, + 0xe1, 0xd0b1, 0xe2, 0xd0b2, 0xe3, 0xd0b3, 0xe4, 0xd0b4, + 0xe5, 0xd0b5, 0xe6, 0xd0b6, 0xe7, 0xd0b7, 0xe8, 0xd0b8, + 0xe9, 0xd0b9, 0xea, 0xd0ba, 0xeb, 0xd0bb, 0xec, 0xd0bc, + 0xed, 0xd0bd, 0xee, 0xd0be, 0xef, 0xd0bf, 0xf0, 0xd180, + 0xf1, 0xd181, 0xf2, 0xd182, 0xf3, 0xd183, 0xf4, 0xd184, + 0xf5, 0xd185, 0xf6, 0xd186, 0xf7, 0xd187, 0xf8, 0xd188, + 0xf9, 0xd189, 0xfa, 0xd18a, 0xfb, 0xd18b, 0xfc, 0xd18c, + 0xfd, 0xd18d, 0xfe, 0xd18e, 0xff, 0xd18f }; + + int i = 0; + + for (byte *p = s; *p; p++) { + if (*p < 128) { + tmp[i++] = *p; + } else { + int j; + for (j = 0; trans[j]; j += 2) { + if (trans[j] == *p) { + tmp[i++] = (trans[j + 1] >> 8) & 0xff; + tmp[i++] = trans[j + 1] & 0xff; + break; + } + } + + assert(trans[j]); + } + } + + tmp[i] = 0; + + return tmp; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 94fdf4b5ca..4588541bc1 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -127,6 +127,7 @@ struct CNode { typedef Common::Array CPtrList; char *genFileName(int superId, int sceneId, const char *ext); +byte *transCyrillic(byte *s); } // End of namespace Fullpipe -- cgit v1.2.3 From cb38892ce8dbb3841b5731554e63214803109b08 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 13 Jul 2013 11:51:36 +0300 Subject: FULLPIPE: Continued on scene loading --- engines/fullpipe/gfx.cpp | 16 +++++++++++++++- engines/fullpipe/objects.h | 5 +++++ engines/fullpipe/scene.cpp | 4 ++++ engines/fullpipe/scene.h | 1 + engines/fullpipe/stateloader.cpp | 36 +++++++++++++++++++++++++++++++++++- 5 files changed, 60 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 531bfd92bf..74037da238 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -92,7 +92,21 @@ void Background::addPictureObject(PictureObject *pct) { } void Background::renumPictures(PictureObject *pct) { - warning("STUB: Background::renumPictures"); + int *buf = (int *)calloc(_picObjList.size() + 2, sizeof(int)); + + for (uint i = 0; i < _picObjList.size(); i++) { + if (pct->_id == ((PictureObject *)_picObjList[i])->_id) + buf[((PictureObject *)_picObjList[i])->_field_4] = 1; + } + + if (buf[pct->_field_4]) { + uint count; + for (count = 1; buf[count] && count < _picObjList.size() + 2; count++) + ; + pct->_field_4 = count; + } + + free(buf); } PictureObject::PictureObject() { diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 52383cc24c..0258ed4552 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -153,6 +153,7 @@ struct EntranceInfo { class CMotionController; class Sc2 : public CObject { + public: int16 _sceneId; int16 _field_2; Scene *_scene; @@ -254,6 +255,10 @@ class CGameLoader : public CObject { virtual ~CGameLoader(); virtual bool load(MfcArchive &file); + bool loadScene(int num); + + int getSceneTagBySceneId(int num, SceneTag **st); + void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount); CGameVar *_gameVar; CInventory2 _inventory; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index fb51b3b121..7a5d663bc3 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -225,4 +225,8 @@ void Scene::initStaticANIObjects() { warning("STUB: Scene::initStaticANIObjects"); } +void Scene::init() { + warning("STUB: Scene::init()"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index a797c69e02..e2bda176cf 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -42,6 +42,7 @@ class Scene : public Background { Scene(); virtual bool load(MfcArchive &file); void initStaticANIObjects(); + void init(); }; class SceneTag : public CObject { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 1f9b090d01..17faba41d5 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -100,7 +100,8 @@ bool FullpipeEngine::loadGam(const char *fname) { #endif _inventory->rebuildItemRects(); - // TODO + + warning("STUB: loadGam()"); } else return false; @@ -185,6 +186,39 @@ bool CGameLoader::load(MfcArchive &file) { return true; } +bool CGameLoader::loadScene(int num) { + SceneTag *st; + + int idx = getSceneTagBySceneId(num, &st); + + if (st->_scene) + st->loadScene(); + + if (st->_scene) { + st->_scene->init(); + + applyPicAniInfos(st->_scene, _sc2array[idx]._defPicAniInfos, _sc2array[idx]._defPicAniInfosCount); + applyPicAniInfos(st->_scene, _sc2array[idx]._picAniInfos, _sc2array[idx]._picAniInfosCount); + + _sc2array[idx]._scene = st->_scene; + _sc2array[idx]._isLoaded = 1; + + return true; + } + + return false; +} + +int CGameLoader::getSceneTagBySceneId(int num, SceneTag **st) { + warning("STUB: CGameLoader::getSceneTagBySceneId()"); + + return 0; +} + +void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) { + warning("STUB: CGameLoader::applyPicAniInfo()"); +} + GameProject::GameProject() { _field_4 = 0; _headerFilename = 0; -- cgit v1.2.3 From 69946ce96355e5e07ad7a21ab3eb2f2831dfc002 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 6 Jul 2013 22:45:11 +0300 Subject: FULLPIPE: Continued scene loading --- engines/fullpipe/gfx.h | 4 +++- engines/fullpipe/inventory.cpp | 2 +- engines/fullpipe/inventory.h | 5 ++++- engines/fullpipe/stateloader.cpp | 5 ++++- 4 files changed, 12 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index b8f6194848..6e1a3a1494 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -88,8 +88,10 @@ class PictureObject : public GameObject { }; class Background : public CObject { - protected: + public: CPtrList _picObjList; + + protected: char *_stringObj; int _x; int _y; diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 877f260e57..47f3b0d4be 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -72,7 +72,7 @@ bool CInventory::setItemFlags(int itemId, int flags) { CInventory2::CInventory2() { _selectedId = -1; _field_48 = -1; - _sceneObj = 0; + _scene = 0; _picture = 0; _isInventoryOut = 0; _isLocked = 0; diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index fadadd56b2..93f4755e79 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -88,7 +88,7 @@ class CInventory2 : public CInventory { int _isInventoryOut; int _isLocked; int _topOffset; - Scene *_sceneObj; + Scene *_scene; BigPicture *_picture; public: @@ -96,6 +96,9 @@ class CInventory2 : public CInventory { bool loadPartial(MfcArchive &file); void addItem(int itemId, int value); void rebuildItemRects(); + + Scene *getScene() { return _scene; } + }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 17faba41d5..57e3921ba5 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -44,7 +44,7 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->setItemFlags(ANI_INV_MAP, 0x10003); _inventory->addItem(ANI_INV_MAP, 1); -#if 1 +#if 0 g_fullpipe->accessScene(301); g_fullpipe->accessScene(302); g_fullpipe->accessScene(303); @@ -100,6 +100,9 @@ bool FullpipeEngine::loadGam(const char *fname) { #endif _inventory->rebuildItemRects(); + + for (CPtrList::iterator s = _inventory->getScene()->_picObjList.begin(); s != _inventory->getScene()->_picObjList.end(); ++s) { + } warning("STUB: loadGam()"); } else -- cgit v1.2.3 From c2103bb9cd4b8b2958ea99c7797df2cd4f0905d5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 6 Jul 2013 22:56:11 +0300 Subject: FULLPIPE: Fix indentation --- engines/fullpipe/fullpipe.cpp | 250 +++++++++++++++++++-------------------- engines/fullpipe/gfx.cpp | 10 +- engines/fullpipe/motion.cpp | 198 +++++++++++++++---------------- engines/fullpipe/scene.cpp | 5 +- engines/fullpipe/stateloader.cpp | 184 ++++++++++++++-------------- engines/fullpipe/statics.cpp | 4 +- engines/fullpipe/utils.cpp | 32 ++--- 7 files changed, 341 insertions(+), 342 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 9db96ae01d..23a93cf3f9 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -97,150 +97,150 @@ void FullpipeEngine::updateEvents() { } void FullpipeEngine::initObjectStates() { - setLevelStates(); - - setObjectState(sO_Dude, getObjectEnumState(sO_Dude, sO_NotCarryingEgg)); - setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_NotCrackedEggs)); - setObjectState(sO_GuvTheDrawer, getObjectEnumState(sO_GuvTheDrawer, sO_Awaken)); - setObjectState(sO_EggGulper, getObjectEnumState(sO_EggGulper, sO_First)); - setObjectState(sO_EggGulperGaveCoin, getObjectEnumState(sO_EggGulperGaveCoin, sO_No)); - setObjectState(sO_Jar_4, getObjectEnumState(sO_Jar_4, sO_OnTheSpring)); - setObjectState(sO_GulpedEggs, getObjectEnumState(sO_GulpedEgg, sO_NotPresent)); - - setSwallowedEggsState(); - - setObjectState(sO_WeirdWacko, getObjectEnumState(sO_WeirdWacko, sO_InGlasses)); - setObjectState(sO_TumyTrampie, getObjectEnumState(sO_TumyTrampie, sO_Drinking)); - setObjectState(sO_StairsUp_8, getObjectEnumState(sO_StairsUp_8, sO_NotBroken)); - setObjectState(sO_HareTheNooksiter, getObjectEnumState(sO_HareTheNooksiter, sO_WithHandle)); - setObjectState(sO_Elephantine, getObjectEnumState(sO_Elephantine, sO_WithBoot)); - setObjectState(sO_Fly_12, 0); - setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_NotAvailable)); - setObjectState(sO_ClockHandle, getObjectEnumState(sO_ClockHandle, sO_In_7)); - setObjectState(sO_BigMumsy, getObjectEnumState(sO_BigMumsy, sO_Sleeping)); - setObjectState(sO_CoinSlot_1, getObjectEnumState(sO_CoinSlot_1, sO_Empty)); - setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple)); - setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked)); - setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_ClosedShe)); - setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug)); - setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum)); - setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_Swinging)); - setObjectState(sO_DudeJumped, getObjectEnumState(sO_DudeJumped, sO_No)); - setObjectState(sO_Bridge, getObjectEnumState(sO_Bridge, sO_Convoluted)); - setObjectState(sO_Guardian, getObjectEnumState(sO_Guardian, sO_OnRight)); - setObjectState(sO_Grandma, getObjectEnumState(sO_Grandma, sO_In_14)); - setObjectState(sO_Boot_15, getObjectEnumState(sO_Boot_15, sO_NotPresent)); - setObjectState(sO_LeftPipe_15, getObjectEnumState(sO_LeftPipe_15, sO_OpenedShe)); - setObjectState(sO_Pedestal_16, getObjectEnumState(sO_Pedestal_16, sO_IsFree)); - setObjectState(sO_Cup, getObjectEnumState(sO_Cup, sO_InSmokeRoom)); - setObjectState(sO_Pedestal_17, getObjectEnumState(sO_Pedestal_17, sO_IsFree)); - setObjectState(sO_UsherHand, getObjectEnumState(sO_UsherHand, sO_WithoutCoin)); - setObjectState(sO_RightPipe_17, getObjectEnumState(sO_RightPipe_17, sO_ClosedShe)); - setObjectState(sO_Fly_17, 1); - setObjectState(sO_DudeSwinged, 0); - setObjectState(sO_Girl, getObjectEnumState(sO_Girl, sO_Swinging)); - setObjectState(sO_Sugar, getObjectEnumState(sO_Sugar, sO_Present)); - setObjectState(sO_Janitors, getObjectEnumState(sO_Janitors, sO_Together)); - setObjectState(sO_Bag_22, getObjectEnumState(sO_Bag_22, sO_NotFallen)); - setObjectState(sO_Grandpa, getObjectEnumState(sO_Grandpa, sO_InSock)); - setObjectState(sO_CoinSlot_22, getObjectEnumState(sO_CoinSlot_22, sO_Empty)); - setObjectState(sO_UpperHatch_23, getObjectEnumState(sO_UpperHatch_23, sO_Closed)); - setObjectState(sO_LowerHatch_23, getObjectEnumState(sO_LowerHatch_23, sO_Closed)); - setObjectState(sO_Lever_23, getObjectEnumState(sO_Lever_23, sO_NotTaken)); - setObjectState(sO_LeverHandle_23, getObjectEnumState(sO_LeverHandle_23, sO_WithoutStool)); - setObjectState(sO_LowerPipe_21, getObjectEnumState(sO_LowerPipe_21, sO_ClosedShe)); - setObjectState(sO_StarsDown_24, getObjectEnumState(sO_StarsDown_24, sO_OpenedShe)); - setObjectState(sO_Hatch_26, getObjectEnumState(sO_Hatch_26, sO_Closed)); - setObjectState(sO_Sock_26, getObjectEnumState(sO_Sock_26, sO_NotHanging)); - setObjectState(sO_LeftPipe_26, getObjectEnumState(sO_LeftPipe_26, sO_ClosedShe)); - setObjectState(sO_Valve1_26, getObjectEnumState(sO_Valve1_26, sO_Opened)); - setObjectState(sO_Valve2_26, getObjectEnumState(sO_Valve2_26, sO_Closed)); - setObjectState(sO_Valve3_26, getObjectEnumState(sO_Valve3_26, sO_Closed)); - setObjectState(sO_Valve4_26, getObjectEnumState(sO_Valve4_26, sO_Closed)); - setObjectState(sO_Valve5_26, getObjectEnumState(sO_Valve5_26, sO_Opened)); - setObjectState(sO_Pool, getObjectEnumState(sO_Pool, sO_Overfull)); - setObjectState(sO_Plank_25, getObjectEnumState(sO_Plank_25, sO_NearDudesStairs)); - setObjectState(sO_Driver, getObjectEnumState(sO_Driver, sO_WithSteering)); - setObjectState(sO_Janitress, getObjectEnumState(sO_Janitress, sO_WithMop)); - setObjectState(sO_LeftPipe_29, getObjectEnumState(sO_LeftPipe_29, sO_ClosedShe)); - setObjectState(sO_LeftPipe_30, getObjectEnumState(sO_LeftPipe_30, sO_ClosedShe)); - setObjectState(sO_Leg, getObjectEnumState(sO_Leg, sO_ShowingHeel)); - setObjectState(sO_Tub, getObjectEnumState(sO_Tub, sO_EmptyShe)); - setObjectState(sO_Cactus, getObjectEnumState(sO_Cactus, sO_NotGrown)); - setObjectState(sO_Fireman, getObjectEnumState(sO_Fireman, sO_WithHose)); - setObjectState(sO_Cube, getObjectEnumState(sO_Cube, sO_In_33)); - setObjectState(sO_MommyOfHandle_32, getObjectEnumState(sO_MommyOfHandle_32, sO_WithoutHandle)); - setObjectState(sO_Pedestal_33, getObjectEnumState(sO_Pedestal_33, sO_IsFree)); - setObjectState(sO_Valve_34, getObjectEnumState(sO_Valve_34, sO_WithNothing)); - setObjectState(sO_Stool_34, getObjectEnumState(sO_Stool_34, sO_WithoutDrawer)); - setObjectState(sO_Plank_34, getObjectEnumState(sO_Plank_34, sO_Passive)); - setObjectState(sO_Hatch_34, getObjectEnumState(sO_Hatch_34, sO_Closed)); - setObjectState(sO_Valve_35, getObjectEnumState(sO_Valve_35, sO_TurnedOff)); - setObjectState(sO_Carpet_35, getObjectEnumState(sO_Carpet_35, sO_CannotTake)); - setObjectState(sO_CoinSlot_35, getObjectEnumState(sO_CoinSlot_35, sO_WithCoin)); - setObjectState(sO_BellyInflater, getObjectEnumState(sO_BellyInflater, sO_WithCork)); - setObjectState(sO_Jawcrucnher, getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet)); - setObjectState(sO_Guard_1, getObjectEnumState(sO_Guard_1, sO_On)); - setObjectState(sO_Gurad_2, getObjectEnumState(sO_Gurad_2, sO_On)); - setObjectState(sO_Guard_3, getObjectEnumState(sO_Guard_3, sO_On)); - setObjectState(sO_Bottle_38, getObjectEnumState(sO_Bottle_38, sO_OnTheTable)); - setObjectState(sO_Boss, getObjectEnumState(sO_Boss, sO_WithHammer)); + setLevelStates(); + + setObjectState(sO_Dude, getObjectEnumState(sO_Dude, sO_NotCarryingEgg)); + setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_NotCrackedEggs)); + setObjectState(sO_GuvTheDrawer, getObjectEnumState(sO_GuvTheDrawer, sO_Awaken)); + setObjectState(sO_EggGulper, getObjectEnumState(sO_EggGulper, sO_First)); + setObjectState(sO_EggGulperGaveCoin, getObjectEnumState(sO_EggGulperGaveCoin, sO_No)); + setObjectState(sO_Jar_4, getObjectEnumState(sO_Jar_4, sO_OnTheSpring)); + setObjectState(sO_GulpedEggs, getObjectEnumState(sO_GulpedEgg, sO_NotPresent)); + + setSwallowedEggsState(); + + setObjectState(sO_WeirdWacko, getObjectEnumState(sO_WeirdWacko, sO_InGlasses)); + setObjectState(sO_TumyTrampie, getObjectEnumState(sO_TumyTrampie, sO_Drinking)); + setObjectState(sO_StairsUp_8, getObjectEnumState(sO_StairsUp_8, sO_NotBroken)); + setObjectState(sO_HareTheNooksiter, getObjectEnumState(sO_HareTheNooksiter, sO_WithHandle)); + setObjectState(sO_Elephantine, getObjectEnumState(sO_Elephantine, sO_WithBoot)); + setObjectState(sO_Fly_12, 0); + setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_NotAvailable)); + setObjectState(sO_ClockHandle, getObjectEnumState(sO_ClockHandle, sO_In_7)); + setObjectState(sO_BigMumsy, getObjectEnumState(sO_BigMumsy, sO_Sleeping)); + setObjectState(sO_CoinSlot_1, getObjectEnumState(sO_CoinSlot_1, sO_Empty)); + setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple)); + setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked)); + setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_ClosedShe)); + setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug)); + setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum)); + setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_Swinging)); + setObjectState(sO_DudeJumped, getObjectEnumState(sO_DudeJumped, sO_No)); + setObjectState(sO_Bridge, getObjectEnumState(sO_Bridge, sO_Convoluted)); + setObjectState(sO_Guardian, getObjectEnumState(sO_Guardian, sO_OnRight)); + setObjectState(sO_Grandma, getObjectEnumState(sO_Grandma, sO_In_14)); + setObjectState(sO_Boot_15, getObjectEnumState(sO_Boot_15, sO_NotPresent)); + setObjectState(sO_LeftPipe_15, getObjectEnumState(sO_LeftPipe_15, sO_OpenedShe)); + setObjectState(sO_Pedestal_16, getObjectEnumState(sO_Pedestal_16, sO_IsFree)); + setObjectState(sO_Cup, getObjectEnumState(sO_Cup, sO_InSmokeRoom)); + setObjectState(sO_Pedestal_17, getObjectEnumState(sO_Pedestal_17, sO_IsFree)); + setObjectState(sO_UsherHand, getObjectEnumState(sO_UsherHand, sO_WithoutCoin)); + setObjectState(sO_RightPipe_17, getObjectEnumState(sO_RightPipe_17, sO_ClosedShe)); + setObjectState(sO_Fly_17, 1); + setObjectState(sO_DudeSwinged, 0); + setObjectState(sO_Girl, getObjectEnumState(sO_Girl, sO_Swinging)); + setObjectState(sO_Sugar, getObjectEnumState(sO_Sugar, sO_Present)); + setObjectState(sO_Janitors, getObjectEnumState(sO_Janitors, sO_Together)); + setObjectState(sO_Bag_22, getObjectEnumState(sO_Bag_22, sO_NotFallen)); + setObjectState(sO_Grandpa, getObjectEnumState(sO_Grandpa, sO_InSock)); + setObjectState(sO_CoinSlot_22, getObjectEnumState(sO_CoinSlot_22, sO_Empty)); + setObjectState(sO_UpperHatch_23, getObjectEnumState(sO_UpperHatch_23, sO_Closed)); + setObjectState(sO_LowerHatch_23, getObjectEnumState(sO_LowerHatch_23, sO_Closed)); + setObjectState(sO_Lever_23, getObjectEnumState(sO_Lever_23, sO_NotTaken)); + setObjectState(sO_LeverHandle_23, getObjectEnumState(sO_LeverHandle_23, sO_WithoutStool)); + setObjectState(sO_LowerPipe_21, getObjectEnumState(sO_LowerPipe_21, sO_ClosedShe)); + setObjectState(sO_StarsDown_24, getObjectEnumState(sO_StarsDown_24, sO_OpenedShe)); + setObjectState(sO_Hatch_26, getObjectEnumState(sO_Hatch_26, sO_Closed)); + setObjectState(sO_Sock_26, getObjectEnumState(sO_Sock_26, sO_NotHanging)); + setObjectState(sO_LeftPipe_26, getObjectEnumState(sO_LeftPipe_26, sO_ClosedShe)); + setObjectState(sO_Valve1_26, getObjectEnumState(sO_Valve1_26, sO_Opened)); + setObjectState(sO_Valve2_26, getObjectEnumState(sO_Valve2_26, sO_Closed)); + setObjectState(sO_Valve3_26, getObjectEnumState(sO_Valve3_26, sO_Closed)); + setObjectState(sO_Valve4_26, getObjectEnumState(sO_Valve4_26, sO_Closed)); + setObjectState(sO_Valve5_26, getObjectEnumState(sO_Valve5_26, sO_Opened)); + setObjectState(sO_Pool, getObjectEnumState(sO_Pool, sO_Overfull)); + setObjectState(sO_Plank_25, getObjectEnumState(sO_Plank_25, sO_NearDudesStairs)); + setObjectState(sO_Driver, getObjectEnumState(sO_Driver, sO_WithSteering)); + setObjectState(sO_Janitress, getObjectEnumState(sO_Janitress, sO_WithMop)); + setObjectState(sO_LeftPipe_29, getObjectEnumState(sO_LeftPipe_29, sO_ClosedShe)); + setObjectState(sO_LeftPipe_30, getObjectEnumState(sO_LeftPipe_30, sO_ClosedShe)); + setObjectState(sO_Leg, getObjectEnumState(sO_Leg, sO_ShowingHeel)); + setObjectState(sO_Tub, getObjectEnumState(sO_Tub, sO_EmptyShe)); + setObjectState(sO_Cactus, getObjectEnumState(sO_Cactus, sO_NotGrown)); + setObjectState(sO_Fireman, getObjectEnumState(sO_Fireman, sO_WithHose)); + setObjectState(sO_Cube, getObjectEnumState(sO_Cube, sO_In_33)); + setObjectState(sO_MommyOfHandle_32, getObjectEnumState(sO_MommyOfHandle_32, sO_WithoutHandle)); + setObjectState(sO_Pedestal_33, getObjectEnumState(sO_Pedestal_33, sO_IsFree)); + setObjectState(sO_Valve_34, getObjectEnumState(sO_Valve_34, sO_WithNothing)); + setObjectState(sO_Stool_34, getObjectEnumState(sO_Stool_34, sO_WithoutDrawer)); + setObjectState(sO_Plank_34, getObjectEnumState(sO_Plank_34, sO_Passive)); + setObjectState(sO_Hatch_34, getObjectEnumState(sO_Hatch_34, sO_Closed)); + setObjectState(sO_Valve_35, getObjectEnumState(sO_Valve_35, sO_TurnedOff)); + setObjectState(sO_Carpet_35, getObjectEnumState(sO_Carpet_35, sO_CannotTake)); + setObjectState(sO_CoinSlot_35, getObjectEnumState(sO_CoinSlot_35, sO_WithCoin)); + setObjectState(sO_BellyInflater, getObjectEnumState(sO_BellyInflater, sO_WithCork)); + setObjectState(sO_Jawcrucnher, getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet)); + setObjectState(sO_Guard_1, getObjectEnumState(sO_Guard_1, sO_On)); + setObjectState(sO_Gurad_2, getObjectEnumState(sO_Gurad_2, sO_On)); + setObjectState(sO_Guard_3, getObjectEnumState(sO_Guard_3, sO_On)); + setObjectState(sO_Bottle_38, getObjectEnumState(sO_Bottle_38, sO_OnTheTable)); + setObjectState(sO_Boss, getObjectEnumState(sO_Boss, sO_WithHammer)); } void FullpipeEngine::setLevelStates() { - CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons); - - if (v) { - v->setSubVarAsInt(sO_Level0, 2833); - v->setSubVarAsInt(sO_Level1, 2754); - v->setSubVarAsInt(sO_Level2, 2757); - v->setSubVarAsInt(sO_Level3, 2760); - v->setSubVarAsInt(sO_Level4, 2763); - v->setSubVarAsInt(sO_Level5, 2766); - v->setSubVarAsInt(sO_Level6, 2769); - v->setSubVarAsInt(sO_Level7, 2772); - v->setSubVarAsInt(sO_Level8, 2775); - v->setSubVarAsInt(sO_Level9, 2778); - } + CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons); + + if (v) { + v->setSubVarAsInt(sO_Level0, 2833); + v->setSubVarAsInt(sO_Level1, 2754); + v->setSubVarAsInt(sO_Level2, 2757); + v->setSubVarAsInt(sO_Level3, 2760); + v->setSubVarAsInt(sO_Level4, 2763); + v->setSubVarAsInt(sO_Level5, 2766); + v->setSubVarAsInt(sO_Level6, 2769); + v->setSubVarAsInt(sO_Level7, 2772); + v->setSubVarAsInt(sO_Level8, 2775); + v->setSubVarAsInt(sO_Level9, 2778); + } } void FullpipeEngine::setSwallowedEggsState() { - CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs); + CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs); - _swallowedEgg1 = v->getSubVarByName(sO_Egg1); - _swallowedEgg2 = v->getSubVarByName(sO_Egg2); - _swallowedEgg3 = v->getSubVarByName(sO_Egg3); + _swallowedEgg1 = v->getSubVarByName(sO_Egg1); + _swallowedEgg2 = v->getSubVarByName(sO_Egg2); + _swallowedEgg3 = v->getSubVarByName(sO_Egg3); - _swallowedEgg1->_value.intValue = 0; - _swallowedEgg2->_value.intValue = 0; - _swallowedEgg3->_value.intValue = 0; + _swallowedEgg1->_value.intValue = 0; + _swallowedEgg2->_value.intValue = 0; + _swallowedEgg3->_value.intValue = 0; } int FullpipeEngine::getObjectEnumState(const char *name, const char *state) { - CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); + CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); - if (!var) { - var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0); - } + if (!var) { + var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0); + } - var = var->getSubVarByName(name); - if (var) { - var = var->getSubVarByName("ENUMSTATES"); - if (var) - return var->getSubVarAsInt(state); - } + var = var->getSubVarByName(name); + if (var) { + var = var->getSubVarByName("ENUMSTATES"); + if (var) + return var->getSubVarAsInt(state); + } - return 0; + return 0; } void FullpipeEngine::setObjectState(const char *name, int state) { - CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); + CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); - if (!var) { - var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0); - } + if (!var) { + var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0); + } - var->setSubVarAsInt(name, state); + var->setSubVarAsInt(name, state); } } // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 74037da238..15a3defa59 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -64,9 +64,9 @@ bool Background::load(MfcArchive &file) { for (int i = 0; i < _bigPictureArray1Count; i++) { _bigPictureArray[i] = (BigPicture **)calloc(_bigPictureArray2Count, sizeof(BigPicture *)); for (int j = 0; j < _bigPictureArray2Count; j++) { - _bigPictureArray[i][j] = new BigPicture(); + _bigPictureArray[i][j] = new BigPicture(); - _bigPictureArray[i][j]->load(file); + _bigPictureArray[i][j]->load(file); } } @@ -80,7 +80,7 @@ void Background::addPictureObject(PictureObject *pct) { bool inserted = false; for (uint i = 0; i < _picObjList.size(); i++) { if (((PictureObject *)_picObjList[i])->_priority == pct->_priority) { - _picObjList.insert_at(i, pct); + _picObjList.insert_at(i, pct); inserted = true; break; } @@ -92,7 +92,7 @@ void Background::addPictureObject(PictureObject *pct) { } void Background::renumPictures(PictureObject *pct) { - int *buf = (int *)calloc(_picObjList.size() + 2, sizeof(int)); + int *buf = (int *)calloc(_picObjList.size() + 2, sizeof(int)); for (uint i = 0; i < _picObjList.size(); i++) { if (pct->_id == ((PictureObject *)_picObjList[i])->_id) @@ -166,7 +166,7 @@ bool GameObject::load(MfcArchive &file) { _priority = file.readUint16LE(); if (g_fullpipe->_gameProjectVersion >= 11) { - _field_8 = file.readUint32LE(); + _field_8 = file.readUint32LE(); } return true; diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 3ff61816ef..4acf568328 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -44,26 +44,26 @@ bool CMctlCompound::load(MfcArchive &file) { debug(6, "CMctlCompound::count = %d", count); for (int i = 0; i < count; i++) { - debug(6, "CompoundArray[%d]", i); - CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); + debug(6, "CompoundArray[%d]", i); + CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass(); - int count1 = file.readUint32LE(); + int count1 = file.readUint32LE(); - debug(6, "ConnectionPoint::count: %d", count1); - for (int j = 0; j < count1; j++) { - debug(6, "ConnectionPoint[%d]", j); - CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass(); + debug(6, "ConnectionPoint::count: %d", count1); + for (int j = 0; j < count1; j++) { + debug(6, "ConnectionPoint[%d]", j); + CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass(); - obj->_connectionPoints.push_back(*obj1); - } + obj->_connectionPoints.push_back(*obj1); + } - obj->_field_20 = file.readUint32LE(); - obj->_field_24 = file.readUint32LE(); + obj->_field_20 = file.readUint32LE(); + obj->_field_24 = file.readUint32LE(); - debug(6, "graphReact"); - obj->_movGraphReactObj = (CMovGraphReact *)file.readClass(); + debug(6, "graphReact"); + obj->_movGraphReactObj = (CMovGraphReact *)file.readClass(); - _motionControllers.push_back(*obj); + _motionControllers.push_back(*obj); } return true; @@ -80,144 +80,144 @@ bool CMctlCompoundArray::load(MfcArchive &file) { } CMovGraph::CMovGraph() { - _itemsCount = 0; - _items = 0; - //_callback1 = CMovGraphCallback1; // TODO - _field_44 = 0; - // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129); + _itemsCount = 0; + _items = 0; + //_callback1 = CMovGraphCallback1; // TODO + _field_44 = 0; + // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129); } bool CMovGraph::load(MfcArchive &file) { - _links.load(file); - _nodes.load(file); + _links.load(file); + _nodes.load(file); - return true; + return true; } CMovGraphLink::CMovGraphLink() { - _distance = 0; - _angle = 0; - _flags = 0x10000000; - _movGraphNode2 = 0; - _movGraphNode1 = 0; - _field_3C = 0; - _field_38 = 0; - _movGraphReact = 0; + _distance = 0; + _angle = 0; + _flags = 0x10000000; + _movGraphNode2 = 0; + _movGraphNode1 = 0; + _field_3C = 0; + _field_38 = 0; + _movGraphReact = 0; } bool CMovGraphLink::load(MfcArchive &file) { - _dwordArray1.load(file); - _dwordArray2.load(file); + _dwordArray1.load(file); + _dwordArray2.load(file); - _flags = file.readUint32LE(); + _flags = file.readUint32LE(); - debug(8, "GraphNode1"); - _movGraphNode1 = (CMovGraphNode *)file.readClass(); - debug(8, "GraphNode2"); - _movGraphNode2 = (CMovGraphNode *)file.readClass(); + debug(8, "GraphNode1"); + _movGraphNode1 = (CMovGraphNode *)file.readClass(); + debug(8, "GraphNode2"); + _movGraphNode2 = (CMovGraphNode *)file.readClass(); - _distance = file.readDouble(); - _angle = file.readDouble(); + _distance = file.readDouble(); + _angle = file.readDouble(); - debug(8, "distance: %g, angle: %g", _distance, _angle); + debug(8, "distance: %g, angle: %g", _distance, _angle); - _movGraphReact = (CMovGraphReact *)file.readClass(); - _name = file.readPascalString(); + _movGraphReact = (CMovGraphReact *)file.readClass(); + _name = file.readPascalString(); - return true; + return true; } bool CMovGraphNode::load(MfcArchive &file) { - _field_14 = file.readUint32LE(); - _x = file.readUint32LE(); - _y = file.readUint32LE(); - _distance = file.readUint32LE(); + _field_14 = file.readUint32LE(); + _x = file.readUint32LE(); + _y = file.readUint32LE(); + _distance = file.readUint32LE(); - return true; + return true; } CReactParallel::CReactParallel() { - _x1 = 0; - _x2 = 0; - _dy = 0; - _dx = 0; - _points = 0; - _y1 = 0; - _y2 = 0; + _x1 = 0; + _x2 = 0; + _dy = 0; + _dx = 0; + _points = 0; + _y1 = 0; + _y2 = 0; } bool CReactParallel::load(MfcArchive &file) { - _x1 = file.readUint32LE(); - _y1 = file.readUint32LE(); - _x2 = file.readUint32LE(); - _y2 = file.readUint32LE(); - _dx = file.readUint32LE(); - _dy = file.readUint32LE(); + _x1 = file.readUint32LE(); + _y1 = file.readUint32LE(); + _x2 = file.readUint32LE(); + _y2 = file.readUint32LE(); + _dx = file.readUint32LE(); + _dy = file.readUint32LE(); - createRegion(); + createRegion(); - return true; + return true; } void CReactParallel::createRegion() { - _points = (Common::Point **)malloc(sizeof(Common::Point *) * 4); + _points = (Common::Point **)malloc(sizeof(Common::Point *) * 4); + + for (int i = 0; i < 4; i++) + _points[i] = new Common::Point; - for (int i = 0; i < 4; i++) - _points[i] = new Common::Point; + double at = atan2(_x1 - _x2, _y1 - _y2) + 1.570796; + double sn = sin(at); + double cs = cos(at); - double at = atan2(_x1 - _x2, _y1 - _y2) + 1.570796; - double sn = sin(at); - double cs = cos(at); + _points[0]->x = (int16)(_x1 - _dx * cs); + _points[0]->y = (int16)(_y1 - _dx * sn); - _points[0]->x = (int16)(_x1 - _dx * cs); - _points[0]->y = (int16)(_y1 - _dx * sn); + _points[1]->x = (int16)(_x2 - _dx * cs); + _points[1]->y = (int16)(_y2 - _dx * sn); - _points[1]->x = (int16)(_x2 - _dx * cs); - _points[1]->y = (int16)(_y2 - _dx * sn); - - _points[2]->x = (int16)(_x1 + _dy * cs); - _points[2]->y = (int16)(_y2 + _dy * sn); + _points[2]->x = (int16)(_x1 + _dy * cs); + _points[2]->y = (int16)(_y2 + _dy * sn); - _points[3]->x = (int16)(_x1 + _dy * cs); - _points[3]->y = (int16)(_y1 + _dy * sn); + _points[3]->x = (int16)(_x1 + _dy * cs); + _points[3]->y = (int16)(_y1 + _dy * sn); - // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2); + // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2); } CReactPolygonal::CReactPolygonal() { - _field_C = 0; - _points = 0; - _pointCount = 0; - _field_10 = 0; + _field_C = 0; + _points = 0; + _pointCount = 0; + _field_10 = 0; } bool CReactPolygonal::load(MfcArchive &file) { - _field_C = file.readUint32LE(); - _field_10 = file.readUint32LE(); - _pointCount = file.readUint32LE(); + _field_C = file.readUint32LE(); + _field_10 = file.readUint32LE(); + _pointCount = file.readUint32LE(); - if (_pointCount > 0) { - _points = (Common::Point **)malloc(sizeof(Common::Point *) * _pointCount); + if (_pointCount > 0) { + _points = (Common::Point **)malloc(sizeof(Common::Point *) * _pointCount); - for (int i = 0; i < _pointCount; i++) { - _points[i] = new Common::Point; + for (int i = 0; i < _pointCount; i++) { + _points[i] = new Common::Point; - _points[i]->x = file.readUint32LE(); - _points[i]->y = file.readUint32LE(); - } + _points[i]->x = file.readUint32LE(); + _points[i]->y = file.readUint32LE(); + } - } + } - createRegion(); + createRegion(); - return true; + return true; } void CReactPolygonal::createRegion() { - if (_points) { + if (_points) { - // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, _pointCount, 2); - } + // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, _pointCount, 2); + } } } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 7a5d663bc3..4d8f9617f0 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -180,11 +180,10 @@ bool Scene::load(MfcArchive &file) { strcpy(fname, _stringObj); strcpy(strrchr(fname, '.') + 1, "col"); - MemoryObject *col = new MemoryObject(); + MemoryObject *col = new MemoryObject(); col->loadFile(fname); _colorMemoryObj = col; - } char *shdname = genFileName(0, _sceneId, "shd"); @@ -203,7 +202,7 @@ bool Scene::load(MfcArchive &file) { if (g_fullpipe->_flgSoundList) { char *nlname = genFileName(17, _sceneId, "nl"); - + _soundList->loadFile(slsname, nlname); free(nlname); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 57e3921ba5..47952babfe 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -469,82 +469,82 @@ bool CGameVar::load(MfcArchive &file) { } CGameVar *CGameVar::getSubVarByName(const char *name) { - CGameVar *sv = 0; + CGameVar *sv = 0; - if (_subVars != 0) { - sv = _subVars; - for (;sv && scumm_stricmp(sv->_stringObj, name); sv = sv->_nextVarObj) - ; - } - return sv; + if (_subVars != 0) { + sv = _subVars; + for (;sv && scumm_stricmp(sv->_stringObj, name); sv = sv->_nextVarObj) + ; + } + return sv; } bool CGameVar::setSubVarAsInt(const char *name, int value) { - CGameVar *var = getSubVarByName(name); + CGameVar *var = getSubVarByName(name); - if (var) { - if (var->_varType == 0) { - var->_value.intValue = value; + if (var) { + if (var->_varType == 0) { + var->_value.intValue = value; - return true; - } - return false; - } + return true; + } + return false; + } - var = new CGameVar(); - var->_varType = 0; - var->_value.intValue = value; - var->_stringObj = (char *)calloc(strlen(name) + 1, 1); - strcpy(var->_stringObj, name); + var = new CGameVar(); + var->_varType = 0; + var->_value.intValue = value; + var->_stringObj = (char *)calloc(strlen(name) + 1, 1); + strcpy(var->_stringObj, name); - return addSubVar(var); + return addSubVar(var); } int CGameVar::getSubVarAsInt(const char *name) { - CGameVar *var = getSubVarByName(name); + CGameVar *var = getSubVarByName(name); - if (var) - return var->_value.intValue; - else - return 0; + if (var) + return var->_value.intValue; + else + return 0; } CGameVar *CGameVar::addSubVarAsInt(const char *name, int value) { - if (getSubVarByName(name)) { - return 0; - } else { - CGameVar *var = new CGameVar(); + if (getSubVarByName(name)) { + return 0; + } else { + CGameVar *var = new CGameVar(); - var->_varType = 0; - var->_value.intValue = value; + var->_varType = 0; + var->_value.intValue = value; - var->_stringObj = (char *)calloc(strlen(name) + 1, 1); - strcpy(var->_stringObj, name); + var->_stringObj = (char *)calloc(strlen(name) + 1, 1); + strcpy(var->_stringObj, name); - return (addSubVar(var) != 0) ? var : 0; - } + return (addSubVar(var) != 0) ? var : 0; + } } bool CGameVar::addSubVar(CGameVar *subvar) { - CGameVar *var = _subVars; + CGameVar *var = _subVars; - if (var) { - for (CGameVar *i = var->_nextVarObj; i; i = i->_nextVarObj) - var = i; + if (var) { + for (CGameVar *i = var->_nextVarObj; i; i = i->_nextVarObj) + var = i; - var->_nextVarObj = subvar; - subvar->_prevVarObj = var; - subvar->_parentVarObj = var; - - return true; - } else { - var->_subVars = subvar; - subvar->_parentVarObj = var; + var->_nextVarObj = subvar; + subvar->_prevVarObj = var; + subvar->_parentVarObj = var; - return true; - } + return true; + } else { + var->_subVars = subvar; + subvar->_parentVarObj = var; - return false; + return true; + } + + return false; } Sc2::Sc2() { @@ -571,27 +571,27 @@ bool Sc2::load(MfcArchive &file) { _count1 = file.readUint32LE(); debug(4, "count1: %d", _count1); if (_count1 > 0) { - _data1 = (int32 *)malloc(_count1 * sizeof(int32)); - - for (int i = 0; i < _count1; i++) { - _data1[i] = file.readUint32LE(); - } + _data1 = (int32 *)malloc(_count1 * sizeof(int32)); + + for (int i = 0; i < _count1; i++) { + _data1[i] = file.readUint32LE(); + } } else { - _data1 = 0; + _data1 = 0; } _defPicAniInfosCount = file.readUint32LE(); debug(4, "defPicAniInfos: %d", _defPicAniInfosCount); if (_defPicAniInfosCount > 0) { - _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *)); + _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *)); - for (int i = 0; i < _defPicAniInfosCount; i++) { - _defPicAniInfos[i] = new PicAniInfo(); + for (int i = 0; i < _defPicAniInfosCount; i++) { + _defPicAniInfos[i] = new PicAniInfo(); - _defPicAniInfos[i]->load(file); - } + _defPicAniInfos[i]->load(file); + } } else { - _defPicAniInfos = 0; + _defPicAniInfos = 0; } _picAniInfos = 0; @@ -601,14 +601,14 @@ bool Sc2::load(MfcArchive &file) { debug(4, "_entranceData: %d", _entranceDataCount); if (_entranceDataCount > 0) { - _entranceData = (EntranceInfo **)malloc(_defPicAniInfosCount * sizeof(EntranceInfo *)); + _entranceData = (EntranceInfo **)malloc(_defPicAniInfosCount * sizeof(EntranceInfo *)); - for (int i = 0; i < _entranceDataCount; i++) { - _entranceData[i] = new EntranceInfo(); - _entranceData[i]->load(file); - } + for (int i = 0; i < _entranceDataCount; i++) { + _entranceData[i] = new EntranceInfo(); + _entranceData[i]->load(file); + } } else { - _entranceData = 0; + _entranceData = 0; } debug(4, "pos: %d, 0x%x: %d", file.size(), file.pos(), file.size() - file.pos()); @@ -617,33 +617,33 @@ bool Sc2::load(MfcArchive &file) { } bool PicAniInfo::load(MfcArchive &file) { - type = file.readUint32LE(); - objectId = file.readUint16LE(); - field_6 = file.readUint16LE(); - field_8 = file.readUint32LE(); - field_C = file.readUint16LE(); - field_E = file.readUint16LE(); - ox = file.readUint32LE(); - oy = file.readUint32LE(); - priority = file.readUint32LE(); - staticsId = file.readUint16LE(); - movementId = file.readUint16LE(); - dynamicPhaseIndex = file.readUint16LE(); - flags = file.readUint16LE(); - field_24 = file.readUint32LE(); - someDynamicPhaseIndex = file.readUint32LE(); - - return true; + type = file.readUint32LE(); + objectId = file.readUint16LE(); + field_6 = file.readUint16LE(); + field_8 = file.readUint32LE(); + field_C = file.readUint16LE(); + field_E = file.readUint16LE(); + ox = file.readUint32LE(); + oy = file.readUint32LE(); + priority = file.readUint32LE(); + staticsId = file.readUint16LE(); + movementId = file.readUint16LE(); + dynamicPhaseIndex = file.readUint16LE(); + flags = file.readUint16LE(); + field_24 = file.readUint32LE(); + someDynamicPhaseIndex = file.readUint32LE(); + + return true; } bool EntranceInfo::load(MfcArchive &file) { - sceneId = file.readUint32LE(); - field_4 = file.readUint32LE(); - messageQueueId = file.readUint32LE(); - file.read(gap_C, 292); // FIXME, Ugh - field_130 = file.readUint32LE(); + sceneId = file.readUint32LE(); + field_4 = file.readUint32LE(); + messageQueueId = file.readUint32LE(); + file.read(gap_C, 292); // FIXME, Ugh + field_130 = file.readUint32LE(); - return true; + return true; } } // End of namespace Fullpipe diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 04aa8cf85c..f59342e3e9 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -53,7 +53,7 @@ bool StaticANIObject::load(MfcArchive &file) { for (int i = 0; i < count; i++) { Statics *st = new Statics(); - + st->load(file); _staticsList.push_back(st); } @@ -62,7 +62,7 @@ bool StaticANIObject::load(MfcArchive &file) { debug(7, "Movements: %d", count); for (int i = 0; i < count; i++) { - int movNum = file.readUint16LE(); + int movNum = file.readUint16LE(); char *movname = genFileName(_id, movNum, "mov"); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 0b75ab5ede..88a21a08fe 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -105,7 +105,7 @@ char *MfcArchive::readPascalString(bool twoByte) { } MemoryObject::MemoryObject() { - _filename = 0; + _filename = 0; _field_8 = 0; _field_C = 0; _field_10 = -1; @@ -169,20 +169,20 @@ int MfcArchive::readCount() { } double MfcArchive::readDouble() { - // FIXME: This is utterly cruel and unportable - - union { - struct { - int32 a; - int32 b; - } i; - double d; - } tmp; - - tmp.i.a = readUint32LE(); - tmp.i.b = readUint32LE(); - - return tmp.d; + // FIXME: This is utterly cruel and unportable + + union { + struct { + int32 a; + int32 b; + } i; + double d; + } tmp; + + tmp.i.a = readUint32LE(); + tmp.i.b = readUint32LE(); + + return tmp.d; } enum { @@ -380,7 +380,7 @@ byte *transCyrillic(byte *s) { 0xf1, 0xd181, 0xf2, 0xd182, 0xf3, 0xd183, 0xf4, 0xd184, 0xf5, 0xd185, 0xf6, 0xd186, 0xf7, 0xd187, 0xf8, 0xd188, 0xf9, 0xd189, 0xfa, 0xd18a, 0xfb, 0xd18b, 0xfc, 0xd18c, - 0xfd, 0xd18d, 0xfe, 0xd18e, 0xff, 0xd18f }; + 0xfd, 0xd18d, 0xfe, 0xd18e, 0xff, 0xd18f }; int i = 0; -- cgit v1.2.3 From f18e318f788d126b6c39232afaf0012ef401d55d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 11 Jul 2013 08:09:11 +0300 Subject: FULLPIPE: Bitmap loading --- engines/fullpipe/gfx.cpp | 37 +++++++++++++++++++++++++++++++++++++ engines/fullpipe/gfx.h | 19 ++++++++++++++++++- engines/fullpipe/utils.cpp | 18 +++++++++++++++--- engines/fullpipe/utils.h | 4 +++- 4 files changed, 73 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 15a3defa59..b06968e77f 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -24,8 +24,24 @@ #include "fullpipe/objects.h" +#include "common/memstream.h" + namespace Fullpipe { +void Bitmap::load(Common::ReadStream *s) { + x = s->readUint32LE(); + y = s->readUint32LE(); + width = s->readUint32LE(); + height = s->readUint32LE(); + s->readUint32LE(); // pixels + type = s->readUint32LE(); + field_18 = s->readUint32LE(); + flags = s->readUint32LE(); + + debug(9, "x: %d y: %d w: %d h: %d", x, y, width, height); + debug(9, "type: %d field_18: %d flags: 0x%x", type, field_18, flags); +} + Background::Background() { _x = 0; _y = 0; @@ -227,6 +243,27 @@ void Picture::setAOIDs() { warning("STUB: Picture::setAOIDs()"); } +void Picture::init() { + _bitmap = new Bitmap(); + + getDibInfo(); + + _bitmap->flags |= 0x1000000; +} + +void Picture::getDibInfo() { + int off = _dataSize & ~0xf; + + if (_dataSize != off) { + warning("Uneven data size: 0x%x", _dataSize); + } + + Common::MemoryReadStream *s = new Common::MemoryReadStream(_data + off, 32); + + _bitmap->load(s); + _bitmap->pixels = _data; +} + BigPicture::BigPicture() { } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 6e1a3a1494..f03cc72ff9 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -23,12 +23,27 @@ #ifndef FULLPIPE_GFX_H #define FULLPIPE_GFX_H +class Common::ReadStream; + namespace Fullpipe { class ShadowsItemArray : public CObArray { // empty }; +struct Bitmap { + int x; + int y; + int width; + int height; + byte *pixels; + int type; + int field_18; + int flags; + + void load(Common::ReadStream *s); +}; + class Picture : public MemoryObject { friend class Movement; @@ -39,7 +54,7 @@ class Picture : public MemoryObject { int _field_44; int _width; int _height; - int _bitmap; + Bitmap *_bitmap; int _field_54; MemoryObject2 *_memoryObject2; int _alpha; @@ -49,6 +64,8 @@ class Picture : public MemoryObject { Picture(); virtual bool load(MfcArchive &file); void setAOIDs(); + void init(); + void getDibInfo(); }; class BigPicture : public Picture { diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 88a21a08fe..be1bcd38a6 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -134,15 +134,27 @@ void MemoryObject::loadFile(char *filename) { if (s) { assert(s->size() > 0); - debug(0, "Loading %s", filename); - _data = calloc(s->size(), 1); - s->read(_data, s->size()); + _dataSize = s->size(); + + debug(0, "Loading %s (%d bytes)", filename, _dataSize); + _data = (byte *)calloc(_dataSize, 1); + s->read(_data, _dataSize); delete s; } } } +void *MemoryObject::getData() { + load(); + + if (_field_14 || _flags & 1) { + return _data; + } else { + error("Unhandled packed data"); + } +} + MemoryObject2::MemoryObject2() { _data2 = 0; } diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 4588541bc1..c12d857be9 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -89,7 +89,7 @@ class MemoryObject : CObject { char _field_15; char _field_16; char _field_17; - void *_data; + byte *_data; int _dataSize; int _flags; NGIArchive *_libHandle; @@ -98,6 +98,8 @@ class MemoryObject : CObject { MemoryObject(); virtual bool load(MfcArchive &file); void loadFile(char *filename); + void load() { loadFile(_filename); } + void *getData(); }; class MemoryObject2 : public MemoryObject { -- cgit v1.2.3 From 56cb726ebc4446dfab6e625502a1589253deae4f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 12 Jul 2013 09:03:02 +0300 Subject: FULLPIPE: Added lots of debug output, Picture::setAOIDs() implementation --- engines/fullpipe/fullpipe.cpp | 2 +- engines/fullpipe/fullpipe.h | 2 +- engines/fullpipe/gfx.cpp | 19 +++++++++++++++++++ engines/fullpipe/inventory.cpp | 2 ++ engines/fullpipe/motion.cpp | 15 +++++++++++++++ engines/fullpipe/scene.cpp | 6 ++++++ engines/fullpipe/sound.cpp | 4 ++++ engines/fullpipe/stateloader.cpp | 26 ++++++++++++++++++++++++-- engines/fullpipe/statics.cpp | 8 ++++++++ engines/fullpipe/utils.cpp | 10 ++++++++-- engines/fullpipe/utils.h | 7 +++++-- 11 files changed, 93 insertions(+), 8 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 23a93cf3f9..c826d21ec5 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -47,7 +47,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _rnd = new Common::RandomSource("fullpipe"); _gameProjectVersion = 0; - _gameProjectValue = 0; + _pictureScale = 8; _scrollSpeed = 0; _currSoundListCount = 0; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index d6b38f2d7e..88c9587004 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -78,7 +78,7 @@ public: bool loadGam(const char *fname); int _gameProjectVersion; - int _gameProjectValue; + int _pictureScale; int _scrollSpeed; int _currSoundListCount; bool _soundEnabled; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index b06968e77f..460452d630 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -29,6 +29,8 @@ namespace Fullpipe { void Bitmap::load(Common::ReadStream *s) { + debug(5, "Bitmap::load()"); + x = s->readUint32LE(); y = s->readUint32LE(); width = s->readUint32LE(); @@ -54,6 +56,7 @@ Background::Background() { } bool Background::load(MfcArchive &file) { + debug(5, "Background::load()"); _stringObj = file.readPascalString(); int count = file.readUint16LE(); @@ -132,6 +135,7 @@ PictureObject::PictureObject() { } bool PictureObject::load(MfcArchive &file, bool bigPicture) { + debug(5, "PictureObject::load()"); GameObject::load(file); if (bigPicture) @@ -170,6 +174,7 @@ GameObject::GameObject() { } bool GameObject::load(MfcArchive &file) { + debug(5, "GameObject::load()"); _field_4 = 0; _flags = 0; _field_20 = 0; @@ -205,6 +210,7 @@ Picture::Picture() { } bool Picture::load(MfcArchive &file) { + debug(5, "Picture::load()"); MemoryObject::load(file); _x = file.readUint32LE(); @@ -240,6 +246,17 @@ bool Picture::load(MfcArchive &file) { } void Picture::setAOIDs() { + int w = (g_fullpipe->_pictureScale + _width - 1) / g_fullpipe->_pictureScale; + int h = (g_fullpipe->_pictureScale + _height - 1) / g_fullpipe->_pictureScale; + + _memoryObject2->_rows = (byte **)malloc(w * sizeof(int *)); + + int pitch = 2 * h; + byte *ptr = _memoryObject2->getData(); + for (int i = 0; i < w; i++) { + _memoryObject2->_rows[i] = ptr; + ptr += pitch; + } warning("STUB: Picture::setAOIDs()"); } @@ -268,6 +285,7 @@ BigPicture::BigPicture() { } bool BigPicture::load(MfcArchive &file) { + debug(5, "BigPicture::load()"); Picture::load(file); return true; @@ -280,6 +298,7 @@ Shadows::Shadows() { } bool Shadows::load(MfcArchive &file) { + debug(5, "Shadows::load()"); _sceneId = file.readUint32LE(); _staticAniObjectId = file.readUint32LE(); _movementId = file.readUint32LE(); diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 47f3b0d4be..3ca6ce6aa4 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -27,6 +27,8 @@ namespace Fullpipe { bool CInventory::load(MfcArchive &file) { + debug(5, "CInventory::load()"); + _sceneId = file.readUint16LE(); int numInvs = file.readUint32LE(); diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 4acf568328..097ef34209 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -34,11 +34,14 @@ namespace Fullpipe { bool CMotionController::load(MfcArchive &file) { // Is originally empty file.readClass(); + debug(5, "CMotionController::load()"); return true; } bool CMctlCompound::load(MfcArchive &file) { + debug(5, "CMctlCompound::load()"); + int count = file.readUint32LE(); debug(6, "CMctlCompound::count = %d", count); @@ -70,6 +73,8 @@ bool CMctlCompound::load(MfcArchive &file) { } bool CMctlCompoundArray::load(MfcArchive &file) { + debug(5, "CMctlCompoundArray::load()"); + int count = file.readUint32LE(); debug(0, "CMctlCompoundArray::count = %d", count); @@ -88,6 +93,8 @@ CMovGraph::CMovGraph() { } bool CMovGraph::load(MfcArchive &file) { + debug(5, "CMovGraph::load()"); + _links.load(file); _nodes.load(file); @@ -106,6 +113,8 @@ CMovGraphLink::CMovGraphLink() { } bool CMovGraphLink::load(MfcArchive &file) { + debug(5, "CMovGraphLink::load()"); + _dwordArray1.load(file); _dwordArray2.load(file); @@ -128,6 +137,8 @@ bool CMovGraphLink::load(MfcArchive &file) { } bool CMovGraphNode::load(MfcArchive &file) { + debug(5, "CMovGraphNode::load()"); + _field_14 = file.readUint32LE(); _x = file.readUint32LE(); _y = file.readUint32LE(); @@ -147,6 +158,8 @@ CReactParallel::CReactParallel() { } bool CReactParallel::load(MfcArchive &file) { + debug(5, "CReactParallel::load()"); + _x1 = file.readUint32LE(); _y1 = file.readUint32LE(); _x2 = file.readUint32LE(); @@ -192,6 +205,8 @@ CReactPolygonal::CReactPolygonal() { } bool CReactPolygonal::load(MfcArchive &file) { + debug(5, "CReactPolygonal::load()"); + _field_C = file.readUint32LE(); _field_10 = file.readUint32LE(); _pointCount = file.readUint32LE(); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 4d8f9617f0..e6a1a9b76d 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -49,6 +49,8 @@ Scene *FullpipeEngine::accessScene(int sceneId) { } bool SceneTagList::load(MfcArchive &file) { + debug(5, "SceneTagList::load()"); + int numEntries = file.readUint16LE(); for (int i = 0; i < numEntries; i++) { @@ -66,6 +68,8 @@ SceneTag::SceneTag() { } bool SceneTag::load(MfcArchive &file) { + debug(5, "SceneTag::load()"); + _field_4 = 0; _scene = 0; @@ -113,6 +117,8 @@ Scene::Scene() { } bool Scene::load(MfcArchive &file) { + debug(5, "Scene::load()"); + Background::load(file); _sceneId = file.readUint16LE(); diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index bdbc8da762..43b8e11f8f 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -34,6 +34,8 @@ SoundList::SoundList() { } bool SoundList::load(MfcArchive &file, char *fname) { + debug(5, "SoundList::load()"); + _soundItemsCount = file.readUint32LE(); _soundItems = (Sound **)calloc(_soundItemsCount, sizeof(Sound *)); @@ -75,6 +77,8 @@ Sound::Sound() { bool Sound::load(MfcArchive &file, NGIArchive *archive) { + debug(5, "Sound::load()"); + MemoryObject::load(file); _id = file.readUint32LE(); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 47952babfe..02e297055f 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -144,6 +144,8 @@ CGameLoader::~CGameLoader() { } bool CGameLoader::load(MfcArchive &file) { + debug(5, "CGameLoader::load()"); + _gameName = file.readPascalString(); debug(6, "_gameName: %s", _gameName); @@ -229,18 +231,20 @@ GameProject::GameProject() { } bool GameProject::load(MfcArchive &file) { + debug(5, "GameProject::load()"); + _field_4 = 0; _headerFilename = 0; _field_10 = 12; g_fullpipe->_gameProjectVersion = file.readUint32LE(); - g_fullpipe->_gameProjectValue = file.readUint16LE(); + g_fullpipe->_pictureScale = file.readUint16LE(); g_fullpipe->_scrollSpeed = file.readUint32LE(); _headerFilename = file.readPascalString(); debug(1, "_gameProjectVersion = %d", g_fullpipe->_gameProjectVersion); - debug(1, "_gameProjectValue = %d", g_fullpipe->_gameProjectValue); + debug(1, "_pictureScale = %d", g_fullpipe->_pictureScale); debug(1, "_scrollSpeed = %d", g_fullpipe->_scrollSpeed); debug(1, "_headerFilename = %s", _headerFilename); @@ -264,6 +268,8 @@ GameProject::~GameProject() { } bool CInteractionController::load(MfcArchive &file) { + debug(5, "CInteractionController::load()"); + return _interactions.load(file); } @@ -288,6 +294,8 @@ CInteraction::CInteraction() { } bool CInteraction::load(MfcArchive &file) { + debug(5, "CInteraction::load()"); + _objectId1 = file.readUint16LE(); _objectId2 = file.readUint16LE(); _staticsId1 = file.readUint16LE(); @@ -316,6 +324,8 @@ MessageQueue::MessageQueue() { } bool MessageQueue::load(MfcArchive &file) { + debug(5, "MessageQueue::load()"); + _dataId = file.readUint16LE(); int count = file.readUint16LE(); @@ -346,6 +356,8 @@ ExCommand::ExCommand() { } bool ExCommand::load(MfcArchive &file) { + debug(5, "ExCommand::load()"); + _msg._parentId = file.readUint16LE(); _msg._messageKind = file.readUint32LE(); _msg._x = file.readUint32LE(); @@ -393,6 +405,8 @@ CObjstateCommand::CObjstateCommand() { } bool CObjstateCommand::load(MfcArchive &file) { + debug(5, "CObjStateCommand::load()"); + _cmd.load(file); _value = file.readUint32LE(); @@ -403,6 +417,8 @@ bool CObjstateCommand::load(MfcArchive &file) { } bool PreloadItems::load(MfcArchive &file) { + debug(5, "PreloadItems::load()"); + int count = file.readCount(); resize(count); @@ -564,6 +580,8 @@ Sc2::Sc2() { } bool Sc2::load(MfcArchive &file) { + debug(5, "Sc2::load()"); + _sceneId = file.readUint16LE(); _motionController = (CMotionController *)file.readClass(); @@ -617,6 +635,8 @@ bool Sc2::load(MfcArchive &file) { } bool PicAniInfo::load(MfcArchive &file) { + debug(5, "PicAniInfo::load()"); + type = file.readUint32LE(); objectId = file.readUint16LE(); field_6 = file.readUint16LE(); @@ -637,6 +657,8 @@ bool PicAniInfo::load(MfcArchive &file) { } bool EntranceInfo::load(MfcArchive &file) { + debug(5, "EntranceInfo::load()"); + sceneId = file.readUint32LE(); field_4 = file.readUint32LE(); messageQueueId = file.readUint32LE(); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index f59342e3e9..f51bc17017 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -47,6 +47,8 @@ StaticANIObject::StaticANIObject() { } bool StaticANIObject::load(MfcArchive &file) { + debug(5, "StaticANIObject::load()"); + GameObject::load(file); int count = file.readUint16LE(); @@ -128,6 +130,8 @@ Statics::Statics() { } bool Statics::load(MfcArchive &file) { + debug(5, "Statics::load()"); + DynamicPhase::load(file); _staticsId = file.readUint16LE(); @@ -279,6 +283,8 @@ DynamicPhase::DynamicPhase() { } bool DynamicPhase::load(MfcArchive &file) { + debug(5, "DynamicPhase::load()"); + StaticPhase::load(file); _field_7C = file.readUint16LE(); @@ -309,6 +315,8 @@ StaticPhase::StaticPhase() { } bool StaticPhase::load(MfcArchive &file) { + debug(5, "StaticPhase::load()"); + Picture::load(file); _initialCountdown = file.readUint16LE(); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index be1bcd38a6..9227d3dc2c 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -43,6 +43,7 @@ bool CObject::loadFile(const char *fname) { } bool CObList::load(MfcArchive &file) { + debug(5, "CObList::load()"); int count = file.readCount(); debug(9, "CObList::count: %d:", count); @@ -58,6 +59,7 @@ bool CObList::load(MfcArchive &file) { } bool CObArray::load(MfcArchive &file) { + debug(5, "CObArray::load()"); int count = file.readCount(); resize(count); @@ -72,6 +74,7 @@ bool CObArray::load(MfcArchive &file) { } bool CDWordArray::load(MfcArchive &file) { + debug(5, "CWordArray::load()"); int count = file.readCount(); debug(9, "CDWordArray::count: %d", count); @@ -117,6 +120,7 @@ MemoryObject::MemoryObject() { } bool MemoryObject::load(MfcArchive &file) { + debug(5, "MemoryObject::load()"); _filename = file.readPascalString(); if (g_fullpipe->_currArchive) { @@ -128,6 +132,7 @@ bool MemoryObject::load(MfcArchive &file) { } void MemoryObject::loadFile(char *filename) { + debug(0, "MemoryObject::loadFile(<%s>)", filename); if (!_data) { Common::SeekableReadStream *s = g_fullpipe->_currArchive->createReadStreamForMember(filename); @@ -145,7 +150,7 @@ void MemoryObject::loadFile(char *filename) { } } -void *MemoryObject::getData() { +byte *MemoryObject::getData() { load(); if (_field_14 || _flags & 1) { @@ -156,10 +161,11 @@ void *MemoryObject::getData() { } MemoryObject2::MemoryObject2() { - _data2 = 0; + _rows = 0; } bool MemoryObject2::load(MfcArchive &file) { + debug(5, "MemoryObject2::load()"); MemoryObject::load(file); _flags |= 1; diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index c12d857be9..7314eadb60 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -99,11 +99,14 @@ class MemoryObject : CObject { virtual bool load(MfcArchive &file); void loadFile(char *filename); void load() { loadFile(_filename); } - void *getData(); + byte *getData(); }; class MemoryObject2 : public MemoryObject { - void *_data2; + friend class Picture; + + protected: + byte **_rows; public: MemoryObject2(); -- cgit v1.2.3 From 1aa11bd86fccc700de84571a24e2fef957abce3d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 12 Jul 2013 10:38:30 +0300 Subject: FULLPIPE: Further work on inventory --- engines/fullpipe/gfx.cpp | 8 +++++++- engines/fullpipe/gfx.h | 4 ++++ engines/fullpipe/inventory.cpp | 2 ++ engines/fullpipe/inventory.h | 24 +++++++++++++----------- engines/fullpipe/utils.cpp | 2 +- 5 files changed, 27 insertions(+), 13 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 460452d630..3679f8f345 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -257,7 +257,6 @@ void Picture::setAOIDs() { _memoryObject2->_rows[i] = ptr; ptr += pitch; } - warning("STUB: Picture::setAOIDs()"); } void Picture::init() { @@ -281,6 +280,13 @@ void Picture::getDibInfo() { _bitmap->pixels = _data; } +Bitmap *Picture::getPixelData() { + if (!_bitmap) + init(); + + return _bitmap; +} + BigPicture::BigPicture() { } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index f03cc72ff9..aa5dbf4be9 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -66,6 +66,10 @@ class Picture : public MemoryObject { void setAOIDs(); void init(); void getDibInfo(); + Bitmap *getPixelData(); + + byte getAlpha() { return (byte)_alpha; } + void setAlpha(byte alpha) { _alpha = alpha; } }; class BigPicture : public Picture { diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 3ca6ce6aa4..5c67e87d36 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -100,6 +100,8 @@ void CInventory2::addItem(int itemId, int value) { void CInventory2::rebuildItemRects() { g_fullpipe->accessScene(_sceneId); + + warning("STUB: CInventory2::rebuildItemRects()"); } } // End of namespace Fullpipe diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 93f4755e79..36170b86bf 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -64,18 +64,20 @@ struct InventoryItem { typedef Common::Array InventoryItems; +class PictureObject; + class InventoryIcon { - int pictureObjectNormal; - int pictureObjectMouseInside; - int pictureObject3; - int x1; - int y1; - int x2; - int y2; - int16 inventoryItemId; - int16 field_1E; - int isSelected; - int isMouseInside; + PictureObject *_pictureObjectNormal; + InventoryIcon **_icons; + int _numIcons; + int _x1; + int _y1; + int _x2; + int _y2; + int16 _inventoryItemId; + int16 _field_1E; + int _isSelected; + int _isMouseInside; }; typedef Common::Array InventoryIcons; diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 9227d3dc2c..78440d8d53 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -132,7 +132,7 @@ bool MemoryObject::load(MfcArchive &file) { } void MemoryObject::loadFile(char *filename) { - debug(0, "MemoryObject::loadFile(<%s>)", filename); + debug(5, "MemoryObject::loadFile(<%s>)", filename); if (!_data) { Common::SeekableReadStream *s = g_fullpipe->_currArchive->createReadStreamForMember(filename); -- cgit v1.2.3 From defc53d4d1a74959adf4e87f2e715ac3c4c2f7b7 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 12 Jul 2013 22:35:51 +0300 Subject: FULLPIPE: Scene drawing stubs --- engines/fullpipe/scene.cpp | 28 ++++++++++++++++++++++++++++ engines/fullpipe/scene.h | 3 +++ engines/fullpipe/stateloader.cpp | 6 +++--- engines/fullpipe/statics.cpp | 8 ++++++++ engines/fullpipe/statics.h | 2 ++ 5 files changed, 44 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index e6a1a9b76d..fa144df2eb 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -234,4 +234,32 @@ void Scene::init() { warning("STUB: Scene::init()"); } +void Scene::draw(int par) { + updateScrolling(par); + + drawContent(60000, 0, true); + + //_staticANIObjectList2.sortByPriority(); + + for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) { + ((StaticANIObject *)s)->draw2(); + } + + int priority = -1; + for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) { + drawContent(((StaticANIObject *)s)->_priority, priority, false); + ((StaticANIObject *)s)->draw(); + + priority = ((StaticANIObject *)s)->_priority; + } + + drawContent(-1, priority, false); +} + +void Scene::updateScrolling(int par) { +} + +void Scene::drawContent(int minPri, int maxPri, bool drawBG) { +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index e2bda176cf..1a76d31638 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -43,6 +43,9 @@ class Scene : public Background { virtual bool load(MfcArchive &file); void initStaticANIObjects(); void init(); + void draw(int par); + void drawContent(int minPri, int maxPri, bool drawBG); + void updateScrolling(int par); }; class SceneTag : public CObject { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 02e297055f..e01d08e20e 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -101,10 +101,10 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->rebuildItemRects(); - for (CPtrList::iterator s = _inventory->getScene()->_picObjList.begin(); s != _inventory->getScene()->_picObjList.end(); ++s) { - } - warning("STUB: loadGam()"); + //for (CPtrList::iterator s = _inventory->getScene()->_picObjList.begin(); s != _inventory->getScene()->_picObjList.end(); ++s) { + //} + } else return false; diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index f51bc17017..cdb8fabf46 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -124,6 +124,14 @@ Statics *StaticANIObject::addStatics(Statics *ani) { return 0; } +void StaticANIObject::draw() { + warning("STUB: StaticANIObject::draw()"); +} + +void StaticANIObject::draw2() { + warning("STUB: StaticANIObject::draw2()"); +} + Statics::Statics() { _staticsId = 0; _picture = 0; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 7c52e18d33..3f16878747 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -145,6 +145,8 @@ class StaticANIObject : public GameObject { Movement *getMovementById(int id); Statics *addStatics(Statics *ani); + void draw(); + void draw2(); }; } // End of namespace Fullpipe -- cgit v1.2.3 From 51a5b5c9c51ac40c3ec27e4b55f8c9118c9a580f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 13 Jul 2013 11:45:52 +0300 Subject: FULLPIPE: Stubs for picture drawing --- engines/fullpipe/gfx.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/gfx.h | 3 +++ 2 files changed, 53 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 3679f8f345..91c07806b0 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -287,6 +287,56 @@ Bitmap *Picture::getPixelData() { return _bitmap; } +void Picture::draw(int x, int y, int style, int angle) { + int x1 = x; + int y1 = y; + + if (x != -1) + x1 = x; + + if (y != -1) + y1 = y; + + if (!_bitmap) + init(); + + if (!_bitmap) + return; + + if (_alpha < 0xff) { + warning("Picture:draw: alpha = %0x", _alpha); + } + + if (_bitmap->type == MKTAG('C', 'B', '\0', '\0') || _bitmap->type == MKTAG('R', 'B', '\0', '\0')) { + if (_paletteData) { + warning("Picture:draw: have palette"); + } + } + + switch (style) { + case 1: + //flip + warning("Picture::draw: style 1"); + break; + case 2: + error("Picture::draw: style 2"); + break; + default: + if (angle) { + warning("Picture:draw: angle = %d", angle); + drawRotated(x1, y1, angle); + } else { + putDib(x1, y1); + } + } +} + +void Picture::drawRotated(int x, int y, int angle) { +} + +void Picture::putDib(int x, int y) { +} + BigPicture::BigPicture() { } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index aa5dbf4be9..a2bcad01b8 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -67,6 +67,9 @@ class Picture : public MemoryObject { void init(); void getDibInfo(); Bitmap *getPixelData(); + void draw(int x, int y, int style, int angle); + void drawRotated(int x, int y, int angle); + void putDib(int x, int y); byte getAlpha() { return (byte)_alpha; } void setAlpha(byte alpha) { _alpha = alpha; } -- cgit v1.2.3 From 57e03aedd3924cc9f675594b4b504b4f42958b40 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 16 Jul 2013 23:54:18 +0300 Subject: FULLPIPE: Initial code for bitmap rendering --- engines/fullpipe/fullpipe.cpp | 6 +- engines/fullpipe/fullpipe.h | 2 + engines/fullpipe/gfx.cpp | 272 ++++++++++++++++++++++++++++++++++++--- engines/fullpipe/gfx.h | 23 ++-- engines/fullpipe/sound.cpp | 4 +- engines/fullpipe/stateloader.cpp | 2 +- engines/fullpipe/statics.cpp | 2 +- engines/fullpipe/utils.cpp | 17 ++- engines/fullpipe/utils.h | 4 +- 9 files changed, 297 insertions(+), 35 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index c826d21ec5..f49edc75d1 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -64,8 +64,12 @@ FullpipeEngine::~FullpipeEngine() { } Common::Error FullpipeEngine::run() { + + const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0); // Initialize backend - initGraphics(800, 600, true); + initGraphics(800, 600, true, &format); + + _backgroundSurface.create(800, 600, format); _isSaveAllowed = false; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 88c9587004..bab7a72a4f 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -73,6 +73,8 @@ public: void updateEvents(); + Graphics::Surface _backgroundSurface; + CGameLoader *_gameLoader; GameProject *_gameProject; bool loadGam(const char *fname); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 91c07806b0..9bd511e38c 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -31,17 +31,17 @@ namespace Fullpipe { void Bitmap::load(Common::ReadStream *s) { debug(5, "Bitmap::load()"); - x = s->readUint32LE(); - y = s->readUint32LE(); - width = s->readUint32LE(); - height = s->readUint32LE(); + _x = s->readUint32LE(); + _y = s->readUint32LE(); + _width = s->readUint32LE(); + _height = s->readUint32LE(); s->readUint32LE(); // pixels - type = s->readUint32LE(); - field_18 = s->readUint32LE(); - flags = s->readUint32LE(); + _type = s->readUint32LE(); + _field_18 = s->readUint32LE(); + _flags = s->readUint32LE(); - debug(9, "x: %d y: %d w: %d h: %d", x, y, width, height); - debug(9, "type: %d field_18: %d flags: 0x%x", type, field_18, flags); + debug(8, "Bitmap: x: %d y: %d w: %d h: %d field_18: 0x%x", _x, _y, _width, _height, _field_18); + debug(8, "Bitmap: type: %s (0x%04x) flags: 0x%x", Common::tag2string(_type).c_str(), _type, _flags); } Background::Background() { @@ -242,6 +242,11 @@ bool Picture::load(MfcArchive &file) { file.read(_paletteData, 1024); } + debug(5, "Picture::load: <%s>", _memfilename); + + getData(); + init(); + return true; } @@ -264,20 +269,27 @@ void Picture::init() { getDibInfo(); - _bitmap->flags |= 0x1000000; + _bitmap->_flags |= 0x1000000; } void Picture::getDibInfo() { int off = _dataSize & ~0xf; + debug(0, "Picture::getDibInfo: _dataSize: %d", _dataSize); + + if (!_dataSize) { + warning("Picture::getDibInfo(): Empty data size"); + return; + } + if (_dataSize != off) { warning("Uneven data size: 0x%x", _dataSize); } - Common::MemoryReadStream *s = new Common::MemoryReadStream(_data + off, 32); + Common::MemoryReadStream *s = new Common::MemoryReadStream(_data + off - 32, 32); _bitmap->load(s); - _bitmap->pixels = _data; + _bitmap->_pixels = _data; } Bitmap *Picture::getPixelData() { @@ -307,7 +319,7 @@ void Picture::draw(int x, int y, int style, int angle) { warning("Picture:draw: alpha = %0x", _alpha); } - if (_bitmap->type == MKTAG('C', 'B', '\0', '\0') || _bitmap->type == MKTAG('R', 'B', '\0', '\0')) { + if (_bitmap->_type == MKTAG('C', 'B', '\0', '\0') || _bitmap->_type == MKTAG('R', 'B', '\0', '\0')) { if (_paletteData) { warning("Picture:draw: have palette"); } @@ -326,7 +338,7 @@ void Picture::draw(int x, int y, int style, int angle) { warning("Picture:draw: angle = %d", angle); drawRotated(x1, y1, angle); } else { - putDib(x1, y1); + _bitmap->putDib(x1, y1, _paletteData); } } } @@ -334,7 +346,237 @@ void Picture::draw(int x, int y, int style, int angle) { void Picture::drawRotated(int x, int y, int angle) { } -void Picture::putDib(int x, int y) { +void Bitmap::putDib(int x, int y, byte *palette) { + byte *curDestPtr; + int endy; + int pos; + byte *srcPtr; + uint pixel; + int start1; + int fillValue; + int pixoffset; + int end2; + int pixelHigh; + int pixoffset1; + int leftx; + uint pixel1; + uint pixel1High; + int bpp; + uint pitch; + byte *srcPtr1; + int end; + int endx; + int endy1; + bool cb05_format; + byte *pixPtr; + byte *srcPtr2; + int start; + + endx = _width + _x - 1; + endy = _height + _y - 1; + + if (_x > 799 || _width + _x - 1 < 0 || _y > 599 || endy < 0) + return; + + if (endy > 599) + endy = 599; + + if (_type == MKTAG('R', 'B', '\0', '\0')) { + endy1 = endy; + pixPtr = _pixels; + pos = _x; + + LABEL_17: + srcPtr = pixPtr; + while (1) { + while (1) { + while (1) { + while (1) { + while (1) { + pixel = *(int16 *)srcPtr; + srcPtr += 2; + pixPtr = srcPtr; + if (pixel) + break; + --endy1; + if (endy1 < _y) + return; + pos = _x; + } + + if (pixel == 0x100) + return; + + if (pixel != 0x200) + break; + + pixel1 = *(int16 *)srcPtr; + srcPtr += 2; + pos += (byte)pixel1; + pixel1High = pixel1 >> 8; + + if (pixel1High) { + endy1 -= pixel1High; + + if (endy1 < _y) + return; + } + } + start1 = pos; + fillValue = (byte)pixel; + + if (!(byte)pixel) + break; + + pos += (byte)pixel; + pixoffset = -start1; + + if (pixoffset <= 0) + goto LABEL_25; + + fillValue = (byte)pixel - pixoffset; + + if (fillValue > 0) { + start1 = 0; + + LABEL_25: + end2 = 799; + if (pos <= end2 + 1 || (fillValue += end2 - pos + 1, fillValue > 0)) { + if (endy1 <= endy) { + curDestPtr = (byte *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); + int bgcolor = *(int32 *)(palette + 4 * (pixel >> 8)); + + colorFill(curDestPtr, fillValue, bgcolor); + } + goto LABEL_17; + } + } + } + pixelHigh = pixel >> 8; + srcPtr2 = srcPtr; + pos += pixelHigh; + srcPtr += 2 * ((pixelHigh + 1) >> 1); + pixoffset1 = -start1; + + if (pixoffset1 > 0) + break; + + LABEL_37: + leftx = 799; + if (pos > leftx + 1) { + pixelHigh += leftx - pos + 1; + if (pixelHigh <= 0) + continue; + } + if (endy1 <= endy) { + curDestPtr = (byte *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); + paletteFill(curDestPtr, srcPtr2, pixelHigh); + } + } + pixelHigh -= pixoffset1; + if (pixelHigh > 0) { + start1 = 0; + srcPtr2 += pixoffset1; + goto LABEL_37; + } + } + } + + cb05_format = (_type == MKTAG('C', 'B', '\05', 'e')); + bpp = cb05_format ? 2 : 1; + end = _width + _x - 1; + pitch = (bpp * (endx - _x + 1) + 3) & 0xFFFFFFFC; + start = _x; + srcPtr1 = &_pixels[pitch * (endy - _y)]; + if (_x < 0) { + srcPtr1 += bpp * -_x; + start = 0; + } + + if (endx > 799) + end = 799; + + if (_flags & 0x1000000) { + for (int n = _y; n < endy; srcPtr1 -= pitch) { + curDestPtr = (byte *)g_fullpipe->_backgroundSurface.getBasePtr(n, start); + copierKeyColor(curDestPtr, srcPtr1, end - start + 1, _flags & 0xff); + ++n; + } + } else { + for (int n = _y; n <= endy; srcPtr1 -= pitch) { + curDestPtr = (byte *)g_fullpipe->_backgroundSurface.getBasePtr(n, start); + copier(curDestPtr, srcPtr1, end - start + 1); + ++n; + } + } +} + + void Bitmap::colorFill(byte *dest, int len, int color) { +#if 0 + if (blendMode) { + if (blendMode != 1) + error("vrtPutDib : RLE Fill : Invalid alpha blend mode"); + + colorFill = ptralphaFillColor16bit; + } else { + colorFill = ptrfillColor16bit; + } +#endif + +} + +void Bitmap::paletteFill(byte *dest, byte *src, int len) { +#if 0 + if (blendMode) { + if (blendMode != 1) + error("vrtPutDib : RLE Fill : Invalid alpha blend mode"); + + paletteFill = ptrcopierWithPaletteAlpha; + } else { + paletteFill = ptrcopierWithPalette; + } +#endif + +} + +void Bitmap::copierKeyColor(byte *dest, byte *src, int len, int keyColor) { +#if 0 + if (blendMode) { + if (blendMode == 1) { + if (cb05_format) + copierKeyColor = ptrcopier16bitKeycolorAlpha; + else + copierKeyColor = ptrcopierKeycolorAlpha; + } else { + copier = 0; + } + } else if (cb05_format) { + copierKeyColor = ptrcopier16bitKeycolor; + } else { + copierKeyColor = ptrkeyColor16bit; + } +#endif + +} + +void Bitmap::copier(byte *dest, byte *src, int len) { +#if 0 + if (blendMode) { + if (blendMode == 1) { + if (cb05_format) + copier = ptrcopier16bitAlpha; + else + copier = ptrcopierWithPaletteAlpha; + } else { + copier = 0; + } + } else if (cb05_format) { + copier = ptrcopier16bit; + } else { + copier = ptrcopierWithPalette; + } +#endif + } BigPicture::BigPicture() { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index a2bcad01b8..1205468b6f 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -32,16 +32,22 @@ class ShadowsItemArray : public CObArray { }; struct Bitmap { - int x; - int y; - int width; - int height; - byte *pixels; - int type; - int field_18; - int flags; + int _x; + int _y; + int _width; + int _height; + byte *_pixels; + int _type; + int _field_18; + int _flags; void load(Common::ReadStream *s); + void putDib(int x, int y, byte *palette); + + void colorFill(byte *dest, int len, int color); + void paletteFill(byte *dest, byte *src, int len); + void copierKeyColor(byte *dest, byte *src, int len, int keyColor); + void copier(byte *dest, byte *src, int len); }; class Picture : public MemoryObject { @@ -69,7 +75,6 @@ class Picture : public MemoryObject { Bitmap *getPixelData(); void draw(int x, int y, int style, int angle); void drawRotated(int x, int y, int angle); - void putDib(int x, int y); byte getAlpha() { return (byte)_alpha; } void setAlpha(byte alpha) { _alpha = alpha; } diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 43b8e11f8f..e1b2b331d9 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -88,8 +88,8 @@ bool Sound::load(MfcArchive &file, NGIArchive *archive) { _objectId = file.readUint16LE(); - if (archive && archive->hasFile(_filename)) { - Common::SeekableReadStream *s = archive->createReadStreamForMember(_filename); + if (archive && archive->hasFile(_memfilename)) { + Common::SeekableReadStream *s = archive->createReadStreamForMember(_memfilename); _soundData = (byte *)calloc(s->size(), 1); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index e01d08e20e..d1f9e00a6a 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -44,7 +44,7 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->setItemFlags(ANI_INV_MAP, 0x10003); _inventory->addItem(ANI_INV_MAP, 1); -#if 0 +#if 1 g_fullpipe->accessScene(301); g_fullpipe->accessScene(302); g_fullpipe->accessScene(303); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index cdb8fabf46..4a2616ca91 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -145,7 +145,7 @@ bool Statics::load(MfcArchive &file) { _staticsId = file.readUint16LE(); _stringObj = file.readPascalString(); - debug(7, "statics: <%s>", _stringObj); + debug(7, "statics: <%s>", transCyrillic((byte *)_stringObj)); _picture = new Picture(); _picture->load(file); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 78440d8d53..6ca6a8e6b9 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -108,7 +108,7 @@ char *MfcArchive::readPascalString(bool twoByte) { } MemoryObject::MemoryObject() { - _filename = 0; + _memfilename = 0; _field_8 = 0; _field_C = 0; _field_10 = -1; @@ -121,7 +121,14 @@ MemoryObject::MemoryObject() { bool MemoryObject::load(MfcArchive &file) { debug(5, "MemoryObject::load()"); - _filename = file.readPascalString(); + _memfilename = file.readPascalString(); + + if (char *p = strchr(_memfilename, '\\')) { + for (char *d = _memfilename; *p;) { + p++; + *d++ = *p; + } + } if (g_fullpipe->_currArchive) { _field_14 = 0; @@ -170,8 +177,10 @@ bool MemoryObject2::load(MfcArchive &file) { _flags |= 1; - if (_filename) { - MemoryObject::loadFile(_filename); + debug(5, "MemoryObject2::load: <%s>", _memfilename); + + if (_memfilename && *_memfilename) { + MemoryObject::loadFile(_memfilename); } return true; diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 7314eadb60..524436bd1e 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -81,7 +81,7 @@ class MemoryObject : CObject { friend class Picture; protected: - char *_filename; + char *_memfilename; int _field_8; int _field_C; int _field_10; @@ -98,7 +98,7 @@ class MemoryObject : CObject { MemoryObject(); virtual bool load(MfcArchive &file); void loadFile(char *filename); - void load() { loadFile(_filename); } + void load() { loadFile(_memfilename); } byte *getData(); }; -- cgit v1.2.3 From 6518cb579c110cd19356cd7aa78a12cc342056bb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 17 Jul 2013 14:04:53 +0300 Subject: FULLPIPE: Bitmap loading. Added test code to display loaded pictures. So far it crashes on certain pictures. --- engines/fullpipe/gfx.cpp | 82 +++++++++++++++++++++++++++++++++++++++--------- engines/fullpipe/gfx.h | 10 +++--- 2 files changed, 74 insertions(+), 18 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 9bd511e38c..050a1b4c1d 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -244,8 +244,7 @@ bool Picture::load(MfcArchive &file) { debug(5, "Picture::load: <%s>", _memfilename); - getData(); - init(); + displayPicture(); return true; } @@ -346,8 +345,29 @@ void Picture::draw(int x, int y, int style, int angle) { void Picture::drawRotated(int x, int y, int angle) { } +void Picture::displayPicture() { + getData(); + init(); + + g_fullpipe->_backgroundSurface.fillRect(Common::Rect(0, 0, 799, 599), 0); + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(0, 0), g_fullpipe->_backgroundSurface.pitch, 0, 0, 799, 599); + + draw(0, 0, 0, 0); + + while (1) { + g_fullpipe->updateEvents(); + g_fullpipe->_system->delayMillis(10); + g_fullpipe->_system->updateScreen(); + + if (g_fullpipe->_keyState == ' ') { + g_fullpipe->_keyState = Common::KEYCODE_INVALID; + break; + } + } +} + void Bitmap::putDib(int x, int y, byte *palette) { - byte *curDestPtr; + int16 *curDestPtr; int endy; int pos; byte *srcPtr; @@ -443,7 +463,7 @@ void Bitmap::putDib(int x, int y, byte *palette) { end2 = 799; if (pos <= end2 + 1 || (fillValue += end2 - pos + 1, fillValue > 0)) { if (endy1 <= endy) { - curDestPtr = (byte *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); + curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); int bgcolor = *(int32 *)(palette + 4 * (pixel >> 8)); colorFill(curDestPtr, fillValue, bgcolor); @@ -469,8 +489,8 @@ void Bitmap::putDib(int x, int y, byte *palette) { continue; } if (endy1 <= endy) { - curDestPtr = (byte *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); - paletteFill(curDestPtr, srcPtr2, pixelHigh); + curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); + paletteFill(curDestPtr, srcPtr2, pixelHigh, (int32 *)palette); } } pixelHigh -= pixoffset1; @@ -498,20 +518,22 @@ void Bitmap::putDib(int x, int y, byte *palette) { if (_flags & 0x1000000) { for (int n = _y; n < endy; srcPtr1 -= pitch) { - curDestPtr = (byte *)g_fullpipe->_backgroundSurface.getBasePtr(n, start); - copierKeyColor(curDestPtr, srcPtr1, end - start + 1, _flags & 0xff); + curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, n); + copierKeyColor(curDestPtr, srcPtr1, end - start + 1, _flags & 0xff, (int32 *)palette, cb05_format); ++n; } } else { for (int n = _y; n <= endy; srcPtr1 -= pitch) { - curDestPtr = (byte *)g_fullpipe->_backgroundSurface.getBasePtr(n, start); - copier(curDestPtr, srcPtr1, end - start + 1); + curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, n); + copier(curDestPtr, srcPtr1, end - start + 1, (int32 *)palette, cb05_format); ++n; } } + + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(start, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, end, endy); } - void Bitmap::colorFill(byte *dest, int len, int color) { +void Bitmap::colorFill(int16 *dest, int len, int color) { #if 0 if (blendMode) { if (blendMode != 1) @@ -523,9 +545,11 @@ void Bitmap::putDib(int x, int y, byte *palette) { } #endif + for (int i = 0; i < len; i++) + *dest++ = (int16)color; } -void Bitmap::paletteFill(byte *dest, byte *src, int len) { +void Bitmap::paletteFill(int16 *dest, byte *src, int len, int32 *palette) { #if 0 if (blendMode) { if (blendMode != 1) @@ -537,9 +561,11 @@ void Bitmap::paletteFill(byte *dest, byte *src, int len) { } #endif + for (int i = 0; i < len; i++) + *dest++ = palette[*src++]; } -void Bitmap::copierKeyColor(byte *dest, byte *src, int len, int keyColor) { +void Bitmap::copierKeyColor(int16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format) { #if 0 if (blendMode) { if (blendMode == 1) { @@ -557,9 +583,28 @@ void Bitmap::copierKeyColor(byte *dest, byte *src, int len, int keyColor) { } #endif + if (!cb05_format) { + for (int i = 0; i < len; i++) { + if (*src != keyColor) + *dest = palette[*src]; + + dest++; + src++; + } + } else { + int16 *src16 = (int16 *)src; + + for (int i = 0; i < len; i++) { + if (*src16 != 0) + *dest = *src16; + + dest++; + src16++; + } + } } -void Bitmap::copier(byte *dest, byte *src, int len) { +void Bitmap::copier(int16 *dest, byte *src, int len, int32 *palette, bool cb05_format) { #if 0 if (blendMode) { if (blendMode == 1) { @@ -577,6 +622,15 @@ void Bitmap::copier(byte *dest, byte *src, int len) { } #endif + if (!cb05_format) { + for (int i = 0; i < len; i++) + *dest++ = palette[*src++]; + } else { + int16 *src16 = (int16 *)src; + + for (int i = 0; i < len; i++) + *dest++ = *src16++; + } } BigPicture::BigPicture() { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 1205468b6f..13f519478a 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -44,10 +44,10 @@ struct Bitmap { void load(Common::ReadStream *s); void putDib(int x, int y, byte *palette); - void colorFill(byte *dest, int len, int color); - void paletteFill(byte *dest, byte *src, int len); - void copierKeyColor(byte *dest, byte *src, int len, int keyColor); - void copier(byte *dest, byte *src, int len); + void colorFill(int16 *dest, int len, int color); + void paletteFill(int16 *dest, byte *src, int len, int32 *palette); + void copierKeyColor(int16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format); + void copier(int16 *dest, byte *src, int len, int32 *palette, bool cb05_format); }; class Picture : public MemoryObject { @@ -66,6 +66,8 @@ class Picture : public MemoryObject { int _alpha; byte *_paletteData; + void displayPicture(); + public: Picture(); virtual bool load(MfcArchive &file); -- cgit v1.2.3 From a54a60f52e1548715361c98f779e531205b3c18a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 17 Jul 2013 14:13:23 +0300 Subject: FULLPIPE: Fix crash in bitmap drawing code. --- engines/fullpipe/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 050a1b4c1d..bc8ed26561 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -464,7 +464,7 @@ void Bitmap::putDib(int x, int y, byte *palette) { if (pos <= end2 + 1 || (fillValue += end2 - pos + 1, fillValue > 0)) { if (endy1 <= endy) { curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); - int bgcolor = *(int32 *)(palette + 4 * (pixel >> 8)); + int bgcolor = *(int32 *)(palette + 4 * ((pixel >> 8) & 0xff)); colorFill(curDestPtr, fillValue, bgcolor); } -- cgit v1.2.3 From d0c9392862484a07b360c69af5aab078ad9d4036 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 17 Jul 2013 14:44:14 +0300 Subject: FULLPIPE: Implemented quitting from picture browsing --- engines/fullpipe/fullpipe.cpp | 5 +++++ engines/fullpipe/fullpipe.h | 2 ++ engines/fullpipe/gfx.cpp | 8 +++++++- engines/fullpipe/scene.cpp | 2 +- engines/fullpipe/stateloader.cpp | 1 + 5 files changed, 16 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index f49edc75d1..305443249f 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -56,6 +56,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _soundEnabled = true; _flgSoundList = true; + _needQuit = false; + g_fullpipe = this; } @@ -94,6 +96,9 @@ void FullpipeEngine::updateEvents() { _mouseX = event.mouse.x; _mouseY = event.mouse.y; break; + case Common::EVENT_QUIT: + _needQuit = true; + break; default: break; } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index bab7a72a4f..7e34e4e740 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -86,6 +86,8 @@ public: bool _soundEnabled; bool _flgSoundList; + bool _needQuit; + void initObjectStates(); void setLevelStates(); void setSwallowedEggsState(); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index bc8ed26561..1e5bb28121 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -346,6 +346,12 @@ void Picture::drawRotated(int x, int y, int angle) { } void Picture::displayPicture() { + if (g_fullpipe->_needQuit) + return; + + if (0 && !Common::String(_memfilename).hasSuffix(".dib")) + return; + getData(); init(); @@ -354,7 +360,7 @@ void Picture::displayPicture() { draw(0, 0, 0, 0); - while (1) { + while (!g_fullpipe->_needQuit) { g_fullpipe->updateEvents(); g_fullpipe->_system->delayMillis(10); g_fullpipe->_system->updateScreen(); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index fa144df2eb..37b35607f0 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -124,7 +124,7 @@ bool Scene::load(MfcArchive &file) { _sceneId = file.readUint16LE(); _scstringObj = file.readPascalString(); - debug(0, "scene: <%s>", transCyrillic((byte *)_scstringObj)); + debug(0, "scene: <%s> %d", transCyrillic((byte *)_scstringObj), _sceneId); int count = file.readUint16LE(); debug(7, "scene.ani: %d", count); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index d1f9e00a6a..c4ea1cdd29 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -45,6 +45,7 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->addItem(ANI_INV_MAP, 1); #if 1 + g_fullpipe->accessScene(302); g_fullpipe->accessScene(301); g_fullpipe->accessScene(302); g_fullpipe->accessScene(303); -- cgit v1.2.3 From ba93c8d0842f4b786e6bea2725cfd03e0e132d4c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 18 Jul 2013 15:38:58 +0300 Subject: FULLPIPE: Added links to articles with floating point structure description --- engines/fullpipe/utils.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 6ca6a8e6b9..f6e19256c1 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -197,6 +197,9 @@ int MfcArchive::readCount() { double MfcArchive::readDouble() { // FIXME: This is utterly cruel and unportable + // Some articles on the matter: + // http://randomascii.wordpress.com/2013/02/07/float-precision-revisited-nine-digit-float-portability/ + // http://randomascii.wordpress.com/2012/01/11/tricks-with-the-floating-point-format/ union { struct { -- cgit v1.2.3 From 4554ac24c6c47645528f68dbed84ccfa93b62a15 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 18 Jul 2013 15:40:45 +0300 Subject: FULLPIPE: Fixed to RB bitmap rendering --- engines/fullpipe/gfx.cpp | 70 ++++++++++++++++++++++++------------------------ engines/fullpipe/gfx.h | 10 +++---- 2 files changed, 40 insertions(+), 40 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 1e5bb28121..b6c2a95065 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -318,12 +318,6 @@ void Picture::draw(int x, int y, int style, int angle) { warning("Picture:draw: alpha = %0x", _alpha); } - if (_bitmap->_type == MKTAG('C', 'B', '\0', '\0') || _bitmap->_type == MKTAG('R', 'B', '\0', '\0')) { - if (_paletteData) { - warning("Picture:draw: have palette"); - } - } - switch (style) { case 1: //flip @@ -337,7 +331,7 @@ void Picture::draw(int x, int y, int style, int angle) { warning("Picture:draw: angle = %d", angle); drawRotated(x1, y1, angle); } else { - _bitmap->putDib(x1, y1, _paletteData); + _bitmap->putDib(x1, y1, (int32 *)_paletteData); } } } @@ -349,7 +343,7 @@ void Picture::displayPicture() { if (g_fullpipe->_needQuit) return; - if (0 && !Common::String(_memfilename).hasSuffix(".dib")) + if (Common::String(_memfilename).hasSuffix(".dib")) return; getData(); @@ -372,12 +366,11 @@ void Picture::displayPicture() { } } -void Bitmap::putDib(int x, int y, byte *palette) { - int16 *curDestPtr; +void Bitmap::putDib(int x, int y, int32 *palette) { + uint16 *curDestPtr; int endy; int pos; byte *srcPtr; - uint pixel; int start1; int fillValue; int pixoffset; @@ -385,7 +378,8 @@ void Bitmap::putDib(int x, int y, byte *palette) { int pixelHigh; int pixoffset1; int leftx; - uint pixel1; + uint16 pixel; + uint16 pixel1; uint pixel1High; int bpp; uint pitch; @@ -419,48 +413,55 @@ void Bitmap::putDib(int x, int y, byte *palette) { while (1) { while (1) { while (1) { - pixel = *(int16 *)srcPtr; + pixel = *(uint16 *)srcPtr; srcPtr += 2; pixPtr = srcPtr; if (pixel) break; --endy1; - if (endy1 < _y) + if (endy1 < _y) { + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx, endy); + return; + } pos = _x; } - if (pixel == 0x100) + if (pixel == 0x100) { + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx, endy); return; + } if (pixel != 0x200) break; - pixel1 = *(int16 *)srcPtr; + pixel1 = *(uint16 *)srcPtr; srcPtr += 2; - pos += (byte)pixel1; + pos += (byte)(pixel1 && 0xff); pixel1High = pixel1 >> 8; if (pixel1High) { endy1 -= pixel1High; - if (endy1 < _y) + if (endy1 < _y) { + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, endx, endy); return; + } } } start1 = pos; - fillValue = (byte)pixel; + fillValue = (byte)(pixel & 0xff); if (!(byte)pixel) break; - pos += (byte)pixel; + pos += (byte)(pixel & 0xff); pixoffset = -start1; if (pixoffset <= 0) goto LABEL_25; - fillValue = (byte)pixel - pixoffset; + fillValue = (byte)(pixel & 0xff) - pixoffset; if (fillValue > 0) { start1 = 0; @@ -469,9 +470,8 @@ void Bitmap::putDib(int x, int y, byte *palette) { end2 = 799; if (pos <= end2 + 1 || (fillValue += end2 - pos + 1, fillValue > 0)) { if (endy1 <= endy) { - curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); - int bgcolor = *(int32 *)(palette + 4 * ((pixel >> 8) & 0xff)); - + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); + int bgcolor = palette[(pixel >> 8) & 0xff]; colorFill(curDestPtr, fillValue, bgcolor); } goto LABEL_17; @@ -495,7 +495,7 @@ void Bitmap::putDib(int x, int y, byte *palette) { continue; } if (endy1 <= endy) { - curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(endy1, start1); + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); paletteFill(curDestPtr, srcPtr2, pixelHigh, (int32 *)palette); } } @@ -524,13 +524,13 @@ void Bitmap::putDib(int x, int y, byte *palette) { if (_flags & 0x1000000) { for (int n = _y; n < endy; srcPtr1 -= pitch) { - curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, n); + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, n); copierKeyColor(curDestPtr, srcPtr1, end - start + 1, _flags & 0xff, (int32 *)palette, cb05_format); ++n; } } else { for (int n = _y; n <= endy; srcPtr1 -= pitch) { - curDestPtr = (int16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, n); + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, n); copier(curDestPtr, srcPtr1, end - start + 1, (int32 *)palette, cb05_format); ++n; } @@ -539,7 +539,7 @@ void Bitmap::putDib(int x, int y, byte *palette) { g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(start, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, end, endy); } -void Bitmap::colorFill(int16 *dest, int len, int color) { +void Bitmap::colorFill(uint16 *dest, int len, int32 color) { #if 0 if (blendMode) { if (blendMode != 1) @@ -552,10 +552,10 @@ void Bitmap::colorFill(int16 *dest, int len, int color) { #endif for (int i = 0; i < len; i++) - *dest++ = (int16)color; + *dest++ = (int16)(color & 0xffff); } -void Bitmap::paletteFill(int16 *dest, byte *src, int len, int32 *palette) { +void Bitmap::paletteFill(uint16 *dest, byte *src, int len, int32 *palette) { #if 0 if (blendMode) { if (blendMode != 1) @@ -568,10 +568,10 @@ void Bitmap::paletteFill(int16 *dest, byte *src, int len, int32 *palette) { #endif for (int i = 0; i < len; i++) - *dest++ = palette[*src++]; + *dest++ = READ_LE_UINT32(&palette[*src++]) & 0xffff; } -void Bitmap::copierKeyColor(int16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format) { +void Bitmap::copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format) { #if 0 if (blendMode) { if (blendMode == 1) { @@ -592,7 +592,7 @@ void Bitmap::copierKeyColor(int16 *dest, byte *src, int len, int keyColor, int32 if (!cb05_format) { for (int i = 0; i < len; i++) { if (*src != keyColor) - *dest = palette[*src]; + *dest = READ_LE_UINT32(&palette[*src]) & 0xffff; dest++; src++; @@ -610,7 +610,7 @@ void Bitmap::copierKeyColor(int16 *dest, byte *src, int len, int keyColor, int32 } } -void Bitmap::copier(int16 *dest, byte *src, int len, int32 *palette, bool cb05_format) { +void Bitmap::copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format) { #if 0 if (blendMode) { if (blendMode == 1) { @@ -630,7 +630,7 @@ void Bitmap::copier(int16 *dest, byte *src, int len, int32 *palette, bool cb05_f if (!cb05_format) { for (int i = 0; i < len; i++) - *dest++ = palette[*src++]; + *dest++ = READ_LE_UINT32(&palette[*src++]) & 0xffff; } else { int16 *src16 = (int16 *)src; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 13f519478a..05ec2d9049 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -42,12 +42,12 @@ struct Bitmap { int _flags; void load(Common::ReadStream *s); - void putDib(int x, int y, byte *palette); + void putDib(int x, int y, int32 *palette); - void colorFill(int16 *dest, int len, int color); - void paletteFill(int16 *dest, byte *src, int len, int32 *palette); - void copierKeyColor(int16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format); - void copier(int16 *dest, byte *src, int len, int32 *palette, bool cb05_format); + void colorFill(uint16 *dest, int len, int color); + void paletteFill(uint16 *dest, byte *src, int len, int32 *palette); + void copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format); + void copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format); }; class Picture : public MemoryObject { -- cgit v1.2.3 From ade5ad2c74218423af4693f4ceb96be960bd7b44 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 18 Jul 2013 22:14:21 +0300 Subject: FULLPIPE: Optimize bitmap rendering routine --- engines/fullpipe/gfx.cpp | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index b6c2a95065..f1f1700431 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -370,7 +370,6 @@ void Bitmap::putDib(int x, int y, int32 *palette) { uint16 *curDestPtr; int endy; int pos; - byte *srcPtr; int start1; int fillValue; int pixoffset; @@ -383,13 +382,14 @@ void Bitmap::putDib(int x, int y, int32 *palette) { uint pixel1High; int bpp; uint pitch; - byte *srcPtr1; int end; int endx; int endy1; bool cb05_format; - byte *pixPtr; - byte *srcPtr2; + uint16 *pixPtr; + uint16 *srcPtr2; + uint16 *srcPtr; + byte *srcPtr1; int start; endx = _width + _x - 1; @@ -403,7 +403,7 @@ void Bitmap::putDib(int x, int y, int32 *palette) { if (_type == MKTAG('R', 'B', '\0', '\0')) { endy1 = endy; - pixPtr = _pixels; + pixPtr = (uint16 *)_pixels; pos = _x; LABEL_17: @@ -413,15 +413,17 @@ void Bitmap::putDib(int x, int y, int32 *palette) { while (1) { while (1) { while (1) { - pixel = *(uint16 *)srcPtr; - srcPtr += 2; + pixel = *srcPtr; + + srcPtr++; pixPtr = srcPtr; + if (pixel) break; + --endy1; if (endy1 < _y) { g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx, endy); - return; } pos = _x; @@ -435,10 +437,11 @@ void Bitmap::putDib(int x, int y, int32 *palette) { if (pixel != 0x200) break; - pixel1 = *(uint16 *)srcPtr; - srcPtr += 2; + pixel1 = *srcPtr; + + srcPtr++; pos += (byte)(pixel1 && 0xff); - pixel1High = pixel1 >> 8; + pixel1High = (pixel1 >> 8) & 0xff; if (pixel1High) { endy1 -= pixel1High; @@ -452,16 +455,16 @@ void Bitmap::putDib(int x, int y, int32 *palette) { start1 = pos; fillValue = (byte)(pixel & 0xff); - if (!(byte)pixel) + if (!fillValue) break; - pos += (byte)(pixel & 0xff); + pos += fillValue; pixoffset = -start1; if (pixoffset <= 0) goto LABEL_25; - fillValue = (byte)(pixel & 0xff) - pixoffset; + fillValue -= pixoffset; if (fillValue > 0) { start1 = 0; @@ -478,10 +481,10 @@ void Bitmap::putDib(int x, int y, int32 *palette) { } } } - pixelHigh = pixel >> 8; + pixelHigh = (pixel >> 8) & 0xff; srcPtr2 = srcPtr; pos += pixelHigh; - srcPtr += 2 * ((pixelHigh + 1) >> 1); + srcPtr += (pixelHigh + 1) >> 1; pixoffset1 = -start1; if (pixoffset1 > 0) @@ -496,13 +499,13 @@ void Bitmap::putDib(int x, int y, int32 *palette) { } if (endy1 <= endy) { curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); - paletteFill(curDestPtr, srcPtr2, pixelHigh, (int32 *)palette); + paletteFill(curDestPtr, (byte *)srcPtr2, pixelHigh, (int32 *)palette); } } pixelHigh -= pixoffset1; if (pixelHigh > 0) { start1 = 0; - srcPtr2 += pixoffset1; + srcPtr2 = (uint16 *)((byte *)srcPtr2 + pixoffset1); goto LABEL_37; } } -- cgit v1.2.3 From 5add3373fe08897ce43e9c435df7213c03beffac Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 18 Jul 2013 22:14:56 +0300 Subject: FULLPIPE: Fix stupid bug in RB bitmap rendering --- engines/fullpipe/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index f1f1700431..c59ab6303f 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -440,7 +440,7 @@ void Bitmap::putDib(int x, int y, int32 *palette) { pixel1 = *srcPtr; srcPtr++; - pos += (byte)(pixel1 && 0xff); + pos += (byte)(pixel1 & 0xff); pixel1High = (pixel1 >> 8) & 0xff; if (pixel1High) { -- cgit v1.2.3 From 754858641b23cec314fc483f82caed438d929da3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 18 Jul 2013 23:40:08 +0300 Subject: FULLPIPE: Proper parameters for screen blitting --- engines/fullpipe/gfx.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index c59ab6303f..9f883279a6 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -343,12 +343,12 @@ void Picture::displayPicture() { if (g_fullpipe->_needQuit) return; - if (Common::String(_memfilename).hasSuffix(".dib")) - return; - getData(); init(); + if (!_dataSize) + return; + g_fullpipe->_backgroundSurface.fillRect(Common::Rect(0, 0, 799, 599), 0); g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(0, 0), g_fullpipe->_backgroundSurface.pitch, 0, 0, 799, 599); @@ -423,7 +423,7 @@ void Bitmap::putDib(int x, int y, int32 *palette) { --endy1; if (endy1 < _y) { - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx, endy); + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx + 1, MIN(endy + 1, 799)); return; } pos = _x; -- cgit v1.2.3 From 75c4be7469e71021d2e1cf7810a2be68ff972fac Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 19 Jul 2013 12:24:04 +0300 Subject: FULLPIPE: Split drawing of different image types. Optimize putDibCB --- engines/fullpipe/gfx.cpp | 227 ++++++++++++++++++++++++++--------------------- engines/fullpipe/gfx.h | 2 + 2 files changed, 128 insertions(+), 101 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 9f883279a6..684fce578d 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -367,6 +367,16 @@ void Picture::displayPicture() { } void Bitmap::putDib(int x, int y, int32 *palette) { + _x = x; + _y = y; + + if (_type == MKTAG('R', 'B', '\0', '\0')) + putDibRB(palette); + else + putDibCB(palette); +} + +void Bitmap::putDibRB(int32 *palette) { uint16 *curDestPtr; int endy; int pos; @@ -380,16 +390,11 @@ void Bitmap::putDib(int x, int y, int32 *palette) { uint16 pixel; uint16 pixel1; uint pixel1High; - int bpp; - uint pitch; - int end; int endx; int endy1; - bool cb05_format; uint16 *pixPtr; uint16 *srcPtr2; uint16 *srcPtr; - byte *srcPtr1; int start; endx = _width + _x - 1; @@ -401,145 +406,165 @@ void Bitmap::putDib(int x, int y, int32 *palette) { if (endy > 599) endy = 599; - if (_type == MKTAG('R', 'B', '\0', '\0')) { - endy1 = endy; - pixPtr = (uint16 *)_pixels; - pos = _x; + endy1 = endy; + pixPtr = (uint16 *)_pixels; + pos = _x; - LABEL_17: - srcPtr = pixPtr; + LABEL_17: + srcPtr = pixPtr; + while (1) { while (1) { while (1) { - while (1) { + while (1) { while (1) { - while (1) { - pixel = *srcPtr; + pixel = *srcPtr; - srcPtr++; - pixPtr = srcPtr; - - if (pixel) - break; + srcPtr++; + pixPtr = srcPtr; - --endy1; - if (endy1 < _y) { - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx + 1, MIN(endy + 1, 799)); - return; - } - pos = _x; - } + if (pixel) + break; - if (pixel == 0x100) { - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx, endy); + --endy1; + if (endy1 < _y) { + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx + 1, MIN(endy + 1, 799)); return; } + pos = _x; + } - if (pixel != 0x200) - break; + if (pixel == 0x100) { + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx, endy); + return; + } - pixel1 = *srcPtr; + if (pixel != 0x200) + break; - srcPtr++; - pos += (byte)(pixel1 & 0xff); - pixel1High = (pixel1 >> 8) & 0xff; + pixel1 = *srcPtr; - if (pixel1High) { - endy1 -= pixel1High; + srcPtr++; + pos += (byte)(pixel1 & 0xff); + pixel1High = (pixel1 >> 8) & 0xff; - if (endy1 < _y) { - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, endx, endy); - return; - } + if (pixel1High) { + endy1 -= pixel1High; + + if (endy1 < _y) { + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, endx, endy); + return; } } - start1 = pos; - fillValue = (byte)(pixel & 0xff); + } + start1 = pos; + fillValue = (byte)(pixel & 0xff); - if (!fillValue) - break; + if (!fillValue) + break; - pos += fillValue; - pixoffset = -start1; + pos += fillValue; + pixoffset = -start1; - if (pixoffset <= 0) - goto LABEL_25; + if (pixoffset <= 0) + goto LABEL_25; - fillValue -= pixoffset; + fillValue -= pixoffset; - if (fillValue > 0) { - start1 = 0; + if (fillValue > 0) { + start1 = 0; - LABEL_25: - end2 = 799; - if (pos <= end2 + 1 || (fillValue += end2 - pos + 1, fillValue > 0)) { - if (endy1 <= endy) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); - int bgcolor = palette[(pixel >> 8) & 0xff]; - colorFill(curDestPtr, fillValue, bgcolor); - } - goto LABEL_17; + LABEL_25: + end2 = 799; + if (pos <= end2 + 1 || (fillValue += end2 - pos + 1, fillValue > 0)) { + if (endy1 <= endy) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); + int bgcolor = palette[(pixel >> 8) & 0xff]; + colorFill(curDestPtr, fillValue, bgcolor); } + goto LABEL_17; } } - pixelHigh = (pixel >> 8) & 0xff; - srcPtr2 = srcPtr; - pos += pixelHigh; - srcPtr += (pixelHigh + 1) >> 1; - pixoffset1 = -start1; - - if (pixoffset1 > 0) - break; - - LABEL_37: - leftx = 799; - if (pos > leftx + 1) { - pixelHigh += leftx - pos + 1; - if (pixelHigh <= 0) - continue; - } - if (endy1 <= endy) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); - paletteFill(curDestPtr, (byte *)srcPtr2, pixelHigh, (int32 *)palette); - } } - pixelHigh -= pixoffset1; - if (pixelHigh > 0) { - start1 = 0; - srcPtr2 = (uint16 *)((byte *)srcPtr2 + pixoffset1); - goto LABEL_37; + pixelHigh = (pixel >> 8) & 0xff; + srcPtr2 = srcPtr; + pos += pixelHigh; + srcPtr += (pixelHigh + 1) >> 1; + pixoffset1 = -start1; + + if (pixoffset1 > 0) + break; + + LABEL_37: + leftx = 799; + if (pos > leftx + 1) { + pixelHigh += leftx - pos + 1; + if (pixelHigh <= 0) + continue; + } + if (endy1 <= endy) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); + paletteFill(curDestPtr, (byte *)srcPtr2, pixelHigh, (int32 *)palette); } } + pixelHigh -= pixoffset1; + if (pixelHigh > 0) { + start1 = 0; + srcPtr2 = (uint16 *)((byte *)srcPtr2 + pixoffset1); + goto LABEL_37; + } } + error("Unhandled image type"); +} + +void Bitmap::putDibCB(int32 *palette) { + uint16 *curDestPtr; + int endx; + int endy; + int bpp; + uint pitch; + bool cb05_format; + byte *srcPtr; + int start; + + endx = _width + _x - 1; + endy = _height + _y - 1; + + if (_x > 799 || _width + _x - 1 < 0 || _y > 599 || endy < 0) + return; + + if (endy > 599) + endy = 599; + + if (endx > 799) + endx = 799; + cb05_format = (_type == MKTAG('C', 'B', '\05', 'e')); + bpp = cb05_format ? 2 : 1; - end = _width + _x - 1; - pitch = (bpp * (endx - _x + 1) + 3) & 0xFFFFFFFC; + pitch = (bpp * _width + 3) & 0xFFFFFFFC; + + srcPtr = &_pixels[pitch * (endy - _y)]; + start = _x; - srcPtr1 = &_pixels[pitch * (endy - _y)]; if (_x < 0) { - srcPtr1 += bpp * -_x; + srcPtr += bpp * -_x; start = 0; } - if (endx > 799) - end = 799; - if (_flags & 0x1000000) { - for (int n = _y; n < endy; srcPtr1 -= pitch) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, n); - copierKeyColor(curDestPtr, srcPtr1, end - start + 1, _flags & 0xff, (int32 *)palette, cb05_format); - ++n; + for (int y = _y; y < endy; srcPtr -= pitch, y++) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, y); + copierKeyColor(curDestPtr, srcPtr, endx - start + 1, _flags & 0xff, (int32 *)palette, cb05_format); } } else { - for (int n = _y; n <= endy; srcPtr1 -= pitch) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, n); - copier(curDestPtr, srcPtr1, end - start + 1, (int32 *)palette, cb05_format); - ++n; + for (int y = _y; y <= endy; srcPtr -= pitch, y++) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, y); + copier(curDestPtr, srcPtr, endx - start + 1, (int32 *)palette, cb05_format); } } - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(start, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, end, endy); + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(start, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, endx, endy); } void Bitmap::colorFill(uint16 *dest, int len, int32 color) { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 05ec2d9049..a0f18597f0 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -43,6 +43,8 @@ struct Bitmap { void load(Common::ReadStream *s); void putDib(int x, int y, int32 *palette); + void putDibRB(int32 *palette); + void putDibCB(int32 *palette); void colorFill(uint16 *dest, int len, int color); void paletteFill(uint16 *dest, byte *src, int len, int32 *palette); -- cgit v1.2.3 From 0c218f01444b8917924ce38d5fafc20890d817fa Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 19 Jul 2013 16:24:07 +0300 Subject: FULLPIPE: Refactored putDibRB to a human-readable state. --- engines/fullpipe/gfx.cpp | 163 +++++++++++++++++++---------------------------- 1 file changed, 64 insertions(+), 99 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 684fce578d..3c0f51550c 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -354,6 +354,10 @@ void Picture::displayPicture() { draw(0, 0, 0, 0); + g_fullpipe->updateEvents(); + g_fullpipe->_system->delayMillis(10); + g_fullpipe->_system->updateScreen(); + while (!g_fullpipe->_needQuit) { g_fullpipe->updateEvents(); g_fullpipe->_system->delayMillis(10); @@ -379,23 +383,14 @@ void Bitmap::putDib(int x, int y, int32 *palette) { void Bitmap::putDibRB(int32 *palette) { uint16 *curDestPtr; int endy; - int pos; + int x; int start1; - int fillValue; - int pixoffset; - int end2; - int pixelHigh; - int pixoffset1; - int leftx; + int fillLen; uint16 pixel; - uint16 pixel1; - uint pixel1High; int endx; - int endy1; - uint16 *pixPtr; + int y; uint16 *srcPtr2; uint16 *srcPtr; - int start; endx = _width + _x - 1; endy = _height + _y - 1; @@ -406,115 +401,85 @@ void Bitmap::putDibRB(int32 *palette) { if (endy > 599) endy = 599; - endy1 = endy; - pixPtr = (uint16 *)_pixels; - pos = _x; - - LABEL_17: - srcPtr = pixPtr; - while (1) { - while (1) { - while (1) { - while (1) { - while (1) { - pixel = *srcPtr; - - srcPtr++; - pixPtr = srcPtr; - - if (pixel) - break; - - --endy1; - if (endy1 < _y) { - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx + 1, MIN(endy + 1, 799)); - return; - } - pos = _x; - } + if (endx > 799) + endx = 799; - if (pixel == 0x100) { - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx, endy); - return; - } + y = endy; + srcPtr = (uint16 *)_pixels; - if (pixel != 0x200) - break; + bool breakup = false; + for (y = endy; y >= _y && !breakup; y--) { + x = _x; - pixel1 = *srcPtr; + while ((pixel = *srcPtr++) != 0) { + if (pixel == 0x100) { + breakup = true; + break; + } - srcPtr++; - pos += (byte)(pixel1 & 0xff); - pixel1High = (pixel1 >> 8) & 0xff; + while (pixel == 0x200 && y >= _y) { + uint16 value = *srcPtr++; - if (pixel1High) { - endy1 -= pixel1High; + x += (byte)(value & 0xff); + y -= (byte)((value >> 8) & 0xff); - if (endy1 < _y) { - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, endx, endy); - return; - } - } - } - start1 = pos; - fillValue = (byte)(pixel & 0xff); + pixel = *srcPtr++; + } - if (!fillValue) - break; + if (y < _y || pixel == 0) + break; - pos += fillValue; - pixoffset = -start1; + start1 = x; + fillLen = (byte)(pixel & 0xff); - if (pixoffset <= 0) - goto LABEL_25; + if (fillLen) { + x += fillLen; - fillValue -= pixoffset; + if (start1 < 0) { + fillLen += start1; - if (fillValue > 0) { - start1 = 0; + if (fillLen > 0) + start1 = 0; + } - LABEL_25: - end2 = 799; - if (pos <= end2 + 1 || (fillValue += end2 - pos + 1, fillValue > 0)) { - if (endy1 <= endy) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); + if (fillLen > 0 || start1 >= 0) { + if (x <= 799 + 1 || (fillLen += 799 - x + 1, fillLen > 0)) { + if (y <= endy) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y); int bgcolor = palette[(pixel >> 8) & 0xff]; - colorFill(curDestPtr, fillValue, bgcolor); + colorFill(curDestPtr, fillLen, bgcolor); } - goto LABEL_17; } } - } - pixelHigh = (pixel >> 8) & 0xff; - srcPtr2 = srcPtr; - pos += pixelHigh; - srcPtr += (pixelHigh + 1) >> 1; - pixoffset1 = -start1; + } else { + fillLen = (pixel >> 8) & 0xff; + srcPtr2 = srcPtr; + x += fillLen; + srcPtr += (fillLen + 1) >> 1; + + if (start1 < 0) { + fillLen += start1; + if (fillLen > 0) { + srcPtr2 = (uint16 *)((byte *)srcPtr2 - start1); + start1 = 0; + } + } - if (pixoffset1 > 0) - break; + if (x > 799 + 1) { + fillLen += 799 - x + 1; + if (fillLen <= 0) + continue; + } - LABEL_37: - leftx = 799; - if (pos > leftx + 1) { - pixelHigh += leftx - pos + 1; - if (pixelHigh <= 0) - continue; - } - if (endy1 <= endy) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, endy1); - paletteFill(curDestPtr, (byte *)srcPtr2, pixelHigh, (int32 *)palette); + if (y <= endy) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y); + paletteFill(curDestPtr, (byte *)srcPtr2, fillLen, (int32 *)palette); + } } } - pixelHigh -= pixoffset1; - if (pixelHigh > 0) { - start1 = 0; - srcPtr2 = (uint16 *)((byte *)srcPtr2 + pixoffset1); - goto LABEL_37; - } } - error("Unhandled image type"); + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx + 1, endy + 1); } void Bitmap::putDibCB(int32 *palette) { -- cgit v1.2.3 From cf35f34454ad1f9224481e8cfe027d8fae4b8e76 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 19 Jul 2013 17:59:03 +0300 Subject: FULLPIPE: Beginning of scene drawing --- engines/fullpipe/gfx.cpp | 8 +++++--- engines/fullpipe/gfx.h | 4 ++-- engines/fullpipe/scene.cpp | 12 +++++++++--- engines/fullpipe/scene.h | 1 - engines/fullpipe/stateloader.cpp | 1 - 5 files changed, 16 insertions(+), 10 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 3c0f51550c..71a07d0019 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -51,13 +51,13 @@ Background::Background() { _bigPictureArray1Count = 0; _bigPictureArray2Count = 0; _bigPictureArray = 0; - _stringObj = 0; - _colorMemoryObj = 0; + _bgname = 0; + _palette = 0; } bool Background::load(MfcArchive &file) { debug(5, "Background::load()"); - _stringObj = file.readPascalString(); + _bgname = file.readPascalString(); int count = file.readUint16LE(); @@ -244,7 +244,9 @@ bool Picture::load(MfcArchive &file) { debug(5, "Picture::load: <%s>", _memfilename); +#if 0 displayPicture(); +#endif return true; } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index a0f18597f0..e4989cd9e8 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -125,11 +125,11 @@ class Background : public CObject { CPtrList _picObjList; protected: - char *_stringObj; + char *_bgname; int _x; int _y; int16 _messageQueueId; - MemoryObject *_colorMemoryObj; + MemoryObject *_palette; int _bigPictureArray1Count; int _bigPictureArray2Count; BigPicture ***_bigPictureArray; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 37b35607f0..81fa91cca0 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -180,16 +180,16 @@ bool Scene::load(MfcArchive &file) { _libHandle = g_fullpipe->_currArchive; - if (_picObjList.size() > 0 && _stringObj && strlen(_stringObj) > 1) { + if (_picObjList.size() > 0 && _bgname && strlen(_bgname) > 1) { char fname[260]; - strcpy(fname, _stringObj); + strcpy(fname, _bgname); strcpy(strrchr(fname, '.') + 1, "col"); MemoryObject *col = new MemoryObject(); col->loadFile(fname); - _colorMemoryObj = col; + _palette = col; } char *shdname = genFileName(0, _sceneId, "shd"); @@ -260,6 +260,12 @@ void Scene::updateScrolling(int par) { } void Scene::drawContent(int minPri, int maxPri, bool drawBG) { + if (!_picObjList.size() && !_bigPictureArray1Count) + return; + + if (_palette) { + warning("Scene palette is ignored"); + } } } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 1a76d31638..cdb5cf2bb2 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -26,7 +26,6 @@ namespace Fullpipe { class Scene : public Background { - Background _bg; CPtrList _staticANIObjectList1; CPtrList _staticANIObjectList2; CPtrList _messageQueueList; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index c4ea1cdd29..d1f9e00a6a 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -45,7 +45,6 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->addItem(ANI_INV_MAP, 1); #if 1 - g_fullpipe->accessScene(302); g_fullpipe->accessScene(301); g_fullpipe->accessScene(302); g_fullpipe->accessScene(303); -- cgit v1.2.3 From 8f0ff728e49d2b31c392471881db2bb20829d7ab Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 19 Jul 2013 18:13:00 +0300 Subject: FULLPIPE: Rename _stringObj to relevant names in order to avoid ambiguity --- engines/fullpipe/gfx.cpp | 2 +- engines/fullpipe/gfx.h | 2 +- engines/fullpipe/objects.h | 8 ++++---- engines/fullpipe/scene.cpp | 4 ++-- engines/fullpipe/scene.h | 2 +- engines/fullpipe/stateloader.cpp | 20 ++++++++++---------- engines/fullpipe/statics.cpp | 4 ++-- engines/fullpipe/statics.h | 2 +- 8 files changed, 22 insertions(+), 22 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 71a07d0019..10bf10543a 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -181,7 +181,7 @@ bool GameObject::load(MfcArchive &file) { _id = file.readUint16LE(); - _stringObj = file.readPascalString(); + _objectName = file.readPascalString(); _ox = file.readUint32LE(); _oy = file.readUint32LE(); _priority = file.readUint16LE(); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index e4989cd9e8..a4f9d8fe2c 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -97,7 +97,7 @@ class GameObject : public CObject { int _field_8; int16 _flags; int16 _id; - char *_stringObj; + char *_objectName; int _ox; int _oy; int _priority; diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 0258ed4552..1d84305a96 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -47,7 +47,7 @@ class GameProject : public CObject { class MessageQueue : public CObject { int _id; int _flags; - char *_stringObj; + char *_queueName; int16 _dataId; int16 _field_12; int _field_14; @@ -78,7 +78,7 @@ class CInteraction : public CObject { int _sceneId; int _field_28; int _flags; - char *_stringObj; + char *_actionName; public: CInteraction(); @@ -222,7 +222,7 @@ class CGameVar : public CObject { CGameVar *_parentVarObj; CGameVar *_subVars; CGameVar *_field_14; - char *_stringObj; + char *_varName; VarValue _value; int _varType; @@ -292,7 +292,7 @@ class CGameLoader : public CObject { class CObjstateCommand : public CObject { ExCommand _cmd; - char *_stringObj; + char *_objCommandName; int _value; public: diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 81fa91cca0..2ce93eefe4 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -123,8 +123,8 @@ bool Scene::load(MfcArchive &file) { _sceneId = file.readUint16LE(); - _scstringObj = file.readPascalString(); - debug(0, "scene: <%s> %d", transCyrillic((byte *)_scstringObj), _sceneId); + _sceneName = file.readPascalString(); + debug(0, "scene: <%s> %d", transCyrillic((byte *)_sceneName), _sceneId); int count = file.readUint16LE(); debug(7, "scene.ani: %d", count); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index cdb5cf2bb2..639bff0c93 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -33,7 +33,7 @@ class Scene : public Background { Shadows *_shadows; SoundList *_soundList; int16 _sceneId; - char *_scstringObj; + char *_sceneName; int _field_BC; NGIArchive *_libHandle; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index d1f9e00a6a..f3cf644b9a 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -307,7 +307,7 @@ bool CInteraction::load(MfcArchive &file) { _yOffs = file.readUint32LE(); _sceneId = file.readUint32LE(); _flags = file.readUint32LE(); - _stringObj = file.readPascalString(); + _actionName = file.readPascalString(); _messageQueue = (MessageQueue *)file.readClass(); @@ -332,7 +332,7 @@ bool MessageQueue::load(MfcArchive &file) { assert(g_fullpipe->_gameProjectVersion >= 12); - _stringObj = file.readPascalString(); + _queueName = file.readPascalString(); for (int i = 0; i < count; i++) { CObject *tmp = file.readClass(); @@ -411,7 +411,7 @@ bool CObjstateCommand::load(MfcArchive &file) { _value = file.readUint32LE(); - _stringObj = file.readPascalString(); + _objCommandName = file.readPascalString(); return true; } @@ -447,14 +447,14 @@ CGameVar::CGameVar() { } bool CGameVar::load(MfcArchive &file) { - _stringObj = file.readPascalString(); + _varName = file.readPascalString(); _varType = file.readUint32LE(); debugN(6, "[%03d] ", file.getLevel()); for (int i = 0; i < file.getLevel(); i++) debugN(6, " "); - debugN(6, "<%s>: ", transCyrillic((byte *)_stringObj)); + debugN(6, "<%s>: ", transCyrillic((byte *)_varName)); switch (_varType) { case 0: @@ -489,7 +489,7 @@ CGameVar *CGameVar::getSubVarByName(const char *name) { if (_subVars != 0) { sv = _subVars; - for (;sv && scumm_stricmp(sv->_stringObj, name); sv = sv->_nextVarObj) + for (;sv && scumm_stricmp(sv->_varName, name); sv = sv->_nextVarObj) ; } return sv; @@ -510,8 +510,8 @@ bool CGameVar::setSubVarAsInt(const char *name, int value) { var = new CGameVar(); var->_varType = 0; var->_value.intValue = value; - var->_stringObj = (char *)calloc(strlen(name) + 1, 1); - strcpy(var->_stringObj, name); + var->_varName = (char *)calloc(strlen(name) + 1, 1); + strcpy(var->_varName, name); return addSubVar(var); } @@ -534,8 +534,8 @@ CGameVar *CGameVar::addSubVarAsInt(const char *name, int value) { var->_varType = 0; var->_value.intValue = value; - var->_stringObj = (char *)calloc(strlen(name) + 1, 1); - strcpy(var->_stringObj, name); + var->_varName = (char *)calloc(strlen(name) + 1, 1); + strcpy(var->_varName, name); return (addSubVar(var) != 0) ? var : 0; } diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 4a2616ca91..cc51691a44 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -144,8 +144,8 @@ bool Statics::load(MfcArchive &file) { _staticsId = file.readUint16LE(); - _stringObj = file.readPascalString(); - debug(7, "statics: <%s>", transCyrillic((byte *)_stringObj)); + _staticsName = file.readPascalString(); + debug(7, "statics: <%s>", transCyrillic((byte *)_staticsName)); _picture = new Picture(); _picture->load(file); diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 3f16878747..5b27b547c5 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -66,7 +66,7 @@ class Statics : public DynamicPhase { int16 _staticsId; int16 _field_86; - char *_stringObj; + char *_staticsName; Picture *_picture; public: -- cgit v1.2.3 From 69fc7a38bb387c3590d9a32855442e1579ff8a4e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 20 Jul 2013 01:00:26 +0300 Subject: FULLPIPE: Continued scene drawing --- engines/fullpipe/fullpipe.h | 2 ++ engines/fullpipe/gfx.cpp | 4 ++-- engines/fullpipe/scene.cpp | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 7e34e4e740..26a5a62693 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -86,6 +86,8 @@ public: bool _soundEnabled; bool _flgSoundList; + Common::Rect _sceneRect; + bool _needQuit; void initObjectStates(); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 10bf10543a..9cef7e1408 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -373,8 +373,8 @@ void Picture::displayPicture() { } void Bitmap::putDib(int x, int y, int32 *palette) { - _x = x; - _y = y; + _x = x - g_fullpipe->_sceneRect.left; + _y = y - g_fullpipe->_sceneRect.top; if (_type == MKTAG('R', 'B', '\0', '\0')) putDibRB(palette); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 2ce93eefe4..717eb0cdd5 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -266,6 +266,20 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBG) { if (_palette) { warning("Scene palette is ignored"); } + + if (_picObjList.size() > 2) { // We need to z-sort them + // Sort by priority + warning("Scene::drawContent: STUB sort by priority"); + } + + if (minPri == -1 && _picObjList.size()) + minPri = ((PictureObject *)_picObjList.back())->_priority - 1; + + if (maxPri == -1) + maxPri = 60000; + + if (drawBg && _bigPictureArray1Count && _picObjList.size()) { + } } } // End of namespace Fullpipe -- cgit v1.2.3 From 3ab56b0cc8b0d6967aad3ac7dc9bfa54928ae199 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 20 Jul 2013 01:01:05 +0300 Subject: FULLPIPE: Initial code for scene switcher. Does not even compile. --- engines/fullpipe/scenes.cpp | 673 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 673 insertions(+) create mode 100644 engines/fullpipe/scenes.cpp (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp new file mode 100644 index 0000000000..f04291b2b9 --- /dev/null +++ b/engines/fullpipe/scenes.cpp @@ -0,0 +1,673 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +namespace Fullpipe { + +signed int sceneSwitcher(EntranceInfo *a1, int a2) { + EntranceInfo *entrance; // ebx@1 + Scene *scene; // esi@1 + CGameVar *sceneVar; // eax@21 + signed int result; // eax@2 + POINT *v6; // eax@3 + int v7; // eax@3 + CInventory2 *v8; // eax@4 + CInventory2 *v9; // eax@4 + int v10; // edi@8 + Sound *v11; // eax@9 + int v12; // ST08_4@12 + int v13; // eax@12 + Scene *v14; // edi@12 + int v15; // eax@13 + int v16; // eax@13 + int v17; // eax@13 + int v18; // eax@13 + CNode *v19; // edi@16 + CNode *v20; // eax@17 + Scene *v21; // eax@18 + PictureObject *v22; // eax@18 + POINT point; // [sp+Ch] [bp-8h]@3 + + entrance = a1; + scene = accessScene(a1->_sceneId); + + if (!scene) + return 0; + + v6 = PictureObject_getDimensions((PictureObject *)scene->bg.picObjList.m_pNodeHead->data, &point); + g_sceneWidth = v6->x; + v7 = v6->y; + g_sceneHeight = v7; + g_sceneRect.top = 0; + g_sceneRect.left = 0; + g_sceneRect.right = 799; + g_sceneRect.bottom = 599; + scene->bg.x = 0; + scene->bg.y = 0; + (*(void (__stdcall **)(_DWORD, _DWORD, int))(g_aniMan->GameObject.CObject.vmt + offsetof(GameObjectVmt, setOXY)))(0, 0, a2); + (*(void (**)(void))(g_aniMan->GameObject.CObject.vmt + offsetof(GameObjectVmt, clearFlags)))(); + g_aniMan->callback2 = 0; + g_aniMan->callback1 = 0; + g_aniMan->shadowsOn = 1; + g_scrollSpeed = 8; + savesEnabled = 1; + updateFlag = 1; + flgCanOpenMap = 1; + if (entrance->sceneId == SC_DBGMENU) { + g_inventoryScene = 0; + } else { + CGameLoader_loadScene(g_gameLoader, SC_INV); + v8 = getGameLoaderInventory(); + CInventory2_rebuildItemRects(v8); + v9 = getGameLoaderInventory(); + g_inventoryScene = CInventory2_getScene(v9); + } + if (soundEnabled) { + if (scene->soundList) { + g_currSoundListCount = 2; + v10 = 0; + g_currSoundList1 = accessScene(SC_COMMON)->soundList; + for (*(&g_currSoundList1 + 1) = scene->soundList; v10 < SoundList_getCount(scene->soundList); ++v10) { + v11 = SoundList_getSoundByItemByIndex(scene->soundList, v10); + (*(void (__thiscall **)(Sound *))(v11->MemoryObject.obj.vmt + offsetof(SoundVmt, updateVolume)))(v11); + } + } else { + g_currSoundListCount = 1; + g_currSoundList1 = accessScene(SC_COMMON)->soundList; + } + } + v12 = scene->sceneId; + v13 = (int)getGameLoaderInteractionController(); + CInteractionController_sortInteractions(v13, v12); + v14 = g_currentScene; + g_currentScene = v4; + Scene_addStaticANIObject(scene, (int)g_aniMan, 1); + g_scene2 = v4; + g_aniMan->movementObj = 0; + g_aniMan->staticsObj = StaticANIObject_getStaticsById(g_aniMan, ST_MAN_EMPTY); + (*(void (__stdcall **)(_DWORD))(g_aniMan->GameObject.CObject.vmt + 24))(0); + if (g_aniMan) { + g_aniMan2 = (int)g_aniMan; + v15 = getSc2MotionControllerBySceneId(LOWORD(entrance->sceneId)); + initMovGraph2((void *)v15); + v16 = getSc2MotionControllerBySceneId(LOWORD(entrance->sceneId)); + (*(void (__thiscall **)(int, StaticANIObject *))(*(_DWORD *)v16 + offsetof(CMotionControllerVmt, addObject)))(v16, g_aniMan); + v17 = getSc2MotionControllerBySceneId(LOWORD(entrance->sceneId)); + (*(void (__thiscall **)(int))(*(_DWORD *)v17 + offsetof(CMotionControllerVmt, setField8)))(v17); + v18 = (int)getGameLoaderInteractionController(); + CInteractionController_enableFlag24(v18); + input_setInputDisabled(0); + } else { + g_aniMan2 = 0; + } + g_currentScene = v14; + Scene_setPictureObjectsFlag4((int)scene); + if (scene->staticANIObjectList1.m_nCount) { + v19 = scene->staticANIObjectList1.m_pNodeHead; + while (v19) { + v20 = v19; + v19 = v19->pNext; + GameObject_setFlags((GameObject *)v20->data, *((_WORD *)v20->data + 6) & 0xFE7F); + } + } + v21 = accessScene(SC_INV); + v22 = Scene_getPictureObjectById(v21, PIC_INV_MENU, 0); + GameObject_setFlags(&v22->GameObject, v22->GameObject.flags & 0xFFFB); + removeMessageHandler(2, -1); + g_updateScreenCallback = 0; + + switch (entrance->sceneId) { + case SC_INTRO1: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_INTRO1"); + scene->preloadMovements(sceneVar); + sceneIntro_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_INTRO1"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandlerIntro, 2); + _updateCursorCallback = sceneIntro_updateCursor; + result = 1; + break; + + case SC_1: + scene01_sub_40E160(); + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_1"); + scene->preloadMovements(sceneVar); + scene01_initScene(scene, entrance->field_4); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_1"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler01, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_2: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_2"); + scene->preloadMovements(sceneVar); + scene02_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_2"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler02, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_3: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_3"); + scene->preloadMovements(sceneVar); + scene03_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_3"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler03, 2); + j_Scene_sc03_sub_40F160(scene); + g_updateCursorCallback = scene03_updateCursor; + result = 1; + break; + + case SC_4: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_4"); + scene->preloadMovements(sceneVar); + scene04_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_4"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler04, 2, 2); + g_updateCursorCallback = scene04_updateCursor; + result = 1; + break; + + case SC_5: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_5"); + scene->preloadMovements(sceneVar); + scene05_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_5"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler05, 2, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_6: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_6"); + scene->preloadMovements(sceneVar); + scene06_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_6"); + setSceneMusicParameters(sceneVar); + sub_415300(); + insertMessageHandler(sceneHandler06, 2, 2); + g_updateCursorCallback = scene06_updateCursor; + result = 1; + break; + + case SC_7: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_7"); + scene->preloadMovements(sceneVar); + scene07_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_7"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler07, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_8: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_8"); + scene->preloadMovements(sceneVar); + scene08_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_8"); + setSceneMusicParameters(sceneVar); + sub_416890(); + addMessageHandler(sceneHandler08, 2); + g_updateCursorCallback = scene08_updateCursor; + result = 1; + break; + + case SC_9: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_9"); + scene->preloadMovements(sceneVar); + scene09_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_9"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler09, 2, 2); + g_updateCursorCallback = scene09_updateCursor; + result = 1; + break; + + case SC_10: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_10"); + scene->preloadMovements(sceneVar); + scene10_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_10"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler10, 2, 2); + g_updateCursorCallback = scene10_updateCursor; + result = 1; + break; + + case SC_11: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_11"); + scene->preloadMovements(sceneVar); + scene11_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_11"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler11, 2, 2); + scene11_sub_41A980(); + g_updateCursorCallback = scene11_updateCursor; + result = 1; + break; + + case SC_12: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_12"); + scene->preloadMovements(sceneVar); + scene12_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_12"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler12, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_13: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_13"); + scene->preloadMovements(sceneVar); + scene13_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_13"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler13, 2, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_14: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_14"); + scene->preloadMovements(sceneVar); + scene14_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_14"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler14, 2, 2); + scene14_sub_41D2B0(); + g_updateCursorCallback = scene14_updateCursor; + result = 1; + break; + + case SC_15: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_15"); + scene->preloadMovements(sceneVar); + scene15_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_15"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler15, 2, 2); + g_updateCursorCallback = scene15_updateCursor; + result = 1; + break; + + case SC_16: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_16"); + scene->preloadMovements(sceneVar); + scene16_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_16"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler16, 2); + g_updateCursorCallback = scene16_updateCursor; + result = 1; + break; + + case SC_17: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_17"); + scene->preloadMovements(sceneVar); + scene17_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_17"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler17, 2); + scene17_sub_41F060(); + g_updateCursorCallback = scene17_updateCursor; + result = 1; + break; + + case SC_18: + sub_40E1B0(); + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_18"); + scene->preloadMovements(sceneVar); + sub_4062D0(); + if (dword_476C38) + scene18_initScene1(scene); + else + scene18_initScene2(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_18"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler18, 2, 2); + g_updateCursorCallback = scene18_updateCursor; + result = 1; + break; + + case SC_19: + if (!g_scene3) { + g_scene3 = accessScene(SC_18); + getGameLoader()->loadScene(SC_18); + scene18_initScene2(g_scene3); + sub_40C5F0(); + scene19_sub_420B10(g_scene3, entrance->field_4); + dword_476C38 = 1; + } + sub_40C650(); + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_19"); + scene->preloadMovements(sceneVar); + sub_4062D0(); + if (dword_476C38) + scene18_initScene1(scene); + else + scene19_initScene2(); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_19"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler19, 2); + scene19_sub_4211D0(scene); + g_updateCursorCallback = scene19_updateCursor; + result = 1; + break; + + case SC_20: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_20"); + scene->preloadMovements(sceneVar); + scene20_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_20"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler20, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_21: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_21"); + scene->preloadMovements(sceneVar); + scene21_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_21"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler21, 2, 2); + g_updateCursorCallback = scene21_updateCursor; + result = 1; + break; + + case SC_22: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_22"); + scene->preloadMovements(sceneVar); + scene22_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_22"); + setSceneMusicParameters(sceneVar); + scene22_sub_4228A0(); + insertMessageHandler(sceneHandler22, 2, 2); + g_updateCursorCallback = scene22_updateCursor; + result = 1; + break; + + case SC_23: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_23"); + scene->preloadMovements(sceneVar); + scene23_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_23"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler23, 2, 2); + scene23_sub_423B00(); + g_updateCursorCallback = scene23_updateCursor; + result = 1; + break; + + case SC_24: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_24"); + scene->preloadMovements(sceneVar); + scene24_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_24"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler24, 2); + scene24_sub_423DD0(); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_25: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_25"); + scene->preloadMovements(sceneVar); + scene25_initScene(scene, entrance->field_4); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_25"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler25, 2); + scene25_sub_4253B0(scene, entrance->field_4); + g_updateCursorCallback = scene25_updateCursor; + result = 1; + break; + + case SC_26: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_26"); + scene->preloadMovements(sceneVar); + scene26_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_26"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler26, 2, 2); + scene26_sub_426140(scene); + g_updateCursorCallback = scene26_updateCursor; + result = 1; + break; + + case SC_27: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_27"); + scene->preloadMovements(sceneVar); + scene27_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_27"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler27, 2); + g_updateCursorCallback = scene27_updateCursor; + result = 1; + break; + + case SC_28: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_28"); + scene->preloadMovements(sceneVar); + scene28_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_28"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler28, 2, 2); + g_updateCursorCallback = scene28_updateCursor; + result = 1; + break; + + case SC_29: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_29"); + scene->preloadMovements(sceneVar); + scene29_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_29"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler29, 2); + g_updateCursorCallback = scene29_updateCursor; + result = 1; + break; + + case SC_30: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_30"); + scene->preloadMovements(sceneVar); + scene30_initScene(scene, entrance->field_4); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_30"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler30, 2); + g_updateCursorCallback = scene30_updateCursor; + result = 1; + break; + + case SC_31: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_31"); + scene->preloadMovements(sceneVar); + scene31_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_31"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler31, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_32: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_32"); + scene->preloadMovements(sceneVar); + scene32_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_32"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler32, 2, 2); + scene32_sub_42C5C0(); + g_updateCursorCallback = scene32_updateCursor; + result = 1; + break; + + case SC_33: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_33"); + scene->preloadMovements(sceneVar); + scene33_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_33"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler33, 2, 2); + scene33_sub_42CEF0(); + g_updateCursorCallback = scene33_updateCursor; + result = 1; + break; + + case SC_34: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_34"); + scene->preloadMovements(sceneVar); + scene34_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_34"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler34, 2, 2); + scene34_sub_42DEE0(); + g_updateCursorCallback = scene34_updateCursor; + result = 1; + break; + + case SC_35: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_35"); + scene->preloadMovements(sceneVar); + scene35_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_35"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler35, 2, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_36: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_36"); + scene->preloadMovements(sceneVar); + scene36_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_36"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler36, 2); + g_updateCursorCallback = scene36_updateCursor; + result = 1; + break; + + case SC_37: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_37"); + scene->preloadMovements(sceneVar); + scene37_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_37"); + setSceneMusicParameters(sceneVar); + insertMessageHandler(sceneHandler37, 2, 2); + g_updateCursorCallback = scene37_updateCursor; + result = 1; + break; + + case SC_38: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_38"); + scene->preloadMovements(sceneVar); + scene38_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_38"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandler38, 2); + g_updateCursorCallback = defaultUpdateCursorCallback; + result = 1; + break; + + case SC_FINAL1: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_FINAL1"); + scene->preloadMovements(sceneVar); + sceneFinal1_initScene(); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_FINAL1"); + setSceneMusicParameters(sceneVar); + addMessageHandler(sceneHandlerFinal1, 2); + g_updateCursorCallback = sceneFinal1_updateCursor; + result = 1; + break; + + case SC_DBGMENU: + sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_DBGMENU"); + scene->preloadMovements(sceneVar); + sceneDbgMenu_initScene(scene); + _behaviorManager->initBehavior(scene, sceneVar); + scene->initObjectCursors("SC_DBGMENU"); + addMessageHandler(sceneHandlerDbgMenu, 2); + result = 1; + break; + + default: + _behaviorManager->initBehavior(0, 0); + result = 1; + break; + } + + return result; +} + +} // End of namespace Fullpipe -- cgit v1.2.3 From c76bec26467efc8cad4554cf44903c9f927d3a8c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 20 Jul 2013 16:08:05 +0300 Subject: FULLPIPE: Further work on sceneSwitcher() --- engines/fullpipe/fullpipe.cpp | 14 ++- engines/fullpipe/fullpipe.h | 8 ++ engines/fullpipe/gfx.cpp | 13 +++ engines/fullpipe/gfx.h | 3 + engines/fullpipe/messagequeue.cpp | 90 +++++++++++++++++++ engines/fullpipe/messagequeue.h | 67 ++++++++++++++ engines/fullpipe/module.mk | 1 + engines/fullpipe/objects.h | 21 +---- engines/fullpipe/scene.cpp | 38 +++++++- engines/fullpipe/scene.h | 3 + engines/fullpipe/scenes.cpp | 179 +++++++++++++++----------------------- engines/fullpipe/stateloader.cpp | 42 ++------- engines/fullpipe/statics.cpp | 69 +++++++++++++++ engines/fullpipe/statics.h | 14 ++- engines/fullpipe/utils.cpp | 1 + 15 files changed, 396 insertions(+), 167 deletions(-) create mode 100644 engines/fullpipe/messagequeue.cpp create mode 100644 engines/fullpipe/messagequeue.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 305443249f..fb8a141646 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -30,6 +30,7 @@ #include "fullpipe/fullpipe.h" #include "fullpipe/objectnames.h" #include "fullpipe/objects.h" +#include "fullpipe/messagequeue.h" namespace Fullpipe { @@ -58,21 +59,32 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _needQuit = false; + _aniMan = 0; + _scene2 = 0; + + _globalMessageQueueList = 0; + g_fullpipe = this; } FullpipeEngine::~FullpipeEngine() { delete _rnd; + delete _globalMessageQueueList; } -Common::Error FullpipeEngine::run() { +void FullpipeEngine::initialize() { + _globalMessageQueueList = new GlobalMessageQueueList; +} +Common::Error FullpipeEngine::run() { const Graphics::PixelFormat format(2, 5, 6, 5, 0, 11, 5, 0, 0); // Initialize backend initGraphics(800, 600, true, &format); _backgroundSurface.create(800, 600, format); + initialize(); + _isSaveAllowed = false; loadGam("fullpipe.gam"); diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 26a5a62693..31f44fda76 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -49,6 +49,8 @@ class CGameVar; class CInventory2; class Scene; class NGIArchive; +class StaticANIObject; +class GlobalMessageQueueList; class FullpipeEngine : public ::Engine { protected: @@ -59,6 +61,8 @@ public: FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc); virtual ~FullpipeEngine(); + void initialize(); + // Detection related functions const ADGameDescription *_gameDescription; const char *getGameId() const; @@ -87,6 +91,10 @@ public: bool _flgSoundList; Common::Rect _sceneRect; + Scene *_scene2; + StaticANIObject *_aniMan; + + GlobalMessageQueueList *_globalMessageQueueList; bool _needQuit; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 9cef7e1408..241b799168 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -162,6 +162,12 @@ bool PictureObject::load(MfcArchive &file, bool bigPicture) { return true; } +Common::Point *PictureObject::getDimensions(Common::Point *p) { + _picture->getDimensions(p); + + return p; +} + GameObject::GameObject() { _field_4 = 0; _flags = 0; @@ -273,6 +279,13 @@ void Picture::init() { _bitmap->_flags |= 0x1000000; } +Common::Point *Picture::getDimensions(Common::Point *p) { + p->x = _width; + p->y = _height; + + return p; +} + void Picture::getDibInfo() { int off = _dataSize & ~0xf; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index a4f9d8fe2c..c420ffe9a2 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -82,6 +82,8 @@ class Picture : public MemoryObject { byte getAlpha() { return (byte)_alpha; } void setAlpha(byte alpha) { _alpha = alpha; } + + Common::Point *getDimensions(Common::Point *p); }; class BigPicture : public Picture { @@ -118,6 +120,7 @@ class PictureObject : public GameObject { public: PictureObject(); bool load(MfcArchive &file, bool bigPicture); + Common::Point *getDimensions(Common::Point *p); }; class Background : public CObject { diff --git a/engines/fullpipe/messagequeue.cpp b/engines/fullpipe/messagequeue.cpp new file mode 100644 index 0000000000..3c9e0889fc --- /dev/null +++ b/engines/fullpipe/messagequeue.cpp @@ -0,0 +1,90 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" +#include "fullpipe/messagequeue.h" + +namespace Fullpipe { + +MessageQueue::MessageQueue() { + _field_14 = 0; + _parId = 0; + _dataId = 0; + _id = 0; + _isFinished = 0; + _flags = 0; +} + +bool MessageQueue::load(MfcArchive &file) { + debug(5, "MessageQueue::load()"); + + _dataId = file.readUint16LE(); + + int count = file.readUint16LE(); + + assert(g_fullpipe->_gameProjectVersion >= 12); + + _queueName = file.readPascalString(); + + for (int i = 0; i < count; i++) { + CObject *tmp = file.readClass(); + + _exCommands.push_back(tmp); + } + + _id = -1; + _field_14 = 0; + _parId = 0; + _isFinished = 0; + + return true; +} + +MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { + for (CPtrList::iterator s = begin(); s != end(); ++s) { + if (((MessageQueue *)s)->_id == id) + return (MessageQueue *)s; + } + + return 0; +} + +void GlobalMessageQueueList::deleteQueueById(int id) { + for (uint i = 0; i < size(); i++) + if (((MessageQueue *)((*this).operator[](i)))->_id == id) { + delete (MessageQueue *)remove_at(i); + + disableQueueById(id); + return; + } +} + +void GlobalMessageQueueList::disableQueueById(int id) { + for (CPtrList::iterator s = begin(); s != end(); ++s) { + if (((MessageQueue *)s)->_parId == id) + ((MessageQueue *)s)->_parId = 0; + } +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/messagequeue.h b/engines/fullpipe/messagequeue.h new file mode 100644 index 0000000000..1f4cf02bfc --- /dev/null +++ b/engines/fullpipe/messagequeue.h @@ -0,0 +1,67 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_MESSAGEQUEUE_H +#define FULLPIPE_MESSAGEQUEUE_H + +#include "fullpipe/utils.h" +#include "fullpipe/inventory.h" +#include "fullpipe/gfx.h" +#include "fullpipe/sound.h" +#include "fullpipe/scene.h" + +namespace Fullpipe { + +class MessageQueue : public CObject { + friend class GlobalMessageQueueList; + + protected: + int _id; + int _flags; + char *_queueName; + int16 _dataId; + int16 _field_12; + int _field_14; + CPtrList _exCommands; + int _counter; + int _field_38; + int _isFinished; + int _parId; + int _flag1; + + public: + MessageQueue(); + virtual bool load(MfcArchive &file); + + int getFlags() { return _flags; } +}; + +class GlobalMessageQueueList : public CPtrList { + public: + MessageQueue *getMessageQueueById(int id); + void deleteQueueById(int id); + void disableQueueById(int id); +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_MESSAGEQUEUE_H */ diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 1b115a3463..02a56269e4 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -5,6 +5,7 @@ MODULE_OBJS = \ fullpipe.o \ gfx.o \ inventory.o \ + messagequeue.o \ motion.o \ ngiarchive.o \ scene.o \ diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 1d84305a96..6afab022f9 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -31,6 +31,8 @@ namespace Fullpipe { +class MessageQueue; + class GameProject : public CObject { public: int _field_4; @@ -44,25 +46,6 @@ class GameProject : public CObject { virtual bool load(MfcArchive &file); }; -class MessageQueue : public CObject { - int _id; - int _flags; - char *_queueName; - int16 _dataId; - int16 _field_12; - int _field_14; - CPtrList _exCommands; - int _counter; - int _field_38; - int _isFinished; - int _parId; - int _flag1; - - public: - MessageQueue(); - virtual bool load(MfcArchive &file); -}; - class CInteraction : public CObject { int16 _objectId1; int16 _objectId2; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 717eb0cdd5..dec89119bf 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -25,6 +25,9 @@ #include "fullpipe/objects.h" #include "fullpipe/ngiarchive.h" #include "fullpipe/statics.h" +#include "fullpipe/messagequeue.h" + +#include "fullpipe/gameobj.h" namespace Fullpipe { @@ -234,6 +237,38 @@ void Scene::init() { warning("STUB: Scene::init()"); } +StaticANIObject *Scene::getAniMan() { + StaticANIObject *aniMan = getStaticANIObject1ById(ANI_MAN, -1); + + deleteStaticANIObject(aniMan); + + return aniMan; +} + +StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) { + for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) { + StaticANIObject *o = (StaticANIObject *)s; + if (o->_id == obj && (a3 == -1 || o->_field_4 == a3)) + return o; + } + + return 0; +} + +void Scene::deleteStaticANIObject(StaticANIObject *obj) { + for (uint n = 0; n < _staticANIObjectList1.size(); n++) + if ((StaticANIObject *)_staticANIObjectList1[n] == obj) { + _staticANIObjectList1.remove_at(n); + break; + } + + for (uint n = 0; n < _staticANIObjectList2.size(); n++) + if ((StaticANIObject *)_staticANIObjectList2[n] == obj) { + _staticANIObjectList2.remove_at(n); + break; + } +} + void Scene::draw(int par) { updateScrolling(par); @@ -257,9 +292,10 @@ void Scene::draw(int par) { } void Scene::updateScrolling(int par) { + warning("STUB Scene::updateScrolling()"); } -void Scene::drawContent(int minPri, int maxPri, bool drawBG) { +void Scene::drawContent(int minPri, int maxPri, bool drawBg) { if (!_picObjList.size() && !_bigPictureArray1Count) return; diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 639bff0c93..8d1ea7ceb7 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -45,6 +45,9 @@ class Scene : public Background { void draw(int par); void drawContent(int minPri, int maxPri, bool drawBG); void updateScrolling(int par); + StaticANIObject *getAniMan(); + StaticANIObject *getStaticANIObject1ById(int obj, int a3); + void deleteStaticANIObject(StaticANIObject * obj); }; class SceneTag : public CObject { diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index f04291b2b9..2dbe503e93 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -24,11 +24,8 @@ namespace Fullpipe { -signed int sceneSwitcher(EntranceInfo *a1, int a2) { - EntranceInfo *entrance; // ebx@1 - Scene *scene; // esi@1 +bool FullPipeEngine::sceneSwitcher(EntranceInfo *entrance) { CGameVar *sceneVar; // eax@21 - signed int result; // eax@2 POINT *v6; // eax@3 int v7; // eax@3 CInventory2 *v8; // eax@4 @@ -46,37 +43,41 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { CNode *v20; // eax@17 Scene *v21; // eax@18 PictureObject *v22; // eax@18 - POINT point; // [sp+Ch] [bp-8h]@3 + Common::Point sceneDim; - entrance = a1; - scene = accessScene(a1->_sceneId); + Scene *scene = accessScene(entrance->_sceneId); if (!scene) return 0; - v6 = PictureObject_getDimensions((PictureObject *)scene->bg.picObjList.m_pNodeHead->data, &point); - g_sceneWidth = v6->x; - v7 = v6->y; - g_sceneHeight = v7; - g_sceneRect.top = 0; - g_sceneRect.left = 0; - g_sceneRect.right = 799; - g_sceneRect.bottom = 599; - scene->bg.x = 0; - scene->bg.y = 0; - (*(void (__stdcall **)(_DWORD, _DWORD, int))(g_aniMan->GameObject.CObject.vmt + offsetof(GameObjectVmt, setOXY)))(0, 0, a2); - (*(void (**)(void))(g_aniMan->GameObject.CObject.vmt + offsetof(GameObjectVmt, clearFlags)))(); - g_aniMan->callback2 = 0; - g_aniMan->callback1 = 0; - g_aniMan->shadowsOn = 1; - g_scrollSpeed = 8; - savesEnabled = 1; - updateFlag = 1; - flgCanOpenMap = 1; + ((PictureObject *)_picObjList.front())->getDimensions(&sceneDim); + _sceneWidth = sceneDim.x; + _sceneHeight = sceneDim.y; + + _sceneRect.top = 0; + _sceneRect.left = 0; + _sceneRect.right = 799; + _sceneRect.bottom = 599; + + scene->_x = 0; + scene->_y = 0; + + _aniMan->setOXY(0, 0); + _aniMan->clearFlags(); + _aniMan->callback1 = 0; + _aniMan->callback2 = 0; + _aniMan->shadowsOn = 1; + + _scrollSpeed = 8; + + _savesEnabled = 1; + _updateFlag = 1; + _flgCanOpenMap = 1; + if (entrance->sceneId == SC_DBGMENU) { - g_inventoryScene = 0; + _inventoryScene = 0; } else { - CGameLoader_loadScene(g_gameLoader, SC_INV); + _gameLoader->loadScene(SC_INV); v8 = getGameLoaderInventory(); CInventory2_rebuildItemRects(v8); v9 = getGameLoaderInventory(); @@ -146,7 +147,6 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandlerIntro, 2); _updateCursorCallback = sceneIntro_updateCursor; - result = 1; break; case SC_1: @@ -158,8 +158,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_1"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler01, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_2: @@ -170,8 +169,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_2"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler02, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_3: @@ -183,8 +181,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler03, 2); j_Scene_sc03_sub_40F160(scene); - g_updateCursorCallback = scene03_updateCursor; - result = 1; + _updateCursorCallback = scene03_updateCursor; break; case SC_4: @@ -195,8 +192,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_4"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler04, 2, 2); - g_updateCursorCallback = scene04_updateCursor; - result = 1; + _updateCursorCallback = scene04_updateCursor; break; case SC_5: @@ -207,8 +203,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_5"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler05, 2, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_6: @@ -220,8 +215,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); sub_415300(); insertMessageHandler(sceneHandler06, 2, 2); - g_updateCursorCallback = scene06_updateCursor; - result = 1; + _updateCursorCallback = scene06_updateCursor; break; case SC_7: @@ -232,8 +226,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_7"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler07, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_8: @@ -245,8 +238,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); sub_416890(); addMessageHandler(sceneHandler08, 2); - g_updateCursorCallback = scene08_updateCursor; - result = 1; + _updateCursorCallback = scene08_updateCursor; break; case SC_9: @@ -257,8 +249,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_9"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler09, 2, 2); - g_updateCursorCallback = scene09_updateCursor; - result = 1; + _updateCursorCallback = scene09_updateCursor; break; case SC_10: @@ -269,8 +260,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_10"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler10, 2, 2); - g_updateCursorCallback = scene10_updateCursor; - result = 1; + _updateCursorCallback = scene10_updateCursor; break; case SC_11: @@ -282,8 +272,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler11, 2, 2); scene11_sub_41A980(); - g_updateCursorCallback = scene11_updateCursor; - result = 1; + _updateCursorCallback = scene11_updateCursor; break; case SC_12: @@ -294,8 +283,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_12"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler12, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_13: @@ -306,8 +294,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_13"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler13, 2, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_14: @@ -319,8 +306,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler14, 2, 2); scene14_sub_41D2B0(); - g_updateCursorCallback = scene14_updateCursor; - result = 1; + _updateCursorCallback = scene14_updateCursor; break; case SC_15: @@ -331,8 +317,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_15"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler15, 2, 2); - g_updateCursorCallback = scene15_updateCursor; - result = 1; + _updateCursorCallback = scene15_updateCursor; break; case SC_16: @@ -343,8 +328,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_16"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler16, 2); - g_updateCursorCallback = scene16_updateCursor; - result = 1; + _updateCursorCallback = scene16_updateCursor; break; case SC_17: @@ -356,8 +340,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler17, 2); scene17_sub_41F060(); - g_updateCursorCallback = scene17_updateCursor; - result = 1; + _updateCursorCallback = scene17_updateCursor; break; case SC_18: @@ -373,8 +356,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_18"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler18, 2, 2); - g_updateCursorCallback = scene18_updateCursor; - result = 1; + _updateCursorCallback = scene18_updateCursor; break; case SC_19: @@ -399,8 +381,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler19, 2); scene19_sub_4211D0(scene); - g_updateCursorCallback = scene19_updateCursor; - result = 1; + _updateCursorCallback = scene19_updateCursor; break; case SC_20: @@ -411,8 +392,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_20"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler20, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_21: @@ -423,8 +403,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_21"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler21, 2, 2); - g_updateCursorCallback = scene21_updateCursor; - result = 1; + _updateCursorCallback = scene21_updateCursor; break; case SC_22: @@ -436,8 +415,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); scene22_sub_4228A0(); insertMessageHandler(sceneHandler22, 2, 2); - g_updateCursorCallback = scene22_updateCursor; - result = 1; + _updateCursorCallback = scene22_updateCursor; break; case SC_23: @@ -449,8 +427,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler23, 2, 2); scene23_sub_423B00(); - g_updateCursorCallback = scene23_updateCursor; - result = 1; + _updateCursorCallback = scene23_updateCursor; break; case SC_24: @@ -462,8 +439,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler24, 2); scene24_sub_423DD0(); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_25: @@ -475,8 +451,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler25, 2); scene25_sub_4253B0(scene, entrance->field_4); - g_updateCursorCallback = scene25_updateCursor; - result = 1; + _updateCursorCallback = scene25_updateCursor; break; case SC_26: @@ -488,8 +463,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler26, 2, 2); scene26_sub_426140(scene); - g_updateCursorCallback = scene26_updateCursor; - result = 1; + _updateCursorCallback = scene26_updateCursor; break; case SC_27: @@ -500,8 +474,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_27"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler27, 2); - g_updateCursorCallback = scene27_updateCursor; - result = 1; + _updateCursorCallback = scene27_updateCursor; break; case SC_28: @@ -512,8 +485,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_28"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler28, 2, 2); - g_updateCursorCallback = scene28_updateCursor; - result = 1; + _updateCursorCallback = scene28_updateCursor; break; case SC_29: @@ -524,8 +496,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_29"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler29, 2); - g_updateCursorCallback = scene29_updateCursor; - result = 1; + _updateCursorCallback = scene29_updateCursor; break; case SC_30: @@ -536,8 +507,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_30"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler30, 2); - g_updateCursorCallback = scene30_updateCursor; - result = 1; + _updateCursorCallback = scene30_updateCursor; break; case SC_31: @@ -548,8 +518,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_31"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler31, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_32: @@ -561,8 +530,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler32, 2, 2); scene32_sub_42C5C0(); - g_updateCursorCallback = scene32_updateCursor; - result = 1; + _updateCursorCallback = scene32_updateCursor; break; case SC_33: @@ -574,8 +542,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler33, 2, 2); scene33_sub_42CEF0(); - g_updateCursorCallback = scene33_updateCursor; - result = 1; + _updateCursorCallback = scene33_updateCursor; break; case SC_34: @@ -587,8 +554,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler34, 2, 2); scene34_sub_42DEE0(); - g_updateCursorCallback = scene34_updateCursor; - result = 1; + _updateCursorCallback = scene34_updateCursor; break; case SC_35: @@ -599,8 +565,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_35"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler35, 2, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_36: @@ -611,8 +576,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_36"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler36, 2); - g_updateCursorCallback = scene36_updateCursor; - result = 1; + _updateCursorCallback = scene36_updateCursor; break; case SC_37: @@ -623,8 +587,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_37"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler37, 2, 2); - g_updateCursorCallback = scene37_updateCursor; - result = 1; + _updateCursorCallback = scene37_updateCursor; break; case SC_38: @@ -635,8 +598,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_38"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler38, 2); - g_updateCursorCallback = defaultUpdateCursorCallback; - result = 1; + _updateCursorCallback = defaultUpdateCursorCallback; break; case SC_FINAL1: @@ -647,8 +609,7 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { scene->initObjectCursors("SC_FINAL1"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandlerFinal1, 2); - g_updateCursorCallback = sceneFinal1_updateCursor; - result = 1; + _updateCursorCallback = sceneFinal1_updateCursor; break; case SC_DBGMENU: @@ -658,16 +619,14 @@ signed int sceneSwitcher(EntranceInfo *a1, int a2) { _behaviorManager->initBehavior(scene, sceneVar); scene->initObjectCursors("SC_DBGMENU"); addMessageHandler(sceneHandlerDbgMenu, 2); - result = 1; break; default: _behaviorManager->initBehavior(0, 0); - result = 1; break; } - return result; + return true; } } // End of namespace Fullpipe diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index f3cf644b9a..4e9b0a3e42 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -101,10 +101,16 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->rebuildItemRects(); - warning("STUB: loadGam()"); //for (CPtrList::iterator s = _inventory->getScene()->_picObjList.begin(); s != _inventory->getScene()->_picObjList.end(); ++s) { //} + + //_sceneSwitcher = sceneSwitcher; + //_preloadCallback = gameLoaderPreloadCallback + //_readSavegameCallback = gameLoaderReadSavegameCallback; + _aniMan = accessScene(SC_COMMON)->getAniMan(); + _scene2 = 0; + warning("STUB: loadGam()"); } else return false; @@ -314,40 +320,6 @@ bool CInteraction::load(MfcArchive &file) { return true; } -MessageQueue::MessageQueue() { - _field_14 = 0; - _parId = 0; - _dataId = 0; - _id = 0; - _isFinished = 0; - _flags = 0; -} - -bool MessageQueue::load(MfcArchive &file) { - debug(5, "MessageQueue::load()"); - - _dataId = file.readUint16LE(); - - int count = file.readUint16LE(); - - assert(g_fullpipe->_gameProjectVersion >= 12); - - _queueName = file.readPascalString(); - - for (int i = 0; i < count; i++) { - CObject *tmp = file.readClass(); - - _exCommands.push_back(tmp); - } - - _id = -1; - _field_14 = 0; - _parId = 0; - _isFinished = 0; - - return true; -} - ExCommand::ExCommand() { _field_3C = 1; _messageNum = 0; diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index cc51691a44..d0abbb87e6 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -25,10 +25,42 @@ #include "fullpipe/objects.h" #include "fullpipe/ngiarchive.h" #include "fullpipe/statics.h" +#include "fullpipe/messagequeue.h" + #include "fullpipe/gameobj.h" namespace Fullpipe { +CStepArray::CStepArray() { + _points = 0; + _maxPointIndex = 0; + _currPointIndex = 0; + _pointsCount = 0; + _isEos = 0; +} + +CStepArray::~CStepArray() { + if (_pointsCount) { + for (int i = 0; i < _pointsCount; i++) + delete _points[i]; + + delete _points; + + _points = 0; + } +} + +void CStepArray::clear() { + _currPointIndex = 0; + _maxPointIndex = 0; + _isEos = 0; + + for (int i = 0; i < _pointsCount; i++) { + _points[i]->x = 0; + _points[i]->y = 0; + } +} + StaticANIObject::StaticANIObject() { _shadowsOn = 1; _field_30 = 0; @@ -102,6 +134,43 @@ void StaticANIObject::setOXY(int x, int y) { _movementObj->setOXY(x, y); } +void StaticANIObject::clearFlags() { + _flags = 0; + + deleteFromGlobalMessageQueue(); + _messageQueueId = 0; + _movementObj = 0; + _staticsObj = 0; + _animExFlag = 0; + _counter = 0; + _messageNum = 0; + _stepArray.clear(); +} + +void StaticANIObject::deleteFromGlobalMessageQueue() { + while (_messageQueueId) { + if (g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId)) { + if (!isIdle()) + return; + + g_fullpipe->_globalMessageQueueList->deleteQueueById(_messageQueueId); + } else { + _messageQueueId = 0; + } + } +} + +bool StaticANIObject::isIdle() { + if (_messageQueueId) { + MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId); + + if (m && m->getFlags() & 1) + return false; + } + + return true; +} + Statics *StaticANIObject::getStaticsById(int itemId) { for (uint i = 0; i < _staticsList.size(); i++) if (((Statics *)_staticsList[i])->_staticsId == itemId) diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 5b27b547c5..d96435960a 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -27,10 +27,17 @@ namespace Fullpipe { class CStepArray : public CObject { int _currPointIndex; - int _points; + Common::Point **_points; int _maxPointIndex; int _pointsCount; int _isEos; + + public: + CStepArray(); + ~CStepArray(); + void clear(); + + int getCurrPointIndex() { return _currPointIndex; } }; class StaticPhase : public Picture { @@ -144,6 +151,11 @@ class StaticANIObject : public GameObject { Statics *getStaticsById(int id); Movement *getMovementById(int id); + void clearFlags(); + bool isIdle(); + + void deleteFromGlobalMessageQueue(); + Statics *addStatics(Statics *ani); void draw(); void draw2(); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index f6e19256c1..3e153c1801 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -28,6 +28,7 @@ #include "fullpipe/objects.h" #include "fullpipe/motion.h" #include "fullpipe/ngiarchive.h" +#include "fullpipe/messagequeue.h" namespace Fullpipe { -- cgit v1.2.3 From 62cbdd81f0843ad10fb768e8cf97222144cb8a1e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 20 Jul 2013 21:28:32 +0300 Subject: FULLPIPE: Further work on sceneSwitcher. Reduced header dependency. Put CGameLoader into separate files. --- engines/fullpipe/fullpipe.cpp | 1 + engines/fullpipe/fullpipe.h | 23 +++++-- engines/fullpipe/gameloader.cpp | 143 +++++++++++++++++++++++++++++++++++++++ engines/fullpipe/gameloader.h | 76 +++++++++++++++++++++ engines/fullpipe/gfx.cpp | 1 + engines/fullpipe/gfx.h | 2 + engines/fullpipe/inventory.cpp | 8 ++- engines/fullpipe/inventory.h | 2 + engines/fullpipe/module.mk | 2 + engines/fullpipe/objects.h | 56 ++------------- engines/fullpipe/scene.h | 5 ++ engines/fullpipe/scenes.cpp | 88 ++++++++++++------------ engines/fullpipe/sound.cpp | 5 ++ engines/fullpipe/sound.h | 4 ++ engines/fullpipe/stateloader.cpp | 128 +++-------------------------------- engines/fullpipe/statics.h | 5 ++ 16 files changed, 331 insertions(+), 218 deletions(-) create mode 100644 engines/fullpipe/gameloader.cpp create mode 100644 engines/fullpipe/gameloader.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index fb8a141646..1d0b237e96 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -30,6 +30,7 @@ #include "fullpipe/fullpipe.h" #include "fullpipe/objectnames.h" #include "fullpipe/objects.h" +#include "fullpipe/gameloader.h" #include "fullpipe/messagequeue.h" namespace Fullpipe { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 31f44fda76..6a10f231ee 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -44,13 +44,15 @@ enum FullpipeGameFeatures { }; class CGameLoader; -class GameProject; class CGameVar; class CInventory2; -class Scene; +class EntranceInfo; +class GameProject; +class GlobalMessageQueueList; class NGIArchive; +class Scene; +class SoundList; class StaticANIObject; -class GlobalMessageQueueList; class FullpipeEngine : public ::Engine { protected: @@ -86,14 +88,21 @@ public: int _gameProjectVersion; int _pictureScale; int _scrollSpeed; - int _currSoundListCount; - bool _soundEnabled; - bool _flgSoundList; + bool _savesEnabled; + bool _updateFlag; + bool _flgCanOpenMap; Common::Rect _sceneRect; + int _sceneWidth; + int _sceneHeight; Scene *_scene2; StaticANIObject *_aniMan; + SoundList *_currSoundList1[11]; + int _currSoundListCount; + bool _soundEnabled; + bool _flgSoundList; + GlobalMessageQueueList *_globalMessageQueueList; bool _needQuit; @@ -106,11 +115,13 @@ public: CGameVar *_swallowedEgg2; CGameVar *_swallowedEgg3; + Scene *_inventoryScene; CInventory2 *_inventory; void setObjectState(const char *name, int state); int getObjectEnumState(const char *name, const char *state); + bool sceneSwitcher(EntranceInfo *entrance); Scene *accessScene(int sceneId); NGIArchive *_currArchive; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp new file mode 100644 index 0000000000..0f35fb7a72 --- /dev/null +++ b/engines/fullpipe/gameloader.cpp @@ -0,0 +1,143 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/gameloader.h" +#include "fullpipe/scene.h" + +namespace Fullpipe { + +CGameLoader::CGameLoader() { + _interactionController = new CInteractionController(); + + _gameProject = 0; + //_gameName = "untitled"; + + //addMessageHandler2(CGameLoader_messageHandler1, 0, 0); + //insertMessageHandler(CGameLoader_messageHandler2, 0, 128); + //insertMessageHandler(CGameLoader_messageHandler3, 0, 1); + + _field_FA = 0; + _field_F8 = 0; + _sceneSwitcher = 0; + _preloadCallback = 0; + _readSavegameCallback = 0; + _gameVar = 0; + _preloadId1 = 0; + _preloadId2 = 0; + _updateCounter = 0; + + //g_x = 0; + //g_y = 0; + //dword_478480 = 0; + //g_objectId2 = 0; + //g_id = 0; +} + +CGameLoader::~CGameLoader() { + free(_gameName); + delete _gameProject; +} + +bool CGameLoader::load(MfcArchive &file) { + debug(5, "CGameLoader::load()"); + + _gameName = file.readPascalString(); + debug(6, "_gameName: %s", _gameName); + + _gameProject = new GameProject(); + + _gameProject->load(file); + + g_fullpipe->_gameProject = _gameProject; + + if (g_fullpipe->_gameProjectVersion < 12) { + error("Old gameProjectVersion: %d", g_fullpipe->_gameProjectVersion); + } + + _gameName = file.readPascalString(); + debug(6, "_gameName: %s", _gameName); + + _inventory.load(file); + + _interactionController->load(file); + + debug(6, "sceneTag count: %d", _gameProject->_sceneTagList->size()); + + _sc2array.resize(_gameProject->_sceneTagList->size()); + + int i = 0; + for (SceneTagList::const_iterator it = _gameProject->_sceneTagList->begin(); it != _gameProject->_sceneTagList->end(); ++it, i++) { + char tmp[12]; + + snprintf(tmp, 11, "%04d.sc2", it->_sceneId); + + debug(2, "sc: %s", tmp); + + _sc2array[i].loadFile((const char *)tmp); + } + + _preloadItems.load(file); + + _field_FA = file.readUint16LE(); + _field_F8 = file.readUint16LE(); + + _gameVar = (CGameVar *)file.readClass(); + + return true; +} + +bool CGameLoader::loadScene(int num) { + SceneTag *st; + + int idx = getSceneTagBySceneId(num, &st); + + if (st->_scene) + st->loadScene(); + + if (st->_scene) { + st->_scene->init(); + + applyPicAniInfos(st->_scene, _sc2array[idx]._defPicAniInfos, _sc2array[idx]._defPicAniInfosCount); + applyPicAniInfos(st->_scene, _sc2array[idx]._picAniInfos, _sc2array[idx]._picAniInfosCount); + + _sc2array[idx]._scene = st->_scene; + _sc2array[idx]._isLoaded = 1; + + return true; + } + + return false; +} + +int CGameLoader::getSceneTagBySceneId(int num, SceneTag **st) { + warning("STUB: CGameLoader::getSceneTagBySceneId()"); + + return 0; +} + +void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) { + warning("STUB: CGameLoader::applyPicAniInfo()"); +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h new file mode 100644 index 0000000000..9322e458b0 --- /dev/null +++ b/engines/fullpipe/gameloader.h @@ -0,0 +1,76 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_GAMELOADER_H +#define FULLPIPE_GAMELOADER_H + +#include "fullpipe/objects.h" +#include "fullpipe/inventory.h" + +namespace Fullpipe { + +class SceneTag; + +class CGameLoader : public CObject { + public: + CGameLoader(); + virtual ~CGameLoader(); + + virtual bool load(MfcArchive &file); + bool loadScene(int num); + + int getSceneTagBySceneId(int num, SceneTag **st); + void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount); + + CGameVar *_gameVar; + CInventory2 _inventory; + + private: + GameProject *_gameProject; + CInteractionController *_interactionController; + int _field_C; + int _field_10; + int _field_14; + int _field_18; + int _field_1C; + int _field_20; + int _field_24; + int _field_28; + int _field_2C; + CInputController _inputController; + Sc2Array _sc2array; + void *_sceneSwitcher; + void *_preloadCallback; + void *_readSavegameCallback; + int16 _field_F8; + int16 _field_FA; + PreloadItems _preloadItems; + char *_gameName; + ExCommand _exCommand; + int _updateCounter; + int _preloadId1; + int _preloadId2; +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_GAMELOADER_H */ diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 241b799168..5f6d75b33b 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -23,6 +23,7 @@ #include "fullpipe/fullpipe.h" #include "fullpipe/objects.h" +#include "fullpipe/gfx.h" #include "common/memstream.h" diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index c420ffe9a2..3340b20e7c 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -124,6 +124,8 @@ class PictureObject : public GameObject { }; class Background : public CObject { + friend class FullpipeEngine; + public: CPtrList _picObjList; diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 5c67e87d36..5ee85aab02 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -22,10 +22,16 @@ #include "fullpipe/fullpipe.h" -#include "fullpipe/objects.h" +#include "fullpipe/utils.h" +#include "fullpipe/inventory.h" +#include "fullpipe/gameloader.h" namespace Fullpipe { +CInventory2 *getGameLoaderInventory() { + return &g_fullpipe->_gameLoader->_inventory; +} + bool CInventory::load(MfcArchive &file) { debug(5, "CInventory::load()"); diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 36170b86bf..7991e2f3eb 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -103,6 +103,8 @@ class CInventory2 : public CInventory { }; +CInventory2 *getGameLoaderInventory(); + } // End of namespace Fullpipe #endif /* FULLPIPE_INVENTORY_H */ diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 02a56269e4..cced876a25 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -3,12 +3,14 @@ MODULE := engines/fullpipe MODULE_OBJS = \ detection.o \ fullpipe.o \ + gameloader.o \ gfx.o \ inventory.o \ messagequeue.o \ motion.o \ ngiarchive.o \ scene.o \ + scenes.o \ sound.o \ stateloader.o \ statics.o \ diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 6afab022f9..57f96b76c0 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -24,14 +24,11 @@ #define FULLPIPE_OBJECTS_H #include "fullpipe/utils.h" -#include "fullpipe/inventory.h" -#include "fullpipe/gfx.h" -#include "fullpipe/sound.h" -#include "fullpipe/scene.h" namespace Fullpipe { class MessageQueue; +class SceneTagList; class GameProject : public CObject { public: @@ -124,11 +121,11 @@ struct PicAniInfo { }; struct EntranceInfo { - int32 sceneId; - int32 field_4; - int32 messageQueueId; - byte gap_C[292]; // FIXME - int32 field_130; + int32 _sceneId; + int32 _field_4; + int32 _messageQueueId; + byte _gap_C[292]; // FIXME + int32 _field_130; bool load(MfcArchive &file); }; @@ -232,47 +229,6 @@ class PreloadItems : public Common::Array, public CObject { virtual bool load(MfcArchive &file); }; -class CGameLoader : public CObject { - public: - CGameLoader(); - virtual ~CGameLoader(); - - virtual bool load(MfcArchive &file); - bool loadScene(int num); - - int getSceneTagBySceneId(int num, SceneTag **st); - void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount); - - CGameVar *_gameVar; - CInventory2 _inventory; - - private: - GameProject *_gameProject; - CInteractionController *_interactionController; - int _field_C; - int _field_10; - int _field_14; - int _field_18; - int _field_1C; - int _field_20; - int _field_24; - int _field_28; - int _field_2C; - CInputController _inputController; - Sc2Array _sc2array; - void *_sceneSwitcher; - void *_preloadCallback; - void *_readSavegameCallback; - int16 _field_F8; - int16 _field_FA; - PreloadItems _preloadItems; - char *_gameName; - ExCommand _exCommand; - int _updateCounter; - int _preloadId1; - int _preloadId2; -}; - class CObjstateCommand : public CObject { ExCommand _cmd; char *_objCommandName; diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 8d1ea7ceb7..82041439cd 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -23,9 +23,14 @@ #ifndef FULLPIPE_SCENE_H #define FULLPIPE_SCENE_H +#include "fullpipe/gfx.h" + namespace Fullpipe { class Scene : public Background { + friend class FullpipeEngine; + + protected: CPtrList _staticANIObjectList1; CPtrList _staticANIObjectList2; CPtrList _messageQueueList; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 2dbe503e93..e3ebc22b80 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -22,27 +22,31 @@ #include "fullpipe/fullpipe.h" +#include "fullpipe/utils.h" +#include "fullpipe/gfx.h" +#include "fullpipe/objects.h" +#include "fullpipe/statics.h" +#include "fullpipe/scene.h" +#include "fullpipe/gameloader.h" +#include "fullpipe/sound.h" + +#include "fullpipe/gameobj.h" + namespace Fullpipe { -bool FullPipeEngine::sceneSwitcher(EntranceInfo *entrance) { - CGameVar *sceneVar; // eax@21 - POINT *v6; // eax@3 - int v7; // eax@3 - CInventory2 *v8; // eax@4 - CInventory2 *v9; // eax@4 - int v10; // edi@8 - Sound *v11; // eax@9 - int v12; // ST08_4@12 - int v13; // eax@12 - Scene *v14; // edi@12 - int v15; // eax@13 - int v16; // eax@13 - int v17; // eax@13 - int v18; // eax@13 - CNode *v19; // edi@16 - CNode *v20; // eax@17 - Scene *v21; // eax@18 - PictureObject *v22; // eax@18 +bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { + CGameVar *sceneVar; + int v12; + int v13; + Scene *v14; + int v15; + int v16; + int v17; + int v18; + CNode *v19; + CNode *v20; + Scene *v21; + PictureObject *v22; Common::Point sceneDim; Scene *scene = accessScene(entrance->_sceneId); @@ -50,7 +54,7 @@ bool FullPipeEngine::sceneSwitcher(EntranceInfo *entrance) { if (!scene) return 0; - ((PictureObject *)_picObjList.front())->getDimensions(&sceneDim); + ((PictureObject *)scene->_picObjList.front())->getDimensions(&sceneDim); _sceneWidth = sceneDim.x; _sceneHeight = sceneDim.y; @@ -64,39 +68,39 @@ bool FullPipeEngine::sceneSwitcher(EntranceInfo *entrance) { _aniMan->setOXY(0, 0); _aniMan->clearFlags(); - _aniMan->callback1 = 0; - _aniMan->callback2 = 0; - _aniMan->shadowsOn = 1; + _aniMan->_callback1 = 0; + _aniMan->_callback2 = 0; + _aniMan->_shadowsOn = 1; _scrollSpeed = 8; - _savesEnabled = 1; - _updateFlag = 1; - _flgCanOpenMap = 1; + _savesEnabled = true; + _updateFlag = true; + _flgCanOpenMap = true; - if (entrance->sceneId == SC_DBGMENU) { + if (entrance->_sceneId == SC_DBGMENU) { _inventoryScene = 0; } else { _gameLoader->loadScene(SC_INV); - v8 = getGameLoaderInventory(); - CInventory2_rebuildItemRects(v8); - v9 = getGameLoaderInventory(); - g_inventoryScene = CInventory2_getScene(v9); + getGameLoaderInventory()->rebuildItemRects(); + _inventoryScene = getGameLoaderInventory()->getScene(); } - if (soundEnabled) { - if (scene->soundList) { - g_currSoundListCount = 2; - v10 = 0; - g_currSoundList1 = accessScene(SC_COMMON)->soundList; - for (*(&g_currSoundList1 + 1) = scene->soundList; v10 < SoundList_getCount(scene->soundList); ++v10) { - v11 = SoundList_getSoundByItemByIndex(scene->soundList, v10); - (*(void (__thiscall **)(Sound *))(v11->MemoryObject.obj.vmt + offsetof(SoundVmt, updateVolume)))(v11); + if (_soundEnabled) { + if (scene->_soundList) { + _currSoundListCount = 2; + _currSoundList1[0] = accessScene(SC_COMMON)->_soundList; + _currSoundList1[1] = scene->_soundList; + + for (int i = 0; i < scene->_soundList->getCount(); i++) { + scene->_soundList->getSoundByIndex(i)->updateVolume(); } } else { - g_currSoundListCount = 1; - g_currSoundList1 = accessScene(SC_COMMON)->soundList; + _currSoundListCount = 1; + _currSoundList1[0] = accessScene(SC_COMMON)->_soundList; } } + +#if 0 v12 = scene->sceneId; v13 = (int)getGameLoaderInteractionController(); CInteractionController_sortInteractions(v13, v12); @@ -625,7 +629,7 @@ bool FullPipeEngine::sceneSwitcher(EntranceInfo *entrance) { _behaviorManager->initBehavior(0, 0); break; } - +#endif return true; } diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index e1b2b331d9..8323a57bae 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -23,6 +23,7 @@ #include "fullpipe/fullpipe.h" #include "fullpipe/objects.h" +#include "fullpipe/sound.h" #include "fullpipe/ngiarchive.h" namespace Fullpipe { @@ -101,4 +102,8 @@ bool Sound::load(MfcArchive &file, NGIArchive *archive) { return true; } +void Sound::updateVolume() { + warning("STUB Sound::updateVolume()"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h index 4585aa79f7..93e994a720 100644 --- a/engines/fullpipe/sound.h +++ b/engines/fullpipe/sound.h @@ -37,6 +37,7 @@ class Sound : public MemoryObject { public: Sound(); bool load(MfcArchive &file, NGIArchive *archive); + void updateVolume(); }; class SoundList : public CObject { @@ -48,6 +49,9 @@ class SoundList : public CObject { SoundList(); bool load(MfcArchive &file, char *fname); bool loadFile(const char *fname, char *libname); + + int getCount() { return _soundItemsCount; } + Sound *getSoundByIndex(int idx) { return _soundItems[idx]; } }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 4e9b0a3e42..08b09918aa 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -27,6 +27,9 @@ #include "common/list.h" #include "fullpipe/objects.h" +#include "fullpipe/gameloader.h" +#include "fullpipe/scene.h" + #include "fullpipe/gameobj.h" namespace Fullpipe { @@ -40,7 +43,7 @@ bool FullpipeEngine::loadGam(const char *fname) { //set_g_messageQueueCallback1(messageQueueCallback1); //addMessageHandler2(global_messageHandler, 0, 4); - _inventory = &_gameLoader->_inventory; + _inventory = getGameLoaderInventory(); _inventory->setItemFlags(ANI_INV_MAP, 0x10003); _inventory->addItem(ANI_INV_MAP, 1); @@ -117,119 +120,6 @@ bool FullpipeEngine::loadGam(const char *fname) { return true; } -CGameLoader::CGameLoader() { - _interactionController = new CInteractionController(); - - _gameProject = 0; - //_gameName = "untitled"; - - //addMessageHandler2(CGameLoader_messageHandler1, 0, 0); - //insertMessageHandler(CGameLoader_messageHandler2, 0, 128); - //insertMessageHandler(CGameLoader_messageHandler3, 0, 1); - - _field_FA = 0; - _field_F8 = 0; - _sceneSwitcher = 0; - _preloadCallback = 0; - _readSavegameCallback = 0; - _gameVar = 0; - _preloadId1 = 0; - _preloadId2 = 0; - _updateCounter = 0; - - //g_x = 0; - //g_y = 0; - //dword_478480 = 0; - //g_objectId2 = 0; - //g_id = 0; -} - -CGameLoader::~CGameLoader() { - free(_gameName); - delete _gameProject; -} - -bool CGameLoader::load(MfcArchive &file) { - debug(5, "CGameLoader::load()"); - - _gameName = file.readPascalString(); - debug(6, "_gameName: %s", _gameName); - - _gameProject = new GameProject(); - - _gameProject->load(file); - - g_fullpipe->_gameProject = _gameProject; - - if (g_fullpipe->_gameProjectVersion < 12) { - error("Old gameProjectVersion: %d", g_fullpipe->_gameProjectVersion); - } - - _gameName = file.readPascalString(); - debug(6, "_gameName: %s", _gameName); - - _inventory.load(file); - - _interactionController->load(file); - - debug(6, "sceneTag count: %d", _gameProject->_sceneTagList->size()); - - _sc2array.resize(_gameProject->_sceneTagList->size()); - - int i = 0; - for (SceneTagList::const_iterator it = _gameProject->_sceneTagList->begin(); it != _gameProject->_sceneTagList->end(); ++it, i++) { - char tmp[12]; - - snprintf(tmp, 11, "%04d.sc2", it->_sceneId); - - debug(2, "sc: %s", tmp); - - _sc2array[i].loadFile((const char *)tmp); - } - - _preloadItems.load(file); - - _field_FA = file.readUint16LE(); - _field_F8 = file.readUint16LE(); - - _gameVar = (CGameVar *)file.readClass(); - - return true; -} - -bool CGameLoader::loadScene(int num) { - SceneTag *st; - - int idx = getSceneTagBySceneId(num, &st); - - if (st->_scene) - st->loadScene(); - - if (st->_scene) { - st->_scene->init(); - - applyPicAniInfos(st->_scene, _sc2array[idx]._defPicAniInfos, _sc2array[idx]._defPicAniInfosCount); - applyPicAniInfos(st->_scene, _sc2array[idx]._picAniInfos, _sc2array[idx]._picAniInfosCount); - - _sc2array[idx]._scene = st->_scene; - _sc2array[idx]._isLoaded = 1; - - return true; - } - - return false; -} - -int CGameLoader::getSceneTagBySceneId(int num, SceneTag **st) { - warning("STUB: CGameLoader::getSceneTagBySceneId()"); - - return 0; -} - -void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) { - warning("STUB: CGameLoader::applyPicAniInfo()"); -} - GameProject::GameProject() { _field_4 = 0; _headerFilename = 0; @@ -631,11 +521,11 @@ bool PicAniInfo::load(MfcArchive &file) { bool EntranceInfo::load(MfcArchive &file) { debug(5, "EntranceInfo::load()"); - sceneId = file.readUint32LE(); - field_4 = file.readUint32LE(); - messageQueueId = file.readUint32LE(); - file.read(gap_C, 292); // FIXME, Ugh - field_130 = file.readUint32LE(); + _sceneId = file.readUint32LE(); + _field_4 = file.readUint32LE(); + _messageQueueId = file.readUint32LE(); + file.read(_gap_C, 292); // FIXME, Ugh + _field_130 = file.readUint32LE(); return true; } diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index d96435960a..f8df64ddc0 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -23,6 +23,8 @@ #ifndef FULLPIPE_STATICS_H #define FULLPIPE_STATICS_H +#include "fullpipe/gfx.h" + namespace Fullpipe { class CStepArray : public CObject { @@ -121,6 +123,9 @@ class Movement : public GameObject { }; class StaticANIObject : public GameObject { + friend class FullpipeEngine; + + protected: Movement *_movementObj; Statics *_staticsObj; int _shadowsOn; -- cgit v1.2.3 From c4499bb4b290484cd1af35f2c354e0b2897e4a62 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 20 Jul 2013 23:55:04 +0300 Subject: FULLPIPE: Further work on sceneSwitcher --- engines/fullpipe/fullpipe.cpp | 2 ++ engines/fullpipe/fullpipe.h | 2 ++ engines/fullpipe/gameloader.cpp | 8 +++++ engines/fullpipe/gameloader.h | 5 ++- engines/fullpipe/gfx.cpp | 38 ++++++++++----------- engines/fullpipe/gfx.h | 2 +- engines/fullpipe/inventory.cpp | 4 --- engines/fullpipe/inventory.h | 2 -- engines/fullpipe/objects.h | 9 +++-- engines/fullpipe/scene.cpp | 14 ++++++++ engines/fullpipe/scene.h | 3 +- engines/fullpipe/scenes.cpp | 74 +++++++++++++++------------------------- engines/fullpipe/stateloader.cpp | 4 +++ 13 files changed, 91 insertions(+), 76 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 1d0b237e96..436eabaec6 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -61,6 +61,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _needQuit = false; _aniMan = 0; + _aniMan2 = 0; + _currentScene = 0; _scene2 = 0; _globalMessageQueueList = 0; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 6a10f231ee..5050e1c2e6 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -95,8 +95,10 @@ public: Common::Rect _sceneRect; int _sceneWidth; int _sceneHeight; + Scene *_currentScene; Scene *_scene2; StaticANIObject *_aniMan; + StaticANIObject *_aniMan2; SoundList *_currSoundList1[11]; int _currSoundListCount; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 0f35fb7a72..7f38515afd 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -27,6 +27,14 @@ namespace Fullpipe { +CInventory2 *getGameLoaderInventory() { + return &g_fullpipe->_gameLoader->_inventory; +} + +CInteractionController *getGameLoaderInteractionController() { + return g_fullpipe->_gameLoader->_interactionController; +} + CGameLoader::CGameLoader() { _interactionController = new CInteractionController(); diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 9322e458b0..a37181d5fd 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -43,10 +43,10 @@ class CGameLoader : public CObject { CGameVar *_gameVar; CInventory2 _inventory; + CInteractionController *_interactionController; private: GameProject *_gameProject; - CInteractionController *_interactionController; int _field_C; int _field_10; int _field_14; @@ -71,6 +71,9 @@ class CGameLoader : public CObject { int _preloadId2; }; +CInventory2 *getGameLoaderInventory(); +CInteractionController *getGameLoaderInteractionController(); + } // End of namespace Fullpipe #endif /* FULLPIPE_GAMELOADER_H */ diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 5f6d75b33b..fb9466177c 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -95,7 +95,7 @@ bool Background::load(MfcArchive &file) { void Background::addPictureObject(PictureObject *pct) { if (pct->_field_4) - renumPictures(pct); + pct->renumPictures(&_picObjList); bool inserted = false; for (uint i = 0; i < _picObjList.size(); i++) { @@ -111,24 +111,6 @@ void Background::addPictureObject(PictureObject *pct) { } } -void Background::renumPictures(PictureObject *pct) { - int *buf = (int *)calloc(_picObjList.size() + 2, sizeof(int)); - - for (uint i = 0; i < _picObjList.size(); i++) { - if (pct->_id == ((PictureObject *)_picObjList[i])->_id) - buf[((PictureObject *)_picObjList[i])->_field_4] = 1; - } - - if (buf[pct->_field_4]) { - uint count; - for (count = 1; buf[count] && count < _picObjList.size() + 2; count++) - ; - pct->_field_4 = count; - } - - free(buf); -} - PictureObject::PictureObject() { _ox = 0; _oy = 0; @@ -205,6 +187,24 @@ void GameObject::setOXY(int x, int y) { _oy = y; } +void GameObject::renumPictures(CPtrList *lst) { + int *buf = (int *)calloc(lst->size() + 2, sizeof(int)); + + for (uint i = 0; i < lst->size(); i++) { + if (_id == ((PictureObject *)((*lst)[i]))->_id) + buf[((PictureObject *)((*lst)[i]))->_field_4] = 1; + } + + if (buf[_field_4]) { + uint count; + for (count = 1; buf[count] && count < lst->size() + 2; count++) + ; + _field_4 = count; + } + + free(buf); +} + Picture::Picture() { _x = 0; _y = 0; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 3340b20e7c..7eea54241c 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -109,6 +109,7 @@ class GameObject : public CObject { GameObject(); virtual bool load(MfcArchive &file); void setOXY(int x, int y); + void renumPictures(CPtrList *lst); }; class PictureObject : public GameObject { @@ -143,7 +144,6 @@ class Background : public CObject { Background(); virtual bool load(MfcArchive &file); void addPictureObject(PictureObject *pct); - void renumPictures(PictureObject *pct); }; class Shadows : public CObject { diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 5ee85aab02..0480753bc2 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -28,10 +28,6 @@ namespace Fullpipe { -CInventory2 *getGameLoaderInventory() { - return &g_fullpipe->_gameLoader->_inventory; -} - bool CInventory::load(MfcArchive &file) { debug(5, "CInventory::load()"); diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 7991e2f3eb..36170b86bf 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -103,8 +103,6 @@ class CInventory2 : public CInventory { }; -CInventory2 *getGameLoaderInventory(); - } // End of namespace Fullpipe #endif /* FULLPIPE_INVENTORY_H */ diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 57f96b76c0..48bb5838e6 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -68,12 +68,17 @@ class CInteraction : public CObject { class CInteractionController : public CObject { CObList _interactions; int16 _field_20; - int _flag24; + bool _flag24; public: - CInteractionController() : _field_20(0), _flag24(1) {} + CInteractionController() : _field_20(0), _flag24(true) {} virtual bool load(MfcArchive &file); + + void enableFlag24() { _flag24 = true; } + void disableFlag24() { _flag24 = false; } + + void sortInteractions(int sceneId); }; class CInputControllerItemArray { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index dec89119bf..ab4f817373 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -269,6 +269,20 @@ void Scene::deleteStaticANIObject(StaticANIObject *obj) { } } +void Scene::addStaticANIObject(StaticANIObject *obj, bool addList2) { + if (obj->_field_4) + obj->renumPictures(&_staticANIObjectList1); + + _staticANIObjectList1.push_back(obj); + + if (addList2) { + if (!obj->_field_4) + obj->clearFlags(); + + _staticANIObjectList2.push_back(obj); + } +} + void Scene::draw(int par) { updateScrolling(par); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 82041439cd..ac47d7e0ef 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -52,7 +52,8 @@ class Scene : public Background { void updateScrolling(int par); StaticANIObject *getAniMan(); StaticANIObject *getStaticANIObject1ById(int obj, int a3); - void deleteStaticANIObject(StaticANIObject * obj); + void deleteStaticANIObject(StaticANIObject *obj); + void addStaticANIObject(StaticANIObject *obj, bool addList2); }; class SceneTag : public CObject { diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index e3ebc22b80..b79f32f6e3 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -36,17 +36,6 @@ namespace Fullpipe { bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { CGameVar *sceneVar; - int v12; - int v13; - Scene *v14; - int v15; - int v16; - int v17; - int v18; - CNode *v19; - CNode *v20; - Scene *v21; - PictureObject *v22; Common::Point sceneDim; Scene *scene = accessScene(entrance->_sceneId); @@ -100,48 +89,40 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { } } + getGameLoaderInteractionController()->sortInteractions(scene->_sceneId); + _currentScene = scene; + scene->addStaticANIObject(_aniMan, 1); + _scene2 = scene; + _aniMan->_movementObj = 0; + _aniMan->_staticsObj = _aniMan->getStaticsById(ST_MAN_EMPTY); + _aniMan->setOXY(0, 0); + #if 0 - v12 = scene->sceneId; - v13 = (int)getGameLoaderInteractionController(); - CInteractionController_sortInteractions(v13, v12); - v14 = g_currentScene; - g_currentScene = v4; - Scene_addStaticANIObject(scene, (int)g_aniMan, 1); - g_scene2 = v4; - g_aniMan->movementObj = 0; - g_aniMan->staticsObj = StaticANIObject_getStaticsById(g_aniMan, ST_MAN_EMPTY); - (*(void (__stdcall **)(_DWORD))(g_aniMan->GameObject.CObject.vmt + 24))(0); - if (g_aniMan) { - g_aniMan2 = (int)g_aniMan; - v15 = getSc2MotionControllerBySceneId(LOWORD(entrance->sceneId)); - initMovGraph2((void *)v15); - v16 = getSc2MotionControllerBySceneId(LOWORD(entrance->sceneId)); - (*(void (__thiscall **)(int, StaticANIObject *))(*(_DWORD *)v16 + offsetof(CMotionControllerVmt, addObject)))(v16, g_aniMan); - v17 = getSc2MotionControllerBySceneId(LOWORD(entrance->sceneId)); - (*(void (__thiscall **)(int))(*(_DWORD *)v17 + offsetof(CMotionControllerVmt, setField8)))(v17); - v18 = (int)getGameLoaderInteractionController(); - CInteractionController_enableFlag24(v18); + if (_aniMan) { + _aniMan2 = _aniMan; + getSc2MotionControllerBySceneId(entrance->_sceneId)->initMovGraph2(); + getSc2MotionControllerBySceneId(entrance->_sceneId)->addObject(_aniMan); + getSc2MotionControllerBySceneId(entrance->_sceneId)->setEnabled(); + getGameLoaderInteractionController()->enableFlag24(); input_setInputDisabled(0); } else { - g_aniMan2 = 0; + _aniMan2 = 0; } - g_currentScene = v14; - Scene_setPictureObjectsFlag4((int)scene); - if (scene->staticANIObjectList1.m_nCount) { - v19 = scene->staticANIObjectList1.m_pNodeHead; - while (v19) { - v20 = v19; - v19 = v19->pNext; - GameObject_setFlags((GameObject *)v20->data, *((_WORD *)v20->data + 6) & 0xFE7F); - } + + scene->setPictureObjectsFlag4(); + + for (CPtrList::iterator s = scene->_staticANIObjectList1.begin(); s != scene->_staticANIObjectList1.end(); ++s) { + StaticANIObject *o = (StaticANIObject *)s; + o->setFlags(o->field_6 & 0xFE7F); } - v21 = accessScene(SC_INV); - v22 = Scene_getPictureObjectById(v21, PIC_INV_MENU, 0); - GameObject_setFlags(&v22->GameObject, v22->GameObject.flags & 0xFFFB); + + PictureObject *p = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0); + p->setFlags(p->_flags & 0xFFFB); + removeMessageHandler(2, -1); - g_updateScreenCallback = 0; + _updateScreenCallback = 0; - switch (entrance->sceneId) { + switch (entrance->_sceneId) { case SC_INTRO1: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_INTRO1"); scene->preloadMovements(sceneVar); @@ -630,6 +611,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { break; } #endif + return true; } diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 08b09918aa..c383a054e7 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -169,6 +169,10 @@ bool CInteractionController::load(MfcArchive &file) { return _interactions.load(file); } +void CInteractionController::sortInteractions(int sceneId) { + warning("STUB: CInteractionController::sortInteractions(%d)", sceneId); +} + CInputController::CInputController() { // TODO } -- cgit v1.2.3 From 82b596a31e42bf21cec2a31a3a68c07c1936355d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 21 Jul 2013 23:22:04 +0300 Subject: FULLPIPE: Several methods for motion controller --- engines/fullpipe/gameloader.cpp | 8 ++++++++ engines/fullpipe/gameloader.h | 4 +++- engines/fullpipe/motion.h | 17 ++++++++++++++--- engines/fullpipe/scenes.cpp | 10 ++++++---- 4 files changed, 31 insertions(+), 8 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 7f38515afd..abb709825d 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -31,6 +31,14 @@ CInventory2 *getGameLoaderInventory() { return &g_fullpipe->_gameLoader->_inventory; } +CMctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId) { + for (uint i = 0; i < g_fullpipe->_gameLoader->_sc2array.size(); i++) + if (g_fullpipe->_gameLoader->_sc2array[i]._sceneId == sceneId) + return (CMctlCompound *)g_fullpipe->_gameLoader->_sc2array[i]._motionController; + + return 0; +} + CInteractionController *getGameLoaderInteractionController() { return g_fullpipe->_gameLoader->_interactionController; } diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index a37181d5fd..13b100c230 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -29,6 +29,7 @@ namespace Fullpipe { class SceneTag; +class CMctlCompound; class CGameLoader : public CObject { public: @@ -44,6 +45,7 @@ class CGameLoader : public CObject { CGameVar *_gameVar; CInventory2 _inventory; CInteractionController *_interactionController; + Sc2Array _sc2array; private: GameProject *_gameProject; @@ -57,7 +59,6 @@ class CGameLoader : public CObject { int _field_28; int _field_2C; CInputController _inputController; - Sc2Array _sc2array; void *_sceneSwitcher; void *_preloadCallback; void *_readSavegameCallback; @@ -73,6 +74,7 @@ class CGameLoader : public CObject { CInventory2 *getGameLoaderInventory(); CInteractionController *getGameLoaderInteractionController(); +CMctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId); } // End of namespace Fullpipe diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 39fadbe6e2..28e4297337 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -27,11 +27,16 @@ namespace Fullpipe { class CMotionController : public CObject { int _field_4; - int _isEnabled; + bool _isEnabled; public: - CMotionController() : _isEnabled(1) {} + CMotionController() : _isEnabled(true) {} virtual bool load(MfcArchive &file); + + void setEnabled() { _isEnabled = true; } + void clearEnabled() { _isEnabled = false; } + + virtual void addObject(StaticANIObject *obj) {} }; class CMctlCompoundArray : public Common::Array, public CObject { @@ -49,6 +54,9 @@ class CMctlCompound : public CMotionController { public: virtual bool load(MfcArchive &file); + + virtual void addObject(StaticANIObject *obj); + void initMovGraph2(); }; class Unk2 : public CObject { @@ -76,10 +84,11 @@ class CMovGraphReact : public CObject { // Empty }; -class CMctlCompoundArrayItem : public CMotionController { +class CMctlCompoundArrayItem : public CObject { friend class CMctlCompound; protected: + CMotionController *_motionControllerObj; CMovGraphReact *_movGraphReactObj; CMctlConnectionPointsArray _connectionPoints; int _field_20; @@ -149,6 +158,8 @@ class CMovGraph : public CMotionController { public: CMovGraph(); virtual bool load(MfcArchive &file); + + virtual void addObject(StaticANIObject *obj); }; class CMctlConnectionPoint : public CObject { diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index b79f32f6e3..d0d0fabeab 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -29,6 +29,7 @@ #include "fullpipe/scene.h" #include "fullpipe/gameloader.h" #include "fullpipe/sound.h" +#include "fullpipe/motion.h" #include "fullpipe/gameobj.h" @@ -97,18 +98,19 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { _aniMan->_staticsObj = _aniMan->getStaticsById(ST_MAN_EMPTY); _aniMan->setOXY(0, 0); -#if 0 if (_aniMan) { _aniMan2 = _aniMan; - getSc2MotionControllerBySceneId(entrance->_sceneId)->initMovGraph2(); - getSc2MotionControllerBySceneId(entrance->_sceneId)->addObject(_aniMan); - getSc2MotionControllerBySceneId(entrance->_sceneId)->setEnabled(); + CMctlCompound *cmp = getSc2MctlCompoundBySceneId(entrance->_sceneId); + cmp->initMovGraph2(); + cmp->addObject(_aniMan); + cmp->setEnabled(); getGameLoaderInteractionController()->enableFlag24(); input_setInputDisabled(0); } else { _aniMan2 = 0; } +#if 0 scene->setPictureObjectsFlag4(); for (CPtrList::iterator s = scene->_staticANIObjectList1.begin(); s != scene->_staticANIObjectList1.end(); ++s) { -- cgit v1.2.3 From 7aa2377bf7986b77e145adb1350f99013ab35380 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 22 Jul 2013 18:46:03 +0300 Subject: FULLPIPE: Initial stubs for input system --- engines/fullpipe/fullpipe.cpp | 3 +++ engines/fullpipe/fullpipe.h | 4 +++ engines/fullpipe/gameloader.cpp | 6 +++++ engines/fullpipe/gameloader.h | 20 ++++---------- engines/fullpipe/input.cpp | 58 ++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/input.h | 53 ++++++++++++++++++++++++++++++++++++ engines/fullpipe/module.mk | 1 + engines/fullpipe/motion.cpp | 8 ++++++ engines/fullpipe/objects.h | 24 ----------------- engines/fullpipe/scenes.cpp | 3 ++- engines/fullpipe/stateloader.cpp | 4 --- 11 files changed, 140 insertions(+), 44 deletions(-) create mode 100644 engines/fullpipe/input.cpp create mode 100644 engines/fullpipe/input.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 436eabaec6..2123d0887b 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -58,6 +58,9 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _soundEnabled = true; _flgSoundList = true; + _inputController = 0; + _inputDisabled = false; + _needQuit = false; _aniMan = 0; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 5050e1c2e6..468d6ca1ec 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -45,6 +45,7 @@ enum FullpipeGameFeatures { class CGameLoader; class CGameVar; +class CInputController; class CInventory2; class EntranceInfo; class GameProject; @@ -100,6 +101,9 @@ public: StaticANIObject *_aniMan; StaticANIObject *_aniMan2; + CInputController *_inputController; + bool _inputDisabled; + SoundList *_currSoundList1[11]; int _currSoundListCount; bool _soundEnabled; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index abb709825d..c7b547d845 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -24,6 +24,7 @@ #include "fullpipe/gameloader.h" #include "fullpipe/scene.h" +#include "fullpipe/input.h" namespace Fullpipe { @@ -45,6 +46,7 @@ CInteractionController *getGameLoaderInteractionController() { CGameLoader::CGameLoader() { _interactionController = new CInteractionController(); + _inputController = new CInputController(); _gameProject = 0; //_gameName = "untitled"; @@ -68,11 +70,15 @@ CGameLoader::CGameLoader() { //dword_478480 = 0; //g_objectId2 = 0; //g_id = 0; + + warning("STUB: CGameLoader::CGameLoader()"); } CGameLoader::~CGameLoader() { free(_gameName); delete _gameProject; + delete _interactionController; + delete _inputController; } bool CGameLoader::load(MfcArchive &file) { diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 13b100c230..ce933cb000 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -30,6 +30,7 @@ namespace Fullpipe { class SceneTag; class CMctlCompound; +class CInputController; class CGameLoader : public CObject { public: @@ -42,29 +43,18 @@ class CGameLoader : public CObject { int getSceneTagBySceneId(int num, SceneTag **st); void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount); - CGameVar *_gameVar; - CInventory2 _inventory; + GameProject *_gameProject; CInteractionController *_interactionController; + CInputController *_inputController; + CInventory2 _inventory; Sc2Array _sc2array; - - private: - GameProject *_gameProject; - int _field_C; - int _field_10; - int _field_14; - int _field_18; - int _field_1C; - int _field_20; - int _field_24; - int _field_28; - int _field_2C; - CInputController _inputController; void *_sceneSwitcher; void *_preloadCallback; void *_readSavegameCallback; int16 _field_F8; int16 _field_FA; PreloadItems _preloadItems; + CGameVar *_gameVar; char *_gameName; ExCommand _exCommand; int _updateCounter; diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp new file mode 100644 index 0000000000..68efacf74b --- /dev/null +++ b/engines/fullpipe/input.cpp @@ -0,0 +1,58 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" +#include "fullpipe/input.h" + +namespace Fullpipe { + +CInputController::CInputController() { + g_fullpipe->_inputController = this; + + _flag = 0; + _cursorHandle = 0; + _hCursor = 0; + _field_14 = 0; + _cursorId = 0; + _cursorIndex = -1; + _flags = 1; + + _cursorBounds.left = 0; + _cursorBounds.top = 0; + _cursorBounds.right = 0; + _cursorBounds.bottom = 0; + + _cursorItemPicture = 0; +} + +void CInputController::setInputDisabled(bool state) { + _flag = state; + g_fullpipe->_inputDisabled = state; +} + +void setInputDisabled(bool state) { + g_fullpipe->_inputController->setInputDisabled(state); +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h new file mode 100644 index 0000000000..a9106b7b01 --- /dev/null +++ b/engines/fullpipe/input.h @@ -0,0 +1,53 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_INPUT_H +#define FULLPIPE_INPUT_H + +namespace Fullpipe { + +void setInputDisabled(bool state); + +class CInputControllerItemArray : public CObArray { +}; + +class CInputController { + //CObject obj; + int _flag; + int _flags; + int _cursorHandle; + int _hCursor; + int _field_14; + int _cursorId; + int _cursorIndex; + CInputControllerItemArray _cursorsArray; + Common::Rect _cursorBounds; + int _cursorItemPicture; + + public: + CInputController(); + void setInputDisabled(bool state); +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_INPUT_H */ diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index cced876a25..62d9aa3f1c 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -5,6 +5,7 @@ MODULE_OBJS = \ fullpipe.o \ gameloader.o \ gfx.o \ + input.o \ inventory.o \ messagequeue.o \ motion.o \ diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 097ef34209..6defc93eaa 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -72,6 +72,10 @@ bool CMctlCompound::load(MfcArchive &file) { return true; } +void CMctlCompound::addObject(StaticANIObject *obj) { + warning("STUB: CMctlCompound::addObject()"); +} + bool CMctlCompoundArray::load(MfcArchive &file) { debug(5, "CMctlCompoundArray::load()"); @@ -101,6 +105,10 @@ bool CMovGraph::load(MfcArchive &file) { return true; } +void CMovGraph::addObject(StaticANIObject *obj) { + warning("STUB: CMovGraph::addObject()"); +} + CMovGraphLink::CMovGraphLink() { _distance = 0; _angle = 0; diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 48bb5838e6..65113a9bcf 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -81,30 +81,6 @@ class CInteractionController : public CObject { void sortInteractions(int sceneId); }; -class CInputControllerItemArray { - CObArray objs; -}; - -class CInputController { - //CObject obj; - int _flag; - int _flags; - int _cursorHandle; - int _hCursor; - int _field_14; - int _cursorId; - int _cursorIndex; - CInputControllerItemArray _cursorsArray; - int _cursorDrawX; - int _cursorDrawY; - int _cursorDrawWidth; - int _cursorDrawHeight; - int _cursorItemPicture; - - public: - CInputController(); -}; - struct PicAniInfo { int32 type; int16 objectId; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index d0d0fabeab..03017f65cd 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -30,6 +30,7 @@ #include "fullpipe/gameloader.h" #include "fullpipe/sound.h" #include "fullpipe/motion.h" +#include "fullpipe/input.h" #include "fullpipe/gameobj.h" @@ -105,7 +106,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { cmp->addObject(_aniMan); cmp->setEnabled(); getGameLoaderInteractionController()->enableFlag24(); - input_setInputDisabled(0); + setInputDisabled(0); } else { _aniMan2 = 0; } diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index c383a054e7..875b469509 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -173,10 +173,6 @@ void CInteractionController::sortInteractions(int sceneId) { warning("STUB: CInteractionController::sortInteractions(%d)", sceneId); } -CInputController::CInputController() { - // TODO -} - CInteraction::CInteraction() { _objectId1 = 0; _objectId2 = 0; -- cgit v1.2.3 From 9d83eb1aeacf7bed6105875289a5960a06571035 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 22 Jul 2013 22:46:08 +0300 Subject: FULLPIPE: More work on sceneSwitcher. MessageHandler --- engines/fullpipe/fullpipe.cpp | 3 +++ engines/fullpipe/fullpipe.h | 4 ++++ engines/fullpipe/gfx.h | 1 + engines/fullpipe/messagequeue.cpp | 32 ++++++++++++++++++++++++++++++++ engines/fullpipe/messagequeue.h | 11 +++++++++++ engines/fullpipe/scene.cpp | 15 +++++++++++++++ engines/fullpipe/scene.h | 2 ++ engines/fullpipe/scenes.cpp | 5 +++-- 8 files changed, 71 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 2123d0887b..bbd43b63c2 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -69,6 +69,9 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _scene2 = 0; _globalMessageQueueList = 0; + _messageHandlers = 0; + + _updateScreenCallback = 0; g_fullpipe = this; } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 468d6ca1ec..4253499bdd 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -50,6 +50,7 @@ class CInventory2; class EntranceInfo; class GameProject; class GlobalMessageQueueList; +class MessageHandler; class NGIArchive; class Scene; class SoundList; @@ -110,6 +111,7 @@ public: bool _flgSoundList; GlobalMessageQueueList *_globalMessageQueueList; + MessageHandler *_messageHandlers; bool _needQuit; @@ -124,6 +126,8 @@ public: Scene *_inventoryScene; CInventory2 *_inventory; + int (*_updateScreenCallback)(void *); + void setObjectState(const char *name, int state); int getObjectEnumState(const char *name, const char *state); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 7eea54241c..44919fdc69 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -110,6 +110,7 @@ class GameObject : public CObject { virtual bool load(MfcArchive &file); void setOXY(int x, int y); void renumPictures(CPtrList *lst); + void setFlags(int16 flags) { _flags = flags; } }; class PictureObject : public GameObject { diff --git a/engines/fullpipe/messagequeue.cpp b/engines/fullpipe/messagequeue.cpp index 3c9e0889fc..7688a6a129 100644 --- a/engines/fullpipe/messagequeue.cpp +++ b/engines/fullpipe/messagequeue.cpp @@ -87,4 +87,36 @@ void GlobalMessageQueueList::disableQueueById(int id) { } } +bool removeMessageHandler(int16 id, int pos) { + if (g_fullpipe->_messageHandlers) { + MessageHandler *curItem = g_fullpipe->_messageHandlers; + MessageHandler *prevItem = 0; + int curPos = 0; + + while (id != curItem->id) { + prevItem = curItem; + curItem = curItem->nextItem; + curPos++; + + if (!curItem) + return false; + } + + if (pos == -1 || curPos == pos) { + prevItem->nextItem = curItem->nextItem; + delete curItem; + updateMessageHandlerIndex(prevItem->nextItem, -1); + + return true; + } + } + + return false; +} + +void updateMessageHandlerIndex(MessageHandler *msg, int offset) { + for (; msg; msg = msg->nextItem) + msg->index += offset; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/messagequeue.h b/engines/fullpipe/messagequeue.h index 1f4cf02bfc..bb8d4108e3 100644 --- a/engines/fullpipe/messagequeue.h +++ b/engines/fullpipe/messagequeue.h @@ -62,6 +62,17 @@ class GlobalMessageQueueList : public CPtrList { void disableQueueById(int id); }; +struct MessageHandler { + int (*callback)(ExCommand *cmd); + int16 id; + int16 field_6; + int index; + MessageHandler *nextItem; +}; + +bool removeMessageHandler(int16 id, int pos); +void updateMessageHandlerIndex(MessageHandler *msg, int offset); + } // End of namespace Fullpipe #endif /* FULLPIPE_MESSAGEQUEUE_H */ diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index ab4f817373..3bc7c9d412 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -283,6 +283,21 @@ void Scene::addStaticANIObject(StaticANIObject *obj, bool addList2) { } } +void Scene::setPictureObjectsFlag4() { + for (uint i = 0; i < _picObjList.size(); i++) { + ((PictureObject *)_picObjList[i])->_flags |= 4; + } +} + +PictureObject *Scene::getPictureObjectById(int objId, int flags) { + for (uint i = 1; i < _picObjList.size(); i++) { + if(((PictureObject *)_picObjList[i])->_id == objId && ((PictureObject *)_picObjList[i])->_field_4 == flags) + return (PictureObject *)_picObjList[i]; + } + + return 0; +} + void Scene::draw(int par) { updateScrolling(par); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index ac47d7e0ef..4085b058a7 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -54,6 +54,8 @@ class Scene : public Background { StaticANIObject *getStaticANIObject1ById(int obj, int a3); void deleteStaticANIObject(StaticANIObject *obj); void addStaticANIObject(StaticANIObject *obj, bool addList2); + void setPictureObjectsFlag4(); + PictureObject *getPictureObjectById(int objId, int flags); }; class SceneTag : public CObject { diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 03017f65cd..46ef73ad5e 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -31,6 +31,7 @@ #include "fullpipe/sound.h" #include "fullpipe/motion.h" #include "fullpipe/input.h" +#include "fullpipe/messagequeue.h" #include "fullpipe/gameobj.h" @@ -111,12 +112,11 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { _aniMan2 = 0; } -#if 0 scene->setPictureObjectsFlag4(); for (CPtrList::iterator s = scene->_staticANIObjectList1.begin(); s != scene->_staticANIObjectList1.end(); ++s) { StaticANIObject *o = (StaticANIObject *)s; - o->setFlags(o->field_6 & 0xFE7F); + o->setFlags(o->_field_6 & 0xFE7F); } PictureObject *p = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0); @@ -125,6 +125,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { removeMessageHandler(2, -1); _updateScreenCallback = 0; +#if 0 switch (entrance->_sceneId) { case SC_INTRO1: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_INTRO1"); -- cgit v1.2.3 From 4dc47c5c08d44766fe75e2e982f0cea05b8238aa Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 22 Jul 2013 23:38:11 +0300 Subject: FULLPIPE: More message handler-related functions --- engines/fullpipe/messagequeue.cpp | 136 ++++++++++++++++++++++++++++++++++++++ engines/fullpipe/messagequeue.h | 8 +++ 2 files changed, 144 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messagequeue.cpp b/engines/fullpipe/messagequeue.cpp index 7688a6a129..9d2ec383fb 100644 --- a/engines/fullpipe/messagequeue.cpp +++ b/engines/fullpipe/messagequeue.cpp @@ -119,4 +119,140 @@ void updateMessageHandlerIndex(MessageHandler *msg, int offset) { msg->index += offset; } +void addMessageHandler(int (*callback)(ExCommand *), int16 id) { + if (getMessageHandlerById(id)) + return; + + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + if (!curItem) + return; + + int index = 0; + for (MessageHandler *i = g_fullpipe->_messageHandlers->nextItem; i; i = i->nextItem) { + curItem = i; + index++; + } + + allocMessageHandler(curItem, id, callback, index); + + if (curItem) + updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); + +} + +MessageHandler *getMessageHandlerById(int16 id) { + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + if (!curItem) + return 0; + + while (id != curItem->id) { + curItem = curItem->nextItem; + + if (!curItem) + return 0; + } + + return curItem; +} + +bool allocMessageHandler(MessageHandler *where, int16 id, int (*callback)(ExCommand *), int index) { + MessageHandler *msg = new MessageHandler; + + if (where) { + msg->nextItem = where->nextItem; + where->nextItem = msg; + msg->id = id; + msg->callback = callback; + msg->index = index; + } else { + msg->nextItem = 0; + msg->id = id; + msg->callback = callback; + msg->index = 0; + + g_fullpipe->_messageHandlers = msg; + } + + return true; +} + +int getMessageHandlersCount() { + int result; + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + for (result = 0; curItem; result++) + curItem = curItem->nextItem; + + return result; +} + +bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id) { + if (getMessageHandlerById(id)) + return false; + + if (index) { + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + for (int i = index - 1; i > 0; i--) + if (curItem) + curItem = curItem->nextItem; + + bool res = allocMessageHandler(curItem, id, callback, index); + + if (res) + updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); + + return res; + } else { + MessageHandler *newItem = new MessageHandler; + + newItem->nextItem = g_fullpipe->_messageHandlers; + newItem->id = id; + newItem->callback = callback; + newItem->index = 0; + + updateMessageHandlerIndex(g_fullpipe->_messageHandlers, 1); + g_fullpipe->_messageHandlers = newItem; + + return true; + } +} + +bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id) { + if (getMessageHandlerById(id)) + return false; + + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + for (int i = index; i > 0; i--) + if (curItem) + curItem = curItem->nextItem; + + bool res = allocMessageHandler(curItem, id, callback, index + 1); + if (curItem) + updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); + + return res; +} + +void clearMessageHandlers() { + MessageHandler *curItem; + MessageHandler *nextItem; + + curItem = g_fullpipe->_messageHandlers; + if (curItem) { + do { + nextItem = curItem->nextItem; + + delete curItem; + + curItem = nextItem; + } while (nextItem); + + g_fullpipe->_messageHandlers = 0; + } +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/messagequeue.h b/engines/fullpipe/messagequeue.h index bb8d4108e3..b47bf49049 100644 --- a/engines/fullpipe/messagequeue.h +++ b/engines/fullpipe/messagequeue.h @@ -72,6 +72,14 @@ struct MessageHandler { bool removeMessageHandler(int16 id, int pos); void updateMessageHandlerIndex(MessageHandler *msg, int offset); +void addMessageHandler(int (*callback)(ExCommand *), int16 id); +MessageHandler *getMessageHandlerById(int16 id); +bool allocMessageHandler(MessageHandler *where, int16 id, int (*callback)(ExCommand *), int index); +int getMessageHandlersCount(); +bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id); +bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id); +void clearMessageHandlers(); + } // End of namespace Fullpipe -- cgit v1.2.3 From 22eedf56002b0d1b92d5bf51ff790cc7ac036151 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 23 Jul 2013 01:42:22 +0300 Subject: FULLPIPE: Further work on Scene switcher --- engines/fullpipe/fullpipe.cpp | 3 +++ engines/fullpipe/fullpipe.h | 3 +++ engines/fullpipe/scene.cpp | 39 +++++++++++++++++++++++++++++++++++++++ engines/fullpipe/scene.h | 9 +++++++++ engines/fullpipe/scenes.cpp | 32 ++++++++++++++++++++++++++++++-- engines/fullpipe/statics.cpp | 27 +++++++++++++++++++++++++++ engines/fullpipe/statics.h | 5 +++++ 7 files changed, 116 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index bbd43b63c2..bcaca93836 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -72,6 +72,9 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _messageHandlers = 0; _updateScreenCallback = 0; + _updateCursorCallback = 0; + + _cursorId = 0; g_fullpipe = this; } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 4253499bdd..ecc2a0344a 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -127,6 +127,9 @@ public: CInventory2 *_inventory; int (*_updateScreenCallback)(void *); + int (*_updateCursorCallback)(); + + int _cursorId; void setObjectState(const char *name, int state); int getObjectEnumState(const char *name, const char *state); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 3bc7c9d412..4409215ea5 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -255,6 +255,16 @@ StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) { return 0; } +StaticANIObject *Scene::getStaticANIObject1ByName(char *name, int a3) { + for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) { + StaticANIObject *o = (StaticANIObject *)s; + if (!strcmp(o->_objectName, name) && (a3 == -1 || o->_field_4 == a3)) + return o; + } + + return 0; +} + void Scene::deleteStaticANIObject(StaticANIObject *obj) { for (uint n = 0; n < _staticANIObjectList1.size(); n++) if ((StaticANIObject *)_staticANIObjectList1[n] == obj) { @@ -298,6 +308,35 @@ PictureObject *Scene::getPictureObjectById(int objId, int flags) { return 0; } +void Scene::preloadMovements(CGameVar *var) { + CGameVar *preload = var->getSubVarByName("PRELOAD"); + if (!preload) + return; + + for (CGameVar *i = preload->_subVars; i; i = i->_nextVarObj) { + StaticANIObject *ani = getStaticANIObject1ByName(i->_varName, -1); + + if (ani) { + CGameVar *subVars = i->_subVars; + + if (subVars) { + for (;subVars; subVars = subVars->_nextVarObj) { + Movement *mov = ani->getMovementByName(subVars->_varName); + + if (mov) + mov->loadPixelData(); + } + } else { + ani->loadMovementsPixelData(); + } + } + } +} + +void Scene::initObjectCursors(const char *name) { + warning("STUB: Scene::initObjectCursors(%s)", name); +} + void Scene::draw(int par) { updateScrolling(par); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 4085b058a7..cc2e2edd4e 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -44,18 +44,27 @@ class Scene : public Background { public: Scene(); + virtual bool load(MfcArchive &file); + void initStaticANIObjects(); void init(); void draw(int par); void drawContent(int minPri, int maxPri, bool drawBG); void updateScrolling(int par); + StaticANIObject *getAniMan(); StaticANIObject *getStaticANIObject1ById(int obj, int a3); + StaticANIObject *getStaticANIObject1ByName(char *name, int a3); + void deleteStaticANIObject(StaticANIObject *obj); void addStaticANIObject(StaticANIObject *obj, bool addList2); + void setPictureObjectsFlag4(); PictureObject *getPictureObjectById(int objId, int flags); + void preloadMovements(CGameVar *var); + + void initObjectCursors(const char *name); }; class SceneTag : public CObject { diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 46ef73ad5e..c0a6a82ec4 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -37,6 +37,9 @@ namespace Fullpipe { +int sceneIntro_updateCursor(); +void sceneIntro_initScene(Scene *sc); + bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { CGameVar *sceneVar; Common::Point sceneDim; @@ -125,7 +128,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { removeMessageHandler(2, -1); _updateScreenCallback = 0; -#if 0 switch (entrance->_sceneId) { case SC_INTRO1: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_INTRO1"); @@ -138,6 +140,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { _updateCursorCallback = sceneIntro_updateCursor; break; +#if 0 case SC_1: scene01_sub_40E160(); sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_1"); @@ -609,14 +612,39 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_DBGMENU"); addMessageHandler(sceneHandlerDbgMenu, 2); break; +#endif default: _behaviorManager->initBehavior(0, 0); break; } -#endif return true; } +int sceneIntro_updateCursor() { + g_fullpipe->_cursorId = 0; + + return 0; +} + +void sceneIntro_initScene(Scene *sc) { + g_fullpipe->_gameLoader->loadScene(SC_INTRO2); + + warning("STUB: FullpipeEngine::sceneIntro_initScene()"); + +#if 0 + sceneIntro_aniin1man = sc->_getStaticANIObject1ById(ANI_IN1MAN, -1); + sceneIntro_needSleep = 1; + sceneIntro_needGetup = 0; + sceneIntro_dword_477938 = 1; + sceneIntro_dword_477934 = 0; + + if (g_fullpipe->_recordEvents || g_fullpipe->_inputArFlag) + sceneIntro_skipIntro = 0; + + g_fullpipe->_modalObject = new CModalIntro; +#endif +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index d0abbb87e6..b84703eee3 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -187,6 +187,19 @@ Movement *StaticANIObject::getMovementById(int itemId) { return 0; } +Movement *StaticANIObject::getMovementByName(char *name) { + for (uint i = 0; i < _movements.size(); i++) + if (!strcmp(((Movement *)_movements[i])->_objectName, name)) + return (Movement *)_movements[i]; + + return 0; +} + +void StaticANIObject::loadMovementsPixelData() { + for (uint i = 0; i < _movements.size(); i++) + ((Movement *)_movements[i])->loadPixelData(); +} + Statics *StaticANIObject::addStatics(Statics *ani) { warning("STUB: StaticANIObject::addStatics"); @@ -351,6 +364,20 @@ void Movement::updateCurrDynamicPhase() { } } +void Movement::loadPixelData() { + Movement *mov = this; + for (Movement *i = _currMovementObj; i; i = i->_currMovementObj) + mov = i; + + for (uint i = 0; i < _dynamicPhases.size(); i++) { + if ((Statics *)_dynamicPhases[i] != mov->_staticsObj2 || !(mov->_staticsObj2->_staticsId & 0x4000) ) + ((Statics *)_dynamicPhases[i])->getPixelData(); + } + + if (!(mov->_staticsObj1->_staticsId & 0x4000)) + mov->_staticsObj1->getPixelData(); +} + DynamicPhase::DynamicPhase() { _someX = 0; _rect = 0; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index f8df64ddc0..04a4863517 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -120,6 +120,8 @@ class Movement : public GameObject { void initStatics(StaticANIObject *ani); void updateCurrDynamicPhase(); + + void loadPixelData(); }; class StaticANIObject : public GameObject { @@ -155,12 +157,15 @@ class StaticANIObject : public GameObject { void setOXY(int x, int y); Statics *getStaticsById(int id); Movement *getMovementById(int id); + Movement *getMovementByName(char *name); void clearFlags(); bool isIdle(); void deleteFromGlobalMessageQueue(); + void loadMovementsPixelData(); + Statics *addStatics(Statics *ani); void draw(); void draw2(); -- cgit v1.2.3 From f54055d1eece57b4d939e1d0a96cbb379b955b39 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 23 Jul 2013 13:33:28 +0300 Subject: FULLPIPE: Finished stubbing SceneSwitcher. Added Behavior Manager --- engines/fullpipe/behavior.cpp | 39 +++++++++++++++++++++++++ engines/fullpipe/behavior.h | 66 +++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/fullpipe.cpp | 4 +++ engines/fullpipe/fullpipe.h | 4 +++ engines/fullpipe/module.mk | 1 + engines/fullpipe/scenes.cpp | 10 ++++++- engines/fullpipe/sound.cpp | 4 +++ 7 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 engines/fullpipe/behavior.cpp create mode 100644 engines/fullpipe/behavior.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp new file mode 100644 index 0000000000..e9d4be8207 --- /dev/null +++ b/engines/fullpipe/behavior.cpp @@ -0,0 +1,39 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" +#include "fullpipe/behavior.h" + +namespace Fullpipe { + +BehaviorManager::BehaviorManager() { + _scene = 0; + _isActive = 1; +} + +void BehaviorManager::initBehavior(Scene *scene, CGameVar *var) { + warning("STUB: initBehavior()"); +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h new file mode 100644 index 0000000000..5e3b09086d --- /dev/null +++ b/engines/fullpipe/behavior.h @@ -0,0 +1,66 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_BEHAVIOR_H +#define FULLPIPE_BEHAVIOR_H + +namespace Fullpipe { + +class BehaviorManager : public CObject { + CObArray _behaviors; + Scene *_scene; + bool _isActive; + + public: + BehaviorManager(); + + void initBehavior(Scene *scene, CGameVar *var); +}; + +struct BehaviorEntryInfo { + int _messageQueue; + int _delay; + int _percent; + int _flags; +}; + +struct BehaviorEntry { + int _staticsId; + int _itemsCount; + int _flags; + BehaviorEntryInfo *_items; +}; + +struct BehaviorInfo { + StaticANIObject *_ani; + int _staticsId; + int _counter; + int _counterMax; + int _flags; + int _subIndex; + int _itemsCount; + BehaviorEntryInfo *_items; +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_BEHAVIOR_H */ diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index bcaca93836..fa332d10d3 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -32,6 +32,7 @@ #include "fullpipe/objects.h" #include "fullpipe/gameloader.h" #include "fullpipe/messagequeue.h" +#include "fullpipe/behavior.h" namespace Fullpipe { @@ -74,6 +75,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _updateScreenCallback = 0; _updateCursorCallback = 0; + _behaviorManager = 0; + _cursorId = 0; g_fullpipe = this; @@ -86,6 +89,7 @@ FullpipeEngine::~FullpipeEngine() { void FullpipeEngine::initialize() { _globalMessageQueueList = new GlobalMessageQueueList; + _behaviorManager = new BehaviorManager; } Common::Error FullpipeEngine::run() { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index ecc2a0344a..4415115588 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -43,6 +43,7 @@ namespace Fullpipe { enum FullpipeGameFeatures { }; +class BehaviorManager; class CGameLoader; class CGameVar; class CInputController; @@ -113,6 +114,8 @@ public: GlobalMessageQueueList *_globalMessageQueueList; MessageHandler *_messageHandlers; + BehaviorManager *_behaviorManager; + bool _needQuit; void initObjectStates(); @@ -136,6 +139,7 @@ public: bool sceneSwitcher(EntranceInfo *entrance); Scene *accessScene(int sceneId); + void setSceneMusicParameters(CGameVar *var); NGIArchive *_currArchive; diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 62d9aa3f1c..934d916ed1 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -1,6 +1,7 @@ MODULE := engines/fullpipe MODULE_OBJS = \ + behavior.o \ detection.o \ fullpipe.o \ gameloader.o \ diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index c0a6a82ec4..9359709b19 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -32,6 +32,7 @@ #include "fullpipe/motion.h" #include "fullpipe/input.h" #include "fullpipe/messagequeue.h" +#include "fullpipe/behavior.h" #include "fullpipe/gameobj.h" @@ -39,6 +40,7 @@ namespace Fullpipe { int sceneIntro_updateCursor(); void sceneIntro_initScene(Scene *sc); +int sceneHandlerIntro(ExCommand *cmd); bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { CGameVar *sceneVar; @@ -631,7 +633,7 @@ int sceneIntro_updateCursor() { void sceneIntro_initScene(Scene *sc) { g_fullpipe->_gameLoader->loadScene(SC_INTRO2); - warning("STUB: FullpipeEngine::sceneIntro_initScene()"); + warning("STUB: sceneIntro_initScene()"); #if 0 sceneIntro_aniin1man = sc->_getStaticANIObject1ById(ANI_IN1MAN, -1); @@ -647,4 +649,10 @@ void sceneIntro_initScene(Scene *sc) { #endif } +int sceneHandlerIntro(ExCommand *cmd) { + warning("STUB: sceneHandlerIntro()"); + + return 0; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 8323a57bae..ced3bf1c11 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -106,4 +106,8 @@ void Sound::updateVolume() { warning("STUB Sound::updateVolume()"); } +void FullpipeEngine::setSceneMusicParameters(CGameVar *var) { + warning("STUB: FullpipeEngine::setSceneMusicParameters()"); +} + } // End of namespace Fullpipe -- cgit v1.2.3 From dbe5524fe036e51ebaafa900ce237b85e79020e8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 25 Jul 2013 00:34:15 +0300 Subject: FULLPIPE: First part of scene drawing code --- engines/fullpipe/fullpipe.cpp | 19 +++++ engines/fullpipe/gfx.h | 1 + engines/fullpipe/motion.cpp | 4 + engines/fullpipe/scene.cpp | 178 +++++++++++++++++++++++++++++++++++++-- engines/fullpipe/scene.h | 8 +- engines/fullpipe/stateloader.cpp | 5 +- 6 files changed, 202 insertions(+), 13 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index fa332d10d3..2e0444417c 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -105,6 +105,25 @@ Common::Error FullpipeEngine::run() { loadGam("fullpipe.gam"); + EntranceInfo ent; + + ent._sceneId = 3896; + sceneSwitcher(&ent); + + while (!g_fullpipe->_needQuit) { + updateEvents(); + _system->delayMillis(10); + _system->updateScreen(); + + _currentScene->draw(); + + if (g_fullpipe->_keyState == ' ') { + g_fullpipe->_keyState = Common::KEYCODE_INVALID; + break; + } + } + + return Common::kNoError; } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 44919fdc69..4f89f39188 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -111,6 +111,7 @@ class GameObject : public CObject { void setOXY(int x, int y); void renumPictures(CPtrList *lst); void setFlags(int16 flags) { _flags = flags; } + void clearFlags() { _flags = 0; } }; class PictureObject : public GameObject { diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 6defc93eaa..fed3cb79ff 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -76,6 +76,10 @@ void CMctlCompound::addObject(StaticANIObject *obj) { warning("STUB: CMctlCompound::addObject()"); } + void CMctlCompound::initMovGraph2() { + warning("STUB: CMctlCompound::initMovGraph2()"); +} + bool CMctlCompoundArray::load(MfcArchive &file) { debug(5, "CMctlCompoundArray::load()"); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 4409215ea5..87ef2bd562 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -29,6 +29,8 @@ #include "fullpipe/gameobj.h" +#include "common/algorithm.h" + namespace Fullpipe { Scene *FullpipeEngine::accessScene(int sceneId) { @@ -224,7 +226,8 @@ bool Scene::load(MfcArchive &file) { initStaticANIObjects(); - warning("STUB: Scene::load (%d bytes left)", file.size() - file.pos()); + if (file.size() - file.pos() > 0) + error("Scene::load (%d bytes left)", file.size() - file.pos()); return true; } @@ -234,7 +237,23 @@ void Scene::initStaticANIObjects() { } void Scene::init() { - warning("STUB: Scene::init()"); + _x = 0; + _y = 0; + + g_fullpipe->_sceneRect.moveTo(0, 0); + + for (uint i = 0; i < _picObjList.size(); i++) + ((PictureObject *)_picObjList[i])->clearFlags(); + + for (uint i = 0; i < _staticANIObjectList1.size(); i++) + ((PictureObject *)_staticANIObjectList1[i])->clearFlags(); + + if (_staticANIObjectList2.size() != _staticANIObjectList1.size()) { + _staticANIObjectList2.clear(); + + for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) + _staticANIObjectList2.push_back(*s); + } } StaticANIObject *Scene::getAniMan() { @@ -337,12 +356,23 @@ void Scene::initObjectCursors(const char *name) { warning("STUB: Scene::initObjectCursors(%s)", name); } -void Scene::draw(int par) { - updateScrolling(par); +bool Scene::compareObjPriority(const void *p1, const void *p2) { + if (((StaticANIObject *)p1)->_priority < ((StaticANIObject *)p2)->_priority) + return true; + + return false; +} + +void Scene::objectList_sortByPriority(CPtrList &list) { + Common::sort(list.begin(), list.end(), Scene::compareObjPriority); +} + +void Scene::draw() { + updateScrolling(); drawContent(60000, 0, true); - //_staticANIObjectList2.sortByPriority(); + objectList_sortByPriority(_staticANIObjectList2); for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) { ((StaticANIObject *)s)->draw2(); @@ -359,7 +389,7 @@ void Scene::draw(int par) { drawContent(-1, priority, false); } -void Scene::updateScrolling(int par) { +void Scene::updateScrolling() { warning("STUB Scene::updateScrolling()"); } @@ -372,8 +402,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { } if (_picObjList.size() > 2) { // We need to z-sort them - // Sort by priority - warning("Scene::drawContent: STUB sort by priority"); + objectList_sortByPriority(_picObjList); } if (minPri == -1 && _picObjList.size()) @@ -383,7 +412,138 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { maxPri = 60000; if (drawBg && _bigPictureArray1Count && _picObjList.size()) { - } + Common::Point point; + + _bigPictureArray[0][0]->getDimensions(&point); + + int width = point.x; + int height = point.y; + + ((PictureObject *)_picObjList[0])->getDimensions(&point); + + int bgStX = g_fullpipe->_sceneRect.left % point.x; + + if (bgStX < 0) + bgStX += point.x; + + int bgNumX = bgStX / width; + int bgOffsetX = bgStX % width; + + int bgStY = g_fullpipe->_sceneRect.top % point.y; + + if (bgStY < 0) + bgStY += point.y; + + int bgNumY = bgStY / height; + int bgOffsetY = bgStY % height; + + int bgPosX = g_fullpipe->_sceneRect.left - bgOffsetX; + + if (bgPosX < g_fullpipe->_sceneRect.right - 1) { + int v24 = height * bgNumY; + int v51 = height * bgNumY; + while (1) { + int v25 = bgNumY; + for (int y = g_fullpipe->_sceneRect.top - point.y; y < g_fullpipe->_sceneRect.bottom - 1; ) { + BigPicture *v27 = _bigPictureArray[bgNumX][v25]; + v27->draw(bgPosX, y, 0, 0); + y += v27->getDimensions(&point)->y; + v25++; + + if (v25 >= _bigPictureArray2Count) { + if (!((PictureObject *)_picObjList[0])->_flags & 0x20) + break; + v25 = 0; + } + } + _bigPictureArray[bgNumX][0]->getDimensions(&point); + int v32 = point.x + bgPosX; + bgPosX += point.x; + bgNumX++; + + if (bgNumX >= _bigPictureArray1Count) { + if (!((PictureObject *)_picObjList[0])->_flags & 0x2) + break; + bgNumX = 0; + } + if (v32 >= g_fullpipe->_sceneRect.right - 1) + break; + v24 = v51; + } + } + } + +#if 0 + v34 = this_->bg.picObjList.m_pNodeHead; + if (v34) { + while (1) { + v35 = v34->pNext; + v36 = (PictureObject *)v34->data; + drawBgb = v35; + v37 = v36->GameObject.priority; + if (v37 >= minPri && v37 < maxPri) { + v38 = v36->GameObject.ox; + v39 = v36->GameObject.oy; + v40 = PictureObject_getDimensions(v36, &v58); + v41 = v40->x; + bgOffsetXa = v40->y; + if (v36->GameObject.flags & 8) { + while (v38 > g_sceneRect.right) { + v38 -= v41; + v36->setOXY(v38, v39); + } + for (j = v41 + v38; v41 + v38 < g_sceneRect.left; j = v41 + v38) { + v38 = j; + v36->setOXY(j, v39); + } + } + if (v36->GameObject.flags & 0x10) { + while (v39 > g_sceneRect.bottom) { + v39 -= bgOffsetXa; + v36->setOXY(v38, v39); + } + for (k = v39 + bgOffsetXa; v39 + bgOffsetXa < g_sceneRect.top; k = v39 + bgOffsetXa) { + v39 = k; + v36->setOXY(v38, k); + } + } + if (v36->GameObject.flags & 4) + v36->draw(); + if (v36->GameObject.flags & 2) { + if (v38 > g_sceneRect.left) { + v44 = v38 - v41; + v36->setOXY(v44, v39); + v36->draw(); + v38 = v41 + v44; + v36->setOXY(v38, v39); + } + if (v41 + v38 < g_sceneRect.right) { + v36->setOXY(v41 + v38, v39); + v36->draw(); + v36->setOXY(v38, v39); + } + } + if (v36->GameObject.flags & 0x20) { + if (v39 > g_sceneRect.top) { + v45 = v39 - bgOffsetXa; + v36->setOXY(v38, v45); + v36->draw(); + v39 = bgOffsetXa + v45; + v36->setOXY(v38, v39); + } + if (bgOffsetXa + v39 < g_sceneRect.bottom) { + v36->setOXY(v38, bgOffsetXa + v39); + v36->draw(); + v36->setOXY(v38, v39); + } + } + } + if (!drawBgb) + break; + v34 = drawBgb; + } + } +#endif } } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index cc2e2edd4e..e054403a89 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -49,9 +49,9 @@ class Scene : public Background { void initStaticANIObjects(); void init(); - void draw(int par); + void draw(); void drawContent(int minPri, int maxPri, bool drawBG); - void updateScrolling(int par); + void updateScrolling(); StaticANIObject *getAniMan(); StaticANIObject *getStaticANIObject1ById(int obj, int a3); @@ -65,6 +65,10 @@ class Scene : public Background { void preloadMovements(CGameVar *var); void initObjectCursors(const char *name); + + private: + static bool compareObjPriority(const void *p1, const void *p2); + void objectList_sortByPriority(CPtrList &list); }; class SceneTag : public CObject { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 875b469509..32970a92ba 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -47,7 +47,7 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->setItemFlags(ANI_INV_MAP, 0x10003); _inventory->addItem(ANI_INV_MAP, 1); -#if 1 +#if 0 g_fullpipe->accessScene(301); g_fullpipe->accessScene(302); g_fullpipe->accessScene(303); @@ -491,7 +491,8 @@ bool Sc2::load(MfcArchive &file) { _entranceData = 0; } - debug(4, "pos: %d, 0x%x: %d", file.size(), file.pos(), file.size() - file.pos()); + if (file.size() - file.pos() > 0) + error("Sc2::load(): (%d bytes left)", file.size() - file.pos()); return true; } -- cgit v1.2.3 From aaf5bae026416e158d69633eb1b07c73a63fcccd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 25 Jul 2013 15:43:10 +0300 Subject: FULLPIPE: Fixed initial scene drawing. Scene bg is shown --- engines/fullpipe/fullpipe.cpp | 34 ++++++++++++++++++++--- engines/fullpipe/gameloader.cpp | 26 ++++++++++++++---- engines/fullpipe/gameloader.h | 2 +- engines/fullpipe/gfx.cpp | 60 +++++++++++++++++++++++++++-------------- engines/fullpipe/scene.cpp | 17 +++++++----- 5 files changed, 104 insertions(+), 35 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 2e0444417c..de4da66f3a 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -110,16 +110,44 @@ Common::Error FullpipeEngine::run() { ent._sceneId = 3896; sceneSwitcher(&ent); + _currentScene->draw(); + while (!g_fullpipe->_needQuit) { updateEvents(); _system->delayMillis(10); _system->updateScreen(); - _currentScene->draw(); - - if (g_fullpipe->_keyState == ' ') { + switch (g_fullpipe->_keyState) { + case Common::KEYCODE_q: + g_fullpipe->_needQuit = true; + break; + case Common::KEYCODE_UP: + _sceneRect.moveTo(_sceneRect.left, _sceneRect.top + 10); + _currentScene->draw(); + g_fullpipe->_keyState = Common::KEYCODE_INVALID; + break; + case Common::KEYCODE_DOWN: + _sceneRect.moveTo(_sceneRect.left, _sceneRect.top - 10); + _currentScene->draw(); + g_fullpipe->_keyState = Common::KEYCODE_INVALID; + break; + case Common::KEYCODE_LEFT: + _sceneRect.moveTo(_sceneRect.left + 10, _sceneRect.top); + _currentScene->draw(); g_fullpipe->_keyState = Common::KEYCODE_INVALID; break; + case Common::KEYCODE_RIGHT: + _sceneRect.moveTo(_sceneRect.left - 10, _sceneRect.top); + _currentScene->draw(); + g_fullpipe->_keyState = Common::KEYCODE_INVALID; + break; + case Common::KEYCODE_z: + _sceneRect.moveTo(0, 0); + _currentScene->draw(); + g_fullpipe->_keyState = Common::KEYCODE_INVALID; + break; + default: + break; } } diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index c7b547d845..675839f9a6 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -129,10 +129,13 @@ bool CGameLoader::load(MfcArchive &file) { return true; } -bool CGameLoader::loadScene(int num) { +bool CGameLoader::loadScene(int sceneId) { SceneTag *st; - int idx = getSceneTagBySceneId(num, &st); + int idx = getSceneTagBySceneId(sceneId, &st); + + if (idx < 0) + return false; if (st->_scene) st->loadScene(); @@ -152,10 +155,23 @@ bool CGameLoader::loadScene(int num) { return false; } -int CGameLoader::getSceneTagBySceneId(int num, SceneTag **st) { - warning("STUB: CGameLoader::getSceneTagBySceneId()"); +int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) { + if (_sc2array.size() > 0 && _gameProject->_sceneTagList->size() > 0) { + for (uint i = 0; i < _sc2array.size(); i++) { + if (_sc2array[i]._sceneId == sceneId) { + int num = 0; + for (SceneTagList::iterator s = _gameProject->_sceneTagList->begin(); s != _gameProject->_sceneTagList->end(); ++s, num++) { + if (s->_sceneId == sceneId) { + *st = &(*s); + return num; + } + } + } + } + } - return 0; + *st = 0; + return -1; } void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) { diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index ce933cb000..3a96a53d6f 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -40,7 +40,7 @@ class CGameLoader : public CObject { virtual bool load(MfcArchive &file); bool loadScene(int num); - int getSceneTagBySceneId(int num, SceneTag **st); + int getSceneTagBySceneId(int sceneId, SceneTag **st); void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount); GameProject *_gameProject; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index fb9466177c..1e1f1b554f 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -249,6 +249,8 @@ bool Picture::load(MfcArchive &file) { file.read(_paletteData, 1024); } + getData(); + debug(5, "Picture::load: <%s>", _memfilename); #if 0 @@ -318,6 +320,8 @@ void Picture::draw(int x, int y, int style, int angle) { int x1 = x; int y1 = y; + debug(0, "Picture::draw(%d, %d, %d, %d)", x, y, style, angle); + if (x != -1) x1 = x; @@ -387,6 +391,8 @@ void Picture::displayPicture() { } void Bitmap::putDib(int x, int y, int32 *palette) { + debug(0, "Bitmap::putDib(%d, %d)", x, y); + _x = x - g_fullpipe->_sceneRect.left; _y = y - g_fullpipe->_sceneRect.top; @@ -408,10 +414,12 @@ void Bitmap::putDibRB(int32 *palette) { uint16 *srcPtr2; uint16 *srcPtr; + debug(0, "Bitmap::putDibRB()"); + endx = _width + _x - 1; endy = _height + _y - 1; - if (_x > 799 || _width + _x - 1 < 0 || _y > 599 || endy < 0) + if (_x > 799 || endx < 0 || _y > 599 || endy < 0) return; if (endy > 599) @@ -420,12 +428,20 @@ void Bitmap::putDibRB(int32 *palette) { if (endx > 799) endx = 799; + int startx = _x; + if (startx < 0) + startx = 0; + + int starty = _y; + if (starty < 0) + starty = 0; + y = endy; srcPtr = (uint16 *)_pixels; bool breakup = false; - for (y = endy; y >= _y && !breakup; y--) { - x = _x; + for (y = endy; y >= starty && !breakup; y--) { + x = startx; while ((pixel = *srcPtr++) != 0) { if (pixel == 0x100) { @@ -433,7 +449,7 @@ void Bitmap::putDibRB(int32 *palette) { break; } - while (pixel == 0x200 && y >= _y) { + while (pixel == 0x200 && y >= starty) { uint16 value = *srcPtr++; x += (byte)(value & 0xff); @@ -442,7 +458,7 @@ void Bitmap::putDibRB(int32 *palette) { pixel = *srcPtr++; } - if (y < _y || pixel == 0) + if (y < starty || pixel == 0) break; start1 = x; @@ -495,7 +511,7 @@ void Bitmap::putDibRB(int32 *palette) { } } - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(_x, _y), g_fullpipe->_backgroundSurface.pitch, _x, _y, endx + 1, endy + 1); + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1, endy + 1); } void Bitmap::putDibCB(int32 *palette) { @@ -505,13 +521,13 @@ void Bitmap::putDibCB(int32 *palette) { int bpp; uint pitch; bool cb05_format; - byte *srcPtr; - int start; endx = _width + _x - 1; endy = _height + _y - 1; - if (_x > 799 || _width + _x - 1 < 0 || _y > 599 || endy < 0) + debug(0, "Bitmap::putDibCB(): %d, %d, %d, %d [%d, %d]", _x, _y, endx, endy, _width, _height); + + if (_x > 799 || endx < 0 || _y > 599 || endy < 0) return; if (endy > 599) @@ -525,27 +541,31 @@ void Bitmap::putDibCB(int32 *palette) { bpp = cb05_format ? 2 : 1; pitch = (bpp * _width + 3) & 0xFFFFFFFC; - srcPtr = &_pixels[pitch * (endy - _y)]; + byte *srcPtr = &_pixels[pitch * (endy - _y)]; - start = _x; - if (_x < 0) { + int startx = _x; + if (startx < 0) { srcPtr += bpp * -_x; - start = 0; + startx = 0; } + int starty = _y; + if (starty < 0) + starty = 0; + if (_flags & 0x1000000) { - for (int y = _y; y < endy; srcPtr -= pitch, y++) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, y); - copierKeyColor(curDestPtr, srcPtr, endx - start + 1, _flags & 0xff, (int32 *)palette, cb05_format); + for (int y = starty; y < endy; srcPtr -= pitch, y++) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(startx, y); + copierKeyColor(curDestPtr, srcPtr, endx - startx + 1, _flags & 0xff, (int32 *)palette, cb05_format); } } else { - for (int y = _y; y <= endy; srcPtr -= pitch, y++) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start, y); - copier(curDestPtr, srcPtr, endx - start + 1, (int32 *)palette, cb05_format); + for (int y = starty; y <= endy; srcPtr -= pitch, y++) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(startx, y); + copier(curDestPtr, srcPtr, endx - startx + 1, (int32 *)palette, cb05_format); } } - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(start, _y), g_fullpipe->_backgroundSurface.pitch, start, _y, endx, endy); + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1, endy + 1); } void Bitmap::colorFill(uint16 *dest, int len, int32 color) { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 87ef2bd562..78d38a7943 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -266,7 +266,7 @@ StaticANIObject *Scene::getAniMan() { StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) { for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) { - StaticANIObject *o = (StaticANIObject *)s; + StaticANIObject *o = (StaticANIObject *)*s; if (o->_id == obj && (a3 == -1 || o->_field_4 == a3)) return o; } @@ -276,7 +276,7 @@ StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) { StaticANIObject *Scene::getStaticANIObject1ByName(char *name, int a3) { for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) { - StaticANIObject *o = (StaticANIObject *)s; + StaticANIObject *o = (StaticANIObject *)*s; if (!strcmp(o->_objectName, name) && (a3 == -1 || o->_field_4 == a3)) return o; } @@ -375,15 +375,15 @@ void Scene::draw() { objectList_sortByPriority(_staticANIObjectList2); for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) { - ((StaticANIObject *)s)->draw2(); + ((StaticANIObject *)*s)->draw2(); } int priority = -1; for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) { drawContent(((StaticANIObject *)s)->_priority, priority, false); - ((StaticANIObject *)s)->draw(); + ((StaticANIObject *)*s)->draw(); - priority = ((StaticANIObject *)s)->_priority; + priority = ((StaticANIObject *)*s)->_priority; } drawContent(-1, priority, false); @@ -411,6 +411,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { if (maxPri == -1) maxPri = 60000; + debug(0, "_bigPict: %d objlist: %d", _bigPictureArray1Count, _picObjList.size()); if (drawBg && _bigPictureArray1Count && _picObjList.size()) { Common::Point point; @@ -419,8 +420,12 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { int width = point.x; int height = point.y; + debug(0, "w: %d h:%d", width, height); + ((PictureObject *)_picObjList[0])->getDimensions(&point); + debug(0, "w2: %d h2:%d", point.x, point.y); + int bgStX = g_fullpipe->_sceneRect.left % point.x; if (bgStX < 0) @@ -444,7 +449,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { int v51 = height * bgNumY; while (1) { int v25 = bgNumY; - for (int y = g_fullpipe->_sceneRect.top - point.y; y < g_fullpipe->_sceneRect.bottom - 1; ) { + for (int y = g_fullpipe->_sceneRect.top - bgOffsetY; y < g_fullpipe->_sceneRect.bottom - 1; ) { BigPicture *v27 = _bigPictureArray[bgNumX][v25]; v27->draw(bgPosX, y, 0, 0); y += v27->getDimensions(&point)->y; -- cgit v1.2.3 From 7f332e1f208344f88d1cfd1899743eb7dd5403de Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 25 Jul 2013 16:42:44 +0300 Subject: FULLPIPE: Second part of scene drawing --- engines/fullpipe/fullpipe.cpp | 1 + engines/fullpipe/gfx.cpp | 11 +++- engines/fullpipe/gfx.h | 1 + engines/fullpipe/scene.cpp | 148 +++++++++++++++++++++--------------------- 4 files changed, 86 insertions(+), 75 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index de4da66f3a..ce310c9f2c 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -108,6 +108,7 @@ Common::Error FullpipeEngine::run() { EntranceInfo ent; ent._sceneId = 3896; + //ent._sceneId = 2072; sceneSwitcher(&ent); _currentScene->draw(); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 1e1f1b554f..79de4ef5ae 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -151,6 +151,13 @@ Common::Point *PictureObject::getDimensions(Common::Point *p) { return p; } +void PictureObject::draw() { + if (_flags & 1) + _picture->draw(_ox, _oy, 2, 0); + else + _picture->draw(_ox, _oy, 0, 0); +} + GameObject::GameObject() { _field_4 = 0; _flags = 0; @@ -511,7 +518,7 @@ void Bitmap::putDibRB(int32 *palette) { } } - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1, endy + 1); + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty); } void Bitmap::putDibCB(int32 *palette) { @@ -565,7 +572,7 @@ void Bitmap::putDibCB(int32 *palette) { } } - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1, endy + 1); + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty); } void Bitmap::colorFill(uint16 *dest, int len, int32 color) { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 4f89f39188..5848e57536 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -124,6 +124,7 @@ class PictureObject : public GameObject { PictureObject(); bool load(MfcArchive &file, bool bigPicture); Common::Point *getDimensions(Common::Point *p); + void draw(); }; class Background : public CObject { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 78d38a7943..f9b4c0b8ef 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -320,7 +320,7 @@ void Scene::setPictureObjectsFlag4() { PictureObject *Scene::getPictureObjectById(int objId, int flags) { for (uint i = 1; i < _picObjList.size(); i++) { - if(((PictureObject *)_picObjList[i])->_id == objId && ((PictureObject *)_picObjList[i])->_field_4 == flags) + if (((PictureObject *)_picObjList[i])->_id == objId && ((PictureObject *)_picObjList[i])->_field_4 == flags) return (PictureObject *)_picObjList[i]; } @@ -380,7 +380,7 @@ void Scene::draw() { int priority = -1; for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) { - drawContent(((StaticANIObject *)s)->_priority, priority, false); + drawContent(((StaticANIObject *)*s)->_priority, priority, false); ((StaticANIObject *)*s)->draw(); priority = ((StaticANIObject *)*s)->_priority; @@ -401,6 +401,8 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { warning("Scene palette is ignored"); } + debug(0, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg); + if (_picObjList.size() > 2) { // We need to z-sort them objectList_sortByPriority(_picObjList); } @@ -411,9 +413,12 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { if (maxPri == -1) maxPri = 60000; + debug(0, "-> Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg); + + Common::Point point; + debug(0, "_bigPict: %d objlist: %d", _bigPictureArray1Count, _picObjList.size()); if (drawBg && _bigPictureArray1Count && _picObjList.size()) { - Common::Point point; _bigPictureArray[0][0]->getDimensions(&point); @@ -449,7 +454,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { int v51 = height * bgNumY; while (1) { int v25 = bgNumY; - for (int y = g_fullpipe->_sceneRect.top - bgOffsetY; y < g_fullpipe->_sceneRect.bottom - 1; ) { + for (int y = g_fullpipe->_sceneRect.top - bgOffsetY; y < g_fullpipe->_sceneRect.bottom - 1;) { BigPicture *v27 = _bigPictureArray[bgNumX][v25]; v27->draw(bgPosX, y, 0, 0); y += v27->getDimensions(&point)->y; @@ -478,77 +483,74 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { } } -#if 0 - v34 = this_->bg.picObjList.m_pNodeHead; - if (v34) { - while (1) { - v35 = v34->pNext; - v36 = (PictureObject *)v34->data; - drawBgb = v35; - v37 = v36->GameObject.priority; - if (v37 >= minPri && v37 < maxPri) { - v38 = v36->GameObject.ox; - v39 = v36->GameObject.oy; - v40 = PictureObject_getDimensions(v36, &v58); - v41 = v40->x; - bgOffsetXa = v40->y; - if (v36->GameObject.flags & 8) { - while (v38 > g_sceneRect.right) { - v38 -= v41; - v36->setOXY(v38, v39); - } - for (j = v41 + v38; v41 + v38 < g_sceneRect.left; j = v41 + v38) { - v38 = j; - v36->setOXY(j, v39); - } - } - if (v36->GameObject.flags & 0x10) { - while (v39 > g_sceneRect.bottom) { - v39 -= bgOffsetXa; - v36->setOXY(v38, v39); - } - for (k = v39 + bgOffsetXa; v39 + bgOffsetXa < g_sceneRect.top; k = v39 + bgOffsetXa) { - v39 = k; - v36->setOXY(v38, k); - } - } - if (v36->GameObject.flags & 4) - v36->draw(); - if (v36->GameObject.flags & 2) { - if (v38 > g_sceneRect.left) { - v44 = v38 - v41; - v36->setOXY(v44, v39); - v36->draw(); - v38 = v41 + v44; - v36->setOXY(v38, v39); - } - if (v41 + v38 < g_sceneRect.right) { - v36->setOXY(v41 + v38, v39); - v36->draw(); - v36->setOXY(v38, v39); - } - } - if (v36->GameObject.flags & 0x20) { - if (v39 > g_sceneRect.top) { - v45 = v39 - bgOffsetXa; - v36->setOXY(v38, v45); - v36->draw(); - v39 = bgOffsetXa + v45; - v36->setOXY(v38, v39); - } - if (bgOffsetXa + v39 < g_sceneRect.bottom) { - v36->setOXY(v38, bgOffsetXa + v39); - v36->draw(); - v36->setOXY(v38, v39); - } - } + + for (uint i = 1; i < _picObjList.size(); i++) { + PictureObject *obj = (PictureObject *)_picObjList[i]; + + debug(0, "pri: %d", obj->_priority); + if (obj->_priority < minPri || obj->_priority >= maxPri) + continue; + + int objX = obj->_ox; + int objY = obj->_oy; + + debug(0, "obj: %d %d", objX, objY); + + obj->getDimensions(&point); + + int width = point.x; + int height = point.y; + + if (obj->_flags & 8) { + while (objX > g_fullpipe->_sceneRect.right) { + objX -= width; + obj->setOXY(objX, objY); + } + for (int j = width + objX; width + objX < g_fullpipe->_sceneRect.left; j = width + objX) { + objX = j; + obj->setOXY(j, objY); } - if (!drawBgb) - break; - v34 = drawBgb; } - } -#endif + + if (obj->_flags & 0x10) { + while (objY > g_fullpipe->_sceneRect.bottom) { + objY -= height; + obj->setOXY(objX, objY); + } + for (int j = objY + height; objY + height < g_fullpipe->_sceneRect.top; j = objY + height) { + objY = j; + obj->setOXY(objX, j); + } + } + if (obj->_flags & 4) + obj->draw(); + + if (obj->_flags & 2) { + if (objX > g_fullpipe->_sceneRect.left) { + obj->setOXY(objX - width, objY); + obj->draw(); + obj->setOXY(objX, objY); + } + if (width + objX < g_fullpipe->_sceneRect.right) { + obj->setOXY(width + objX, objY); + obj->draw(); + obj->setOXY(objX, objY); + } + } + + if (obj->_flags & 0x20) { + if (objY > g_fullpipe->_sceneRect.top) { + obj->setOXY(objX, objY - height); + obj->draw(); + obj->setOXY(objX, objY); + } + if (height + objY < g_fullpipe->_sceneRect.bottom) { + obj->setOXY(objX, height + objY); + obj->draw(); + obj->setOXY(objX, objY); + } + } + } } } // End of namespace Fullpipe -- cgit v1.2.3 From b18f08d93bc1e7f681a830413b0e57fad61faff3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 26 Jul 2013 00:14:47 +0300 Subject: FULLPIPE: Started Statics drawing --- engines/fullpipe/fullpipe.cpp | 7 +++++-- engines/fullpipe/gfx.cpp | 17 +++++++++++++++++ engines/fullpipe/gfx.h | 12 ++++++++++++ engines/fullpipe/scene.cpp | 3 +++ engines/fullpipe/scene.h | 2 +- engines/fullpipe/scenes.cpp | 4 ++-- engines/fullpipe/statics.cpp | 40 ++++++++++++++++++++++++++++++++-------- engines/fullpipe/statics.h | 9 +++++++-- 8 files changed, 79 insertions(+), 15 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index ce310c9f2c..f1c0aac7f8 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -107,8 +107,11 @@ Common::Error FullpipeEngine::run() { EntranceInfo ent; - ent._sceneId = 3896; - //ent._sceneId = 2072; + if (ConfMan.hasKey("boot_param")) + ent._sceneId = ConfMan.getInt("boot_param"); + else + ent._sceneId = 3896; + sceneSwitcher(&ent); _currentScene->draw(); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 79de4ef5ae..a4dec6969e 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -24,6 +24,8 @@ #include "fullpipe/objects.h" #include "fullpipe/gfx.h" +#include "fullpipe/statics.h" +#include "fullpipe/scene.h" #include "common/memstream.h" @@ -700,5 +702,20 @@ bool Shadows::load(MfcArchive &file) { return true; } +void Shadows::init() { + Scene *scene = g_fullpipe->accessScene(_sceneId); + + StaticANIObject *st; + Movement *mov; + + if (scene && (st = scene->getStaticANIObject1ById(_staticAniObjectId, -1)) != 0 + && ((mov = st->getMovementById(_movementId)) != 0)) + initMovement(mov); +} + +void Shadows::initMovement(Movement *mov) { + warning("STUB: Shadows::initMovement()"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 5848e57536..8a14177dc0 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -27,6 +27,9 @@ class Common::ReadStream; namespace Fullpipe { +class DynamicPhase; +class Movement; + class ShadowsItemArray : public CObArray { // empty }; @@ -158,6 +161,15 @@ class Shadows : public CObject { public: Shadows(); virtual bool load(MfcArchive &file); + void init(); + + void initMovement(Movement *mov); +}; + +struct ShadowsItem { + int width; + int height; + DynamicPhase *dynPhase; }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index f9b4c0b8ef..93c56daadf 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -106,6 +106,9 @@ void SceneTag::loadScene() { _scene->load(archive); + if (_scene->_shadows) + _scene->_shadows->init(); + delete file; g_fullpipe->_currArchive = 0; diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index e054403a89..d51d113b5e 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -29,8 +29,8 @@ namespace Fullpipe { class Scene : public Background { friend class FullpipeEngine; + friend class SceneTag; - protected: CPtrList _staticANIObjectList1; CPtrList _staticANIObjectList2; CPtrList _messageQueueList; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 9359709b19..c12c0a0c7f 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -101,8 +101,8 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { _currentScene = scene; scene->addStaticANIObject(_aniMan, 1); _scene2 = scene; - _aniMan->_movementObj = 0; - _aniMan->_staticsObj = _aniMan->getStaticsById(ST_MAN_EMPTY); + _aniMan->_movement = 0; + _aniMan->_statics = _aniMan->getStaticsById(ST_MAN_EMPTY); _aniMan->setOXY(0, 0); if (_aniMan) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index b84703eee3..0f5b861efa 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -69,8 +69,8 @@ StaticANIObject::StaticANIObject() { _messageQueueId = 0; _animExFlag = 0; _counter = 0; - _movementObj = 0; - _staticsObj = 0; + _movement = 0; + _statics = 0; _flags = 0; _callback1 = 0; _callback2 = 0; @@ -130,8 +130,8 @@ void StaticANIObject::setOXY(int x, int y) { _ox = x; _oy = y; - if (_movementObj) - _movementObj->setOXY(x, y); + if (_movement) + _movement->setOXY(x, y); } void StaticANIObject::clearFlags() { @@ -139,8 +139,8 @@ void StaticANIObject::clearFlags() { deleteFromGlobalMessageQueue(); _messageQueueId = 0; - _movementObj = 0; - _staticsObj = 0; + _movement = 0; + _statics = 0; _animExFlag = 0; _counter = 0; _messageNum = 0; @@ -195,6 +195,11 @@ Movement *StaticANIObject::getMovementByName(char *name) { return 0; } +void Movement::draw(bool flipFlag, int angle) { + warning("STUB: Movement::draw(%d, %d)", flipFlag, angle); +} + + void StaticANIObject::loadMovementsPixelData() { for (uint i = 0; i < _movements.size(); i++) ((Movement *)_movements[i])->loadPixelData(); @@ -211,7 +216,19 @@ void StaticANIObject::draw() { } void StaticANIObject::draw2() { - warning("STUB: StaticANIObject::draw2()"); + debug(0, "StatciANIObject::draw2()"); + + if ((_flags & 4) && (_flags & 0x10)) { + if (_movement) { + _movement->draw(1, 0); + } else { + Common::Point point; + + _statics->getSomeXY(point); + + _statics->draw(_ox - point.x, _oy - point.y, 1, 0); + } + } } Statics::Statics() { @@ -227,7 +244,7 @@ bool Statics::load(MfcArchive &file) { _staticsId = file.readUint16LE(); _staticsName = file.readPascalString(); - debug(7, "statics: <%s>", transCyrillic((byte *)_staticsName)); + debug(7, "statics: <%s> id: %d (%x)", transCyrillic((byte *)_staticsName), _staticsId, _staticsId); _picture = new Picture(); _picture->load(file); @@ -235,6 +252,13 @@ bool Statics::load(MfcArchive &file) { return true; } +Common::Point *Statics::getSomeXY(Common::Point &p) { + p.x = _someX; + p.y = _someY; + + return &p; +} + Movement::Movement() { _lastFrameSpecialFlag = 0; _flipFlag = 0; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 04a4863517..0ae5e6111a 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -56,6 +56,7 @@ class StaticPhase : public Picture { class DynamicPhase : public StaticPhase { friend class Movement; + friend class Statics; int _someX; int _someY; @@ -82,6 +83,8 @@ class Statics : public DynamicPhase { Statics(); virtual bool load(MfcArchive &file); Statics *getStaticsById(int itemId); + + Common::Point *getSomeXY(Common::Point &p); }; class StaticANIObject; @@ -122,14 +125,16 @@ class Movement : public GameObject { void updateCurrDynamicPhase(); void loadPixelData(); + + void draw(bool flipFlag, int angle); }; class StaticANIObject : public GameObject { friend class FullpipeEngine; protected: - Movement *_movementObj; - Statics *_staticsObj; + Movement *_movement; + Statics *_statics; int _shadowsOn; int16 _field_30; int16 _field_32; -- cgit v1.2.3 From 5a182df0994081512fae724689507b9acc141d3a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 26 Jul 2013 15:39:17 +0300 Subject: FULLPIPE: Unstubbed StaticANIObject::addReverseStatics() --- engines/fullpipe/gfx.cpp | 74 ++++++++++++++++++++++++--- engines/fullpipe/gfx.h | 16 +++++- engines/fullpipe/objects.h | 10 ++-- engines/fullpipe/stateloader.cpp | 54 ++++++++++++++------ engines/fullpipe/statics.cpp | 105 ++++++++++++++++++++++++++++++++++++--- engines/fullpipe/statics.h | 13 ++++- engines/fullpipe/utils.cpp | 43 ++++++++++++++++ engines/fullpipe/utils.h | 10 ++++ 8 files changed, 288 insertions(+), 37 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index a4dec6969e..252333e1f0 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -225,6 +225,44 @@ Picture::Picture() { _convertedBitmap = 0; } +Picture::~Picture() { + freePicture(); + + _bitmap = 0; + + if (_memoryObject2) + delete _memoryObject2; + + if (_paletteData) + free(_paletteData); + + if (_convertedBitmap) { + delete _convertedBitmap; + _convertedBitmap = 0; + } +} + +void Picture::freePicture() { + if (_bitmap) { + if (testFlags() && !_field_54) { + freeData(); + delete _bitmap; + _bitmap = 0; + } + } + + if (_bitmap) { + _bitmap = 0; + _data = 0; + } + + if (_convertedBitmap) { + free(_convertedBitmap->_pixels); + delete _convertedBitmap; + _convertedBitmap = 0; + } +} + bool Picture::load(MfcArchive &file) { debug(5, "Picture::load()"); MemoryObject::load(file); @@ -350,22 +388,21 @@ void Picture::draw(int x, int y, int style, int angle) { switch (style) { case 1: //flip - warning("Picture::draw: style 1"); + warning("STUB: Picture::draw: style 1"); break; case 2: - error("Picture::draw: style 2"); + error("STUB: Picture::draw: style 2"); break; default: - if (angle) { - warning("Picture:draw: angle = %d", angle); + if (angle) drawRotated(x1, y1, angle); - } else { + else _bitmap->putDib(x1, y1, (int32 *)_paletteData); - } } } void Picture::drawRotated(int x, int y, int angle) { + warning("STUB: Picture::drawRotated(%d, %d, %d)", x, y, angle); } void Picture::displayPicture() { @@ -399,6 +436,26 @@ void Picture::displayPicture() { } } +void Picture::setPaletteData(byte *pal) { + if (_paletteData) + free(_paletteData); + + if (pal) { + _paletteData = (byte *)malloc(1024); + memcpy(_paletteData, pal, 1024); + } +} + +void Picture::copyMemoryObject2(Picture *src) { + if (_width == src->_width && _height == src->_height) { + if (src->_memoryObject2 && src->_memoryObject2->_rows && _memoryObject2) { + byte *data = loadData(); + _memoryObject2->copyData(data, _dataSize); + setAOIDs(); + } + } +} + void Bitmap::putDib(int x, int y, int32 *palette) { debug(0, "Bitmap::putDib(%d, %d)", x, y); @@ -677,7 +734,10 @@ void Bitmap::copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_ } } -BigPicture::BigPicture() { +Bitmap *Bitmap::reverseImage() { + warning("STUB: Bitmap::reverseImage()"); + + return this; } bool BigPicture::load(MfcArchive &file) { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 8a14177dc0..36ec1bd8d9 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -53,13 +53,16 @@ struct Bitmap { void paletteFill(uint16 *dest, byte *src, int len, int32 *palette); void copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format); void copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format); + + Bitmap *reverseImage(); }; class Picture : public MemoryObject { friend class Movement; + friend class DynamicPhase; Common::Rect _rect; - int _convertedBitmap; + Bitmap *_convertedBitmap; int _x; int _y; int _field_44; @@ -75,6 +78,10 @@ class Picture : public MemoryObject { public: Picture(); + virtual ~Picture(); + + void freePicture(); + virtual bool load(MfcArchive &file); void setAOIDs(); void init(); @@ -87,11 +94,16 @@ class Picture : public MemoryObject { void setAlpha(byte alpha) { _alpha = alpha; } Common::Point *getDimensions(Common::Point *p); + + byte *getPaletteData() { return _paletteData; } + void setPaletteData(byte *pal); + + void copyMemoryObject2(Picture *src); }; class BigPicture : public Picture { public: - BigPicture(); + BigPicture() {} virtual bool load(MfcArchive &file); }; diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 65113a9bcf..9acedc98e0 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -143,7 +143,7 @@ union VarValue { char *stringValue; }; -class Message { +class Message : public CObject { public: int _messageKind; int16 _parentId; @@ -161,17 +161,19 @@ class Message { public: Message(); + Message(Message *src); }; -class ExCommand : public CObject { - Message _msg; +class ExCommand : public Message { int _messageNum; int _field_3C; - int _flags; + int _excFlags; int _parId; public: ExCommand(); + ExCommand(ExCommand *src); + virtual ~ExCommand() {} virtual bool load(MfcArchive &file); }; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 32970a92ba..c1da2d5997 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -213,33 +213,41 @@ bool CInteraction::load(MfcArchive &file) { ExCommand::ExCommand() { _field_3C = 1; _messageNum = 0; - _flags = 0; + _excFlags = 0; _parId = 0; } +ExCommand::ExCommand(ExCommand *src) : Message(src) { + _field_3C = 1; + _messageNum = src->_messageNum; + _excFlags = src->_excFlags; + _parId = src->_parId; + +} + bool ExCommand::load(MfcArchive &file) { debug(5, "ExCommand::load()"); - _msg._parentId = file.readUint16LE(); - _msg._messageKind = file.readUint32LE(); - _msg._x = file.readUint32LE(); - _msg._y = file.readUint32LE(); - _msg._field_14 = file.readUint32LE(); - _msg._sceneClickX = file.readUint32LE(); - _msg._sceneClickY = file.readUint32LE(); - _msg._field_20 = file.readUint32LE(); - _msg._field_24 = file.readUint32LE(); - _msg._param28 = file.readUint32LE(); - _msg._field_2C = file.readUint32LE(); - _msg._field_30 = file.readUint32LE(); - _msg._field_34 = file.readUint32LE(); + _parentId = file.readUint16LE(); + _messageKind = file.readUint32LE(); + _x = file.readUint32LE(); + _y = file.readUint32LE(); + _field_14 = file.readUint32LE(); + _sceneClickX = file.readUint32LE(); + _sceneClickY = file.readUint32LE(); + _field_20 = file.readUint32LE(); + _field_24 = file.readUint32LE(); + _param28 = file.readUint32LE(); + _field_2C = file.readUint32LE(); + _field_30 = file.readUint32LE(); + _field_34 = file.readUint32LE(); _messageNum = file.readUint32LE(); _field_3C = 0; if (g_fullpipe->_gameProjectVersion >= 12) { - _flags = file.readUint32LE(); + _excFlags = file.readUint32LE(); _parId = file.readUint32LE(); } @@ -262,6 +270,22 @@ Message::Message() { _field_34 = 0; } +Message::Message(Message *src) { + _parentId = src->_parentId; + _messageKind = src->_messageKind; + _x = src->_x; + _y = src->_y; + _field_14 = src->_field_14; + _sceneClickX = src->_sceneClickX; + _sceneClickY = src->_sceneClickY; + _field_20 = src->_field_20; + _field_24 = src->_field_24; + _param28 = src->_param28; + _field_2C = src->_field_2C; + _field_30 = src->_field_30; + _field_34 = src->_field_34; +} + CObjstateCommand::CObjstateCommand() { _value = 0; } diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 0f5b861efa..7d91a11eda 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -28,6 +28,7 @@ #include "fullpipe/messagequeue.h" #include "fullpipe/gameobj.h" +#include "fullpipe/objectnames.h" namespace Fullpipe { @@ -205,10 +206,16 @@ void StaticANIObject::loadMovementsPixelData() { ((Movement *)_movements[i])->loadPixelData(); } -Statics *StaticANIObject::addStatics(Statics *ani) { - warning("STUB: StaticANIObject::addStatics"); +Statics *StaticANIObject::addReverseStatics(Statics *st) { + Statics *res = getStaticsById(st->_staticsId ^ 0x4000); - return 0; + if (!res) { + res = new Statics(st, true); + + _staticsList.push_back(res); + } + + return res; } void StaticANIObject::draw() { @@ -234,6 +241,27 @@ void StaticANIObject::draw2() { Statics::Statics() { _staticsId = 0; _picture = 0; + _staticsName = 0; +} + +Statics::Statics(Statics *src, bool reverse) : DynamicPhase(src, reverse) { + _staticsId = src->_staticsId; + + if (reverse) { + _staticsId ^= 0x4000; + int newlen = strlen(src->_staticsName) + strlen(sO_MirroredTo) + 1; + _staticsName = (char *)calloc(newlen, 1); + + snprintf(_staticsName, newlen, "%s%s", sO_MirroredTo, src->_staticsName); + } else { + _staticsName = (char *)calloc(strlen(src->_staticsName) + 1, 1); + strncpy(_staticsName, src->_staticsName, strlen(src->_staticsName) + 1); + } + + _memfilename = (char *)calloc(strlen(src->_memfilename) + 1, 1); + strncpy(_memfilename, src->_memfilename, strlen(src->_memfilename) + 1); + + _picture = new Picture(); } bool Statics::load(MfcArchive &file) { @@ -314,7 +342,7 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { if (!_staticsObj1 && (staticsid & 0x4000)) { Statics *s = ani->getStaticsById(staticsid ^ 0x4000); - _staticsObj1 = ani->addStatics(s); + _staticsObj1 = ani->addReverseStatics(s); } _mx = file.readUint32LE(); @@ -326,7 +354,7 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { if (!_staticsObj2 && (staticsid & 0x4000)) { Statics *s = ani->getStaticsById(staticsid ^ 0x4000); - _staticsObj2 = ani->addStatics(s); + _staticsObj2 = ani->addReverseStatics(s); } _m2x = file.readUint32LE(); @@ -406,10 +434,73 @@ DynamicPhase::DynamicPhase() { _someX = 0; _rect = 0; _field_7C = 0; - _flags = 0; + _dynFlags = 0; _someY = 0; } +DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) { + _field_7C = src->_field_7C; + _rect = new Common::Rect(); + + if (reverse) { + if (!src->_bitmap) + src->init(); + + _bitmap = src->_bitmap->reverseImage(); + _data = _bitmap->_pixels; + _dataSize = src->_dataSize; + + if (g_fullpipe->_currArchive) { + _field_14 = 0; + _libHandle = g_fullpipe->_currArchive; + } + + _flags |= 1; + + _someX = src->_someX; + _someY = src->_someY; + } else { + _field_14 = src->_field_14; + _field_8 = src->_field_8; + _flags = src->_flags; + + _memfilename = (char *)calloc(strlen(src->_memfilename) + 1, 1); + strncpy(_memfilename, src->_memfilename, strlen(src->_memfilename) + 1); + _dataSize = src->_dataSize; + _field_10 = src->_field_10; + _libHandle = src->_libHandle; + + _bitmap = src->_bitmap; + if (_bitmap) + _field_54 = 1; + + _someX = src->_someX; + _someY = src->_someY; + } + + _rect->top = src->_rect->top; + _rect->bottom = src->_rect->bottom; + _rect->left = src->_rect->left; + _rect->right = src->_rect->right; + + _width = src->_width; + _height = src->_height; + _field_7C = src->_field_7C; + + if (src->getExCommand()) + _exCommand = new ExCommand(src->getExCommand()); + else + _exCommand = 0; + + _initialCountdown = src->_initialCountdown; + _field_6A = src->_field_6A; + _dynFlags = src->_dynFlags; + + setPaletteData(getPaletteData()); + + copyMemoryObject2(src); +} + bool DynamicPhase::load(MfcArchive &file) { debug(5, "DynamicPhase::load()"); @@ -429,7 +520,7 @@ bool DynamicPhase::load(MfcArchive &file) { assert (g_fullpipe->_gameProjectVersion >= 12); - _flags = file.readUint32LE(); + _dynFlags = file.readUint32LE(); return true; } diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 0ae5e6111a..128f0f522e 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -43,6 +43,8 @@ class CStepArray : public CObject { }; class StaticPhase : public Picture { + friend class DynamicPhase; + int16 _initialCountdown; int16 _countdown; int16 _field_68; @@ -51,7 +53,10 @@ class StaticPhase : public Picture { public: StaticPhase(); + virtual bool load(MfcArchive &file); + + ExCommand *getExCommand() { return _exCommand; } }; class DynamicPhase : public StaticPhase { @@ -63,10 +68,12 @@ class DynamicPhase : public StaticPhase { Common::Rect *_rect; int16 _field_7C; int16 _field_7E; - int _flags; + int _dynFlags; public: DynamicPhase(); + DynamicPhase(DynamicPhase *src, bool reverse); + virtual bool load(MfcArchive &file); }; @@ -81,6 +88,8 @@ class Statics : public DynamicPhase { public: Statics(); + Statics(Statics *src, bool reverse); + virtual bool load(MfcArchive &file); Statics *getStaticsById(int itemId); @@ -171,7 +180,7 @@ class StaticANIObject : public GameObject { void loadMovementsPixelData(); - Statics *addStatics(Statics *ani); + Statics *addReverseStatics(Statics *ani); void draw(); void draw2(); }; diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 3e153c1801..ec6b59029b 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -120,6 +120,12 @@ MemoryObject::MemoryObject() { _data = 0; } +MemoryObject::~MemoryObject() { + freeData(); + if (_memfilename) + free(_memfilename); +} + bool MemoryObject::load(MfcArchive &file) { debug(5, "MemoryObject::load()"); _memfilename = file.readPascalString(); @@ -168,10 +174,37 @@ byte *MemoryObject::getData() { } } +byte *MemoryObject::loadData() { + load(); + return _data; +} + +void MemoryObject::freeData() { + if (_data) + free(_data); + + _data = 0; +} + +bool MemoryObject::testFlags() { + if (_field_8) + return false; + + if (_flags & 1) + return true; + + return false; +} + MemoryObject2::MemoryObject2() { _rows = 0; } +MemoryObject2::~MemoryObject2() { + if (_rows) + free(_rows); +} + bool MemoryObject2::load(MfcArchive &file) { debug(5, "MemoryObject2::load()"); MemoryObject::load(file); @@ -187,6 +220,16 @@ bool MemoryObject2::load(MfcArchive &file) { return true; } +void MemoryObject2::copyData(byte *src, int dataSize) { + if (_data) + freeData(); + + _dataSize = dataSize; + _data = (byte *)malloc(dataSize); + + memcpy(_data, src, _dataSize); +} + int MfcArchive::readCount() { int count = readUint16LE(); diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 524436bd1e..70a057c82a 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -96,10 +96,17 @@ class MemoryObject : CObject { public: MemoryObject(); + virtual ~MemoryObject(); + virtual bool load(MfcArchive &file); void loadFile(char *filename); void load() { loadFile(_memfilename); } byte *getData(); + byte *loadData(); + + bool testFlags(); + + void freeData(); }; class MemoryObject2 : public MemoryObject { @@ -110,7 +117,10 @@ class MemoryObject2 : public MemoryObject { public: MemoryObject2(); + virtual ~MemoryObject2(); virtual bool load(MfcArchive &file); + + void copyData(byte *src, int dataSize); }; class CObArray : public Common::Array, public CObject { -- cgit v1.2.3 From 67bbf26ecd546d59304ec437125508eb70aab9a1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 26 Jul 2013 15:42:11 +0300 Subject: FULLPIPE: Rename messagequeue.* to messages.* --- engines/fullpipe/fullpipe.cpp | 2 +- engines/fullpipe/messagequeue.cpp | 258 -------------------------------------- engines/fullpipe/messagequeue.h | 86 ------------- engines/fullpipe/messages.cpp | 258 ++++++++++++++++++++++++++++++++++++++ engines/fullpipe/messages.h | 86 +++++++++++++ engines/fullpipe/module.mk | 2 +- engines/fullpipe/scene.cpp | 2 +- engines/fullpipe/scenes.cpp | 2 +- engines/fullpipe/statics.cpp | 2 +- engines/fullpipe/utils.cpp | 2 +- 10 files changed, 350 insertions(+), 350 deletions(-) delete mode 100644 engines/fullpipe/messagequeue.cpp delete mode 100644 engines/fullpipe/messagequeue.h create mode 100644 engines/fullpipe/messages.cpp create mode 100644 engines/fullpipe/messages.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index f1c0aac7f8..d89e1f35f9 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -31,7 +31,7 @@ #include "fullpipe/objectnames.h" #include "fullpipe/objects.h" #include "fullpipe/gameloader.h" -#include "fullpipe/messagequeue.h" +#include "fullpipe/messages.h" #include "fullpipe/behavior.h" namespace Fullpipe { diff --git a/engines/fullpipe/messagequeue.cpp b/engines/fullpipe/messagequeue.cpp deleted file mode 100644 index 9d2ec383fb..0000000000 --- a/engines/fullpipe/messagequeue.cpp +++ /dev/null @@ -1,258 +0,0 @@ -/* 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. - * - */ - -#include "fullpipe/fullpipe.h" - -#include "fullpipe/objects.h" -#include "fullpipe/messagequeue.h" - -namespace Fullpipe { - -MessageQueue::MessageQueue() { - _field_14 = 0; - _parId = 0; - _dataId = 0; - _id = 0; - _isFinished = 0; - _flags = 0; -} - -bool MessageQueue::load(MfcArchive &file) { - debug(5, "MessageQueue::load()"); - - _dataId = file.readUint16LE(); - - int count = file.readUint16LE(); - - assert(g_fullpipe->_gameProjectVersion >= 12); - - _queueName = file.readPascalString(); - - for (int i = 0; i < count; i++) { - CObject *tmp = file.readClass(); - - _exCommands.push_back(tmp); - } - - _id = -1; - _field_14 = 0; - _parId = 0; - _isFinished = 0; - - return true; -} - -MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { - for (CPtrList::iterator s = begin(); s != end(); ++s) { - if (((MessageQueue *)s)->_id == id) - return (MessageQueue *)s; - } - - return 0; -} - -void GlobalMessageQueueList::deleteQueueById(int id) { - for (uint i = 0; i < size(); i++) - if (((MessageQueue *)((*this).operator[](i)))->_id == id) { - delete (MessageQueue *)remove_at(i); - - disableQueueById(id); - return; - } -} - -void GlobalMessageQueueList::disableQueueById(int id) { - for (CPtrList::iterator s = begin(); s != end(); ++s) { - if (((MessageQueue *)s)->_parId == id) - ((MessageQueue *)s)->_parId = 0; - } -} - -bool removeMessageHandler(int16 id, int pos) { - if (g_fullpipe->_messageHandlers) { - MessageHandler *curItem = g_fullpipe->_messageHandlers; - MessageHandler *prevItem = 0; - int curPos = 0; - - while (id != curItem->id) { - prevItem = curItem; - curItem = curItem->nextItem; - curPos++; - - if (!curItem) - return false; - } - - if (pos == -1 || curPos == pos) { - prevItem->nextItem = curItem->nextItem; - delete curItem; - updateMessageHandlerIndex(prevItem->nextItem, -1); - - return true; - } - } - - return false; -} - -void updateMessageHandlerIndex(MessageHandler *msg, int offset) { - for (; msg; msg = msg->nextItem) - msg->index += offset; -} - -void addMessageHandler(int (*callback)(ExCommand *), int16 id) { - if (getMessageHandlerById(id)) - return; - - MessageHandler *curItem = g_fullpipe->_messageHandlers; - - if (!curItem) - return; - - int index = 0; - for (MessageHandler *i = g_fullpipe->_messageHandlers->nextItem; i; i = i->nextItem) { - curItem = i; - index++; - } - - allocMessageHandler(curItem, id, callback, index); - - if (curItem) - updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); - -} - -MessageHandler *getMessageHandlerById(int16 id) { - MessageHandler *curItem = g_fullpipe->_messageHandlers; - - if (!curItem) - return 0; - - while (id != curItem->id) { - curItem = curItem->nextItem; - - if (!curItem) - return 0; - } - - return curItem; -} - -bool allocMessageHandler(MessageHandler *where, int16 id, int (*callback)(ExCommand *), int index) { - MessageHandler *msg = new MessageHandler; - - if (where) { - msg->nextItem = where->nextItem; - where->nextItem = msg; - msg->id = id; - msg->callback = callback; - msg->index = index; - } else { - msg->nextItem = 0; - msg->id = id; - msg->callback = callback; - msg->index = 0; - - g_fullpipe->_messageHandlers = msg; - } - - return true; -} - -int getMessageHandlersCount() { - int result; - MessageHandler *curItem = g_fullpipe->_messageHandlers; - - for (result = 0; curItem; result++) - curItem = curItem->nextItem; - - return result; -} - -bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id) { - if (getMessageHandlerById(id)) - return false; - - if (index) { - MessageHandler *curItem = g_fullpipe->_messageHandlers; - - for (int i = index - 1; i > 0; i--) - if (curItem) - curItem = curItem->nextItem; - - bool res = allocMessageHandler(curItem, id, callback, index); - - if (res) - updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); - - return res; - } else { - MessageHandler *newItem = new MessageHandler; - - newItem->nextItem = g_fullpipe->_messageHandlers; - newItem->id = id; - newItem->callback = callback; - newItem->index = 0; - - updateMessageHandlerIndex(g_fullpipe->_messageHandlers, 1); - g_fullpipe->_messageHandlers = newItem; - - return true; - } -} - -bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id) { - if (getMessageHandlerById(id)) - return false; - - MessageHandler *curItem = g_fullpipe->_messageHandlers; - - for (int i = index; i > 0; i--) - if (curItem) - curItem = curItem->nextItem; - - bool res = allocMessageHandler(curItem, id, callback, index + 1); - if (curItem) - updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); - - return res; -} - -void clearMessageHandlers() { - MessageHandler *curItem; - MessageHandler *nextItem; - - curItem = g_fullpipe->_messageHandlers; - if (curItem) { - do { - nextItem = curItem->nextItem; - - delete curItem; - - curItem = nextItem; - } while (nextItem); - - g_fullpipe->_messageHandlers = 0; - } -} - -} // End of namespace Fullpipe diff --git a/engines/fullpipe/messagequeue.h b/engines/fullpipe/messagequeue.h deleted file mode 100644 index b47bf49049..0000000000 --- a/engines/fullpipe/messagequeue.h +++ /dev/null @@ -1,86 +0,0 @@ -/* 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. - * - */ - -#ifndef FULLPIPE_MESSAGEQUEUE_H -#define FULLPIPE_MESSAGEQUEUE_H - -#include "fullpipe/utils.h" -#include "fullpipe/inventory.h" -#include "fullpipe/gfx.h" -#include "fullpipe/sound.h" -#include "fullpipe/scene.h" - -namespace Fullpipe { - -class MessageQueue : public CObject { - friend class GlobalMessageQueueList; - - protected: - int _id; - int _flags; - char *_queueName; - int16 _dataId; - int16 _field_12; - int _field_14; - CPtrList _exCommands; - int _counter; - int _field_38; - int _isFinished; - int _parId; - int _flag1; - - public: - MessageQueue(); - virtual bool load(MfcArchive &file); - - int getFlags() { return _flags; } -}; - -class GlobalMessageQueueList : public CPtrList { - public: - MessageQueue *getMessageQueueById(int id); - void deleteQueueById(int id); - void disableQueueById(int id); -}; - -struct MessageHandler { - int (*callback)(ExCommand *cmd); - int16 id; - int16 field_6; - int index; - MessageHandler *nextItem; -}; - -bool removeMessageHandler(int16 id, int pos); -void updateMessageHandlerIndex(MessageHandler *msg, int offset); -void addMessageHandler(int (*callback)(ExCommand *), int16 id); -MessageHandler *getMessageHandlerById(int16 id); -bool allocMessageHandler(MessageHandler *where, int16 id, int (*callback)(ExCommand *), int index); -int getMessageHandlersCount(); -bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id); -bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id); -void clearMessageHandlers(); - - -} // End of namespace Fullpipe - -#endif /* FULLPIPE_MESSAGEQUEUE_H */ diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp new file mode 100644 index 0000000000..7f5f3b4fd8 --- /dev/null +++ b/engines/fullpipe/messages.cpp @@ -0,0 +1,258 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" +#include "fullpipe/messages.h" + +namespace Fullpipe { + +MessageQueue::MessageQueue() { + _field_14 = 0; + _parId = 0; + _dataId = 0; + _id = 0; + _isFinished = 0; + _flags = 0; +} + +bool MessageQueue::load(MfcArchive &file) { + debug(5, "MessageQueue::load()"); + + _dataId = file.readUint16LE(); + + int count = file.readUint16LE(); + + assert(g_fullpipe->_gameProjectVersion >= 12); + + _queueName = file.readPascalString(); + + for (int i = 0; i < count; i++) { + CObject *tmp = file.readClass(); + + _exCommands.push_back(tmp); + } + + _id = -1; + _field_14 = 0; + _parId = 0; + _isFinished = 0; + + return true; +} + +MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { + for (CPtrList::iterator s = begin(); s != end(); ++s) { + if (((MessageQueue *)s)->_id == id) + return (MessageQueue *)s; + } + + return 0; +} + +void GlobalMessageQueueList::deleteQueueById(int id) { + for (uint i = 0; i < size(); i++) + if (((MessageQueue *)((*this).operator[](i)))->_id == id) { + delete (MessageQueue *)remove_at(i); + + disableQueueById(id); + return; + } +} + +void GlobalMessageQueueList::disableQueueById(int id) { + for (CPtrList::iterator s = begin(); s != end(); ++s) { + if (((MessageQueue *)s)->_parId == id) + ((MessageQueue *)s)->_parId = 0; + } +} + +bool removeMessageHandler(int16 id, int pos) { + if (g_fullpipe->_messageHandlers) { + MessageHandler *curItem = g_fullpipe->_messageHandlers; + MessageHandler *prevItem = 0; + int curPos = 0; + + while (id != curItem->id) { + prevItem = curItem; + curItem = curItem->nextItem; + curPos++; + + if (!curItem) + return false; + } + + if (pos == -1 || curPos == pos) { + prevItem->nextItem = curItem->nextItem; + delete curItem; + updateMessageHandlerIndex(prevItem->nextItem, -1); + + return true; + } + } + + return false; +} + +void updateMessageHandlerIndex(MessageHandler *msg, int offset) { + for (; msg; msg = msg->nextItem) + msg->index += offset; +} + +void addMessageHandler(int (*callback)(ExCommand *), int16 id) { + if (getMessageHandlerById(id)) + return; + + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + if (!curItem) + return; + + int index = 0; + for (MessageHandler *i = g_fullpipe->_messageHandlers->nextItem; i; i = i->nextItem) { + curItem = i; + index++; + } + + allocMessageHandler(curItem, id, callback, index); + + if (curItem) + updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); + +} + +MessageHandler *getMessageHandlerById(int16 id) { + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + if (!curItem) + return 0; + + while (id != curItem->id) { + curItem = curItem->nextItem; + + if (!curItem) + return 0; + } + + return curItem; +} + +bool allocMessageHandler(MessageHandler *where, int16 id, int (*callback)(ExCommand *), int index) { + MessageHandler *msg = new MessageHandler; + + if (where) { + msg->nextItem = where->nextItem; + where->nextItem = msg; + msg->id = id; + msg->callback = callback; + msg->index = index; + } else { + msg->nextItem = 0; + msg->id = id; + msg->callback = callback; + msg->index = 0; + + g_fullpipe->_messageHandlers = msg; + } + + return true; +} + +int getMessageHandlersCount() { + int result; + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + for (result = 0; curItem; result++) + curItem = curItem->nextItem; + + return result; +} + +bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id) { + if (getMessageHandlerById(id)) + return false; + + if (index) { + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + for (int i = index - 1; i > 0; i--) + if (curItem) + curItem = curItem->nextItem; + + bool res = allocMessageHandler(curItem, id, callback, index); + + if (res) + updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); + + return res; + } else { + MessageHandler *newItem = new MessageHandler; + + newItem->nextItem = g_fullpipe->_messageHandlers; + newItem->id = id; + newItem->callback = callback; + newItem->index = 0; + + updateMessageHandlerIndex(g_fullpipe->_messageHandlers, 1); + g_fullpipe->_messageHandlers = newItem; + + return true; + } +} + +bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id) { + if (getMessageHandlerById(id)) + return false; + + MessageHandler *curItem = g_fullpipe->_messageHandlers; + + for (int i = index; i > 0; i--) + if (curItem) + curItem = curItem->nextItem; + + bool res = allocMessageHandler(curItem, id, callback, index + 1); + if (curItem) + updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); + + return res; +} + +void clearMessageHandlers() { + MessageHandler *curItem; + MessageHandler *nextItem; + + curItem = g_fullpipe->_messageHandlers; + if (curItem) { + do { + nextItem = curItem->nextItem; + + delete curItem; + + curItem = nextItem; + } while (nextItem); + + g_fullpipe->_messageHandlers = 0; + } +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h new file mode 100644 index 0000000000..b47bf49049 --- /dev/null +++ b/engines/fullpipe/messages.h @@ -0,0 +1,86 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_MESSAGEQUEUE_H +#define FULLPIPE_MESSAGEQUEUE_H + +#include "fullpipe/utils.h" +#include "fullpipe/inventory.h" +#include "fullpipe/gfx.h" +#include "fullpipe/sound.h" +#include "fullpipe/scene.h" + +namespace Fullpipe { + +class MessageQueue : public CObject { + friend class GlobalMessageQueueList; + + protected: + int _id; + int _flags; + char *_queueName; + int16 _dataId; + int16 _field_12; + int _field_14; + CPtrList _exCommands; + int _counter; + int _field_38; + int _isFinished; + int _parId; + int _flag1; + + public: + MessageQueue(); + virtual bool load(MfcArchive &file); + + int getFlags() { return _flags; } +}; + +class GlobalMessageQueueList : public CPtrList { + public: + MessageQueue *getMessageQueueById(int id); + void deleteQueueById(int id); + void disableQueueById(int id); +}; + +struct MessageHandler { + int (*callback)(ExCommand *cmd); + int16 id; + int16 field_6; + int index; + MessageHandler *nextItem; +}; + +bool removeMessageHandler(int16 id, int pos); +void updateMessageHandlerIndex(MessageHandler *msg, int offset); +void addMessageHandler(int (*callback)(ExCommand *), int16 id); +MessageHandler *getMessageHandlerById(int16 id); +bool allocMessageHandler(MessageHandler *where, int16 id, int (*callback)(ExCommand *), int index); +int getMessageHandlersCount(); +bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id); +bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id); +void clearMessageHandlers(); + + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_MESSAGEQUEUE_H */ diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 934d916ed1..335d34732d 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -8,7 +8,7 @@ MODULE_OBJS = \ gfx.o \ input.o \ inventory.o \ - messagequeue.o \ + messages.o \ motion.o \ ngiarchive.o \ scene.o \ diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 93c56daadf..1f6cb21ad7 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -25,7 +25,7 @@ #include "fullpipe/objects.h" #include "fullpipe/ngiarchive.h" #include "fullpipe/statics.h" -#include "fullpipe/messagequeue.h" +#include "fullpipe/messages.h" #include "fullpipe/gameobj.h" diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index c12c0a0c7f..6e033a08f3 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -31,7 +31,7 @@ #include "fullpipe/sound.h" #include "fullpipe/motion.h" #include "fullpipe/input.h" -#include "fullpipe/messagequeue.h" +#include "fullpipe/messages.h" #include "fullpipe/behavior.h" #include "fullpipe/gameobj.h" diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 7d91a11eda..32dbf4a854 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -25,7 +25,7 @@ #include "fullpipe/objects.h" #include "fullpipe/ngiarchive.h" #include "fullpipe/statics.h" -#include "fullpipe/messagequeue.h" +#include "fullpipe/messages.h" #include "fullpipe/gameobj.h" #include "fullpipe/objectnames.h" diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index ec6b59029b..900ca84eea 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -28,7 +28,7 @@ #include "fullpipe/objects.h" #include "fullpipe/motion.h" #include "fullpipe/ngiarchive.h" -#include "fullpipe/messagequeue.h" +#include "fullpipe/messages.h" namespace Fullpipe { -- cgit v1.2.3 From 4dc3481ec1c8ff5cabdf9000e5d62a6d79537f9b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 26 Jul 2013 15:47:12 +0300 Subject: FULLPIPE: Moved Messge class to messages.cpp --- engines/fullpipe/gameloader.h | 1 + engines/fullpipe/messages.cpp | 92 ++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/messages.h | 45 ++++++++++++++++++++ engines/fullpipe/objects.h | 45 -------------------- engines/fullpipe/stateloader.cpp | 92 ---------------------------------------- engines/fullpipe/statics.h | 2 + 6 files changed, 140 insertions(+), 137 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 3a96a53d6f..fa1bb33b7c 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -25,6 +25,7 @@ #include "fullpipe/objects.h" #include "fullpipe/inventory.h" +#include "fullpipe/messages.h" namespace Fullpipe { diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 7f5f3b4fd8..6b07a4ef69 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -27,6 +27,98 @@ namespace Fullpipe { +ExCommand::ExCommand() { + _field_3C = 1; + _messageNum = 0; + _excFlags = 0; + _parId = 0; +} + +ExCommand::ExCommand(ExCommand *src) : Message(src) { + _field_3C = 1; + _messageNum = src->_messageNum; + _excFlags = src->_excFlags; + _parId = src->_parId; + +} + +bool ExCommand::load(MfcArchive &file) { + debug(5, "ExCommand::load()"); + + _parentId = file.readUint16LE(); + _messageKind = file.readUint32LE(); + _x = file.readUint32LE(); + _y = file.readUint32LE(); + _field_14 = file.readUint32LE(); + _sceneClickX = file.readUint32LE(); + _sceneClickY = file.readUint32LE(); + _field_20 = file.readUint32LE(); + _field_24 = file.readUint32LE(); + _param28 = file.readUint32LE(); + _field_2C = file.readUint32LE(); + _field_30 = file.readUint32LE(); + _field_34 = file.readUint32LE(); + + _messageNum = file.readUint32LE(); + + _field_3C = 0; + + if (g_fullpipe->_gameProjectVersion >= 12) { + _excFlags = file.readUint32LE(); + _parId = file.readUint32LE(); + } + + return true; +} + +Message::Message() { + _messageKind = 0; + _parentId = 0; + _x = 0; + _y = 0; + _field_14 = 0; + _sceneClickX = 0; + _sceneClickY = 0; + _field_20 = 0; + _field_24 = 0; + _param28 = 0; + _field_2C = 0; + _field_30 = 0; + _field_34 = 0; +} + +Message::Message(Message *src) { + _parentId = src->_parentId; + _messageKind = src->_messageKind; + _x = src->_x; + _y = src->_y; + _field_14 = src->_field_14; + _sceneClickX = src->_sceneClickX; + _sceneClickY = src->_sceneClickY; + _field_20 = src->_field_20; + _field_24 = src->_field_24; + _param28 = src->_param28; + _field_2C = src->_field_2C; + _field_30 = src->_field_30; + _field_34 = src->_field_34; +} + +CObjstateCommand::CObjstateCommand() { + _value = 0; +} + +bool CObjstateCommand::load(MfcArchive &file) { + debug(5, "CObjStateCommand::load()"); + + _cmd.load(file); + + _value = file.readUint32LE(); + + _objCommandName = file.readPascalString(); + + return true; +} + MessageQueue::MessageQueue() { _field_14 = 0; _parId = 0; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index b47bf49049..97e416426b 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -31,6 +31,51 @@ namespace Fullpipe { +class Message : public CObject { + public: + int _messageKind; + int16 _parentId; + int _x; + int _y; + int _field_14; + int _sceneClickX; + int _sceneClickY; + int _field_20; + int _field_24; + int _param28; + int _field_2C; + int _field_30; + int _field_34; + + public: + Message(); + Message(Message *src); +}; + +class ExCommand : public Message { + int _messageNum; + int _field_3C; + int _excFlags; + int _parId; + + public: + ExCommand(); + ExCommand(ExCommand *src); + virtual ~ExCommand() {} + + virtual bool load(MfcArchive &file); +}; + +class CObjstateCommand : public CObject { + ExCommand _cmd; + char *_objCommandName; + int _value; + + public: + CObjstateCommand(); + virtual bool load(MfcArchive &file); +}; + class MessageQueue : public CObject { friend class GlobalMessageQueueList; diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 9acedc98e0..cc6fef581c 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -143,41 +143,6 @@ union VarValue { char *stringValue; }; -class Message : public CObject { - public: - int _messageKind; - int16 _parentId; - int _x; - int _y; - int _field_14; - int _sceneClickX; - int _sceneClickY; - int _field_20; - int _field_24; - int _param28; - int _field_2C; - int _field_30; - int _field_34; - - public: - Message(); - Message(Message *src); -}; - -class ExCommand : public Message { - int _messageNum; - int _field_3C; - int _excFlags; - int _parId; - - public: - ExCommand(); - ExCommand(ExCommand *src); - virtual ~ExCommand() {} - - virtual bool load(MfcArchive &file); -}; - class CGameVar : public CObject { public: CGameVar *_nextVarObj; @@ -212,16 +177,6 @@ class PreloadItems : public Common::Array, public CObject { virtual bool load(MfcArchive &file); }; -class CObjstateCommand : public CObject { - ExCommand _cmd; - char *_objCommandName; - int _value; - - public: - CObjstateCommand(); - virtual bool load(MfcArchive &file); -}; - } // End of namespace Fullpipe #endif /* FULLPIPE_OBJECTS_H */ diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index c1da2d5997..00d46198d9 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -210,98 +210,6 @@ bool CInteraction::load(MfcArchive &file) { return true; } -ExCommand::ExCommand() { - _field_3C = 1; - _messageNum = 0; - _excFlags = 0; - _parId = 0; -} - -ExCommand::ExCommand(ExCommand *src) : Message(src) { - _field_3C = 1; - _messageNum = src->_messageNum; - _excFlags = src->_excFlags; - _parId = src->_parId; - -} - -bool ExCommand::load(MfcArchive &file) { - debug(5, "ExCommand::load()"); - - _parentId = file.readUint16LE(); - _messageKind = file.readUint32LE(); - _x = file.readUint32LE(); - _y = file.readUint32LE(); - _field_14 = file.readUint32LE(); - _sceneClickX = file.readUint32LE(); - _sceneClickY = file.readUint32LE(); - _field_20 = file.readUint32LE(); - _field_24 = file.readUint32LE(); - _param28 = file.readUint32LE(); - _field_2C = file.readUint32LE(); - _field_30 = file.readUint32LE(); - _field_34 = file.readUint32LE(); - - _messageNum = file.readUint32LE(); - - _field_3C = 0; - - if (g_fullpipe->_gameProjectVersion >= 12) { - _excFlags = file.readUint32LE(); - _parId = file.readUint32LE(); - } - - return true; -} - -Message::Message() { - _messageKind = 0; - _parentId = 0; - _x = 0; - _y = 0; - _field_14 = 0; - _sceneClickX = 0; - _sceneClickY = 0; - _field_20 = 0; - _field_24 = 0; - _param28 = 0; - _field_2C = 0; - _field_30 = 0; - _field_34 = 0; -} - -Message::Message(Message *src) { - _parentId = src->_parentId; - _messageKind = src->_messageKind; - _x = src->_x; - _y = src->_y; - _field_14 = src->_field_14; - _sceneClickX = src->_sceneClickX; - _sceneClickY = src->_sceneClickY; - _field_20 = src->_field_20; - _field_24 = src->_field_24; - _param28 = src->_param28; - _field_2C = src->_field_2C; - _field_30 = src->_field_30; - _field_34 = src->_field_34; -} - -CObjstateCommand::CObjstateCommand() { - _value = 0; -} - -bool CObjstateCommand::load(MfcArchive &file) { - debug(5, "CObjStateCommand::load()"); - - _cmd.load(file); - - _value = file.readUint32LE(); - - _objCommandName = file.readPascalString(); - - return true; -} - bool PreloadItems::load(MfcArchive &file) { debug(5, "PreloadItems::load()"); diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 128f0f522e..83bdc73e8c 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -27,6 +27,8 @@ namespace Fullpipe { +class ExCommand; + class CStepArray : public CObject { int _currPointIndex; Common::Point **_points; -- cgit v1.2.3 From ad537b1a7e04873c4e3ff3b02ce8893bd6ce12f9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 27 Jul 2013 23:54:06 +0300 Subject: FULLPIPE: Further work on loadGam() --- engines/fullpipe/fullpipe.cpp | 5 +++++ engines/fullpipe/gfx.cpp | 8 ++++---- engines/fullpipe/gfx.h | 2 ++ engines/fullpipe/inventory.cpp | 2 +- engines/fullpipe/stateloader.cpp | 35 +++++++++++++++++++++++++++++++---- 5 files changed, 43 insertions(+), 9 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index d89e1f35f9..1e342bc9a8 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -90,6 +90,11 @@ FullpipeEngine::~FullpipeEngine() { void FullpipeEngine::initialize() { _globalMessageQueueList = new GlobalMessageQueueList; _behaviorManager = new BehaviorManager; + + _sceneRect.left = 0; + _sceneRect.top = 0; + _sceneRect.right = 799; + _sceneRect.bottom = 599; } Common::Error FullpipeEngine::run() { diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 252333e1f0..2b007bd2e4 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -144,6 +144,10 @@ bool PictureObject::load(MfcArchive &file, bool bigPicture) { _ox2 = _ox; _oy2 = _oy; +#if 0 + _picture->displayPicture(); +#endif + return true; } @@ -300,10 +304,6 @@ bool Picture::load(MfcArchive &file) { debug(5, "Picture::load: <%s>", _memfilename); -#if 0 - displayPicture(); -#endif - return true; } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 36ec1bd8d9..bfe21aaed1 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -60,6 +60,7 @@ struct Bitmap { class Picture : public MemoryObject { friend class Movement; friend class DynamicPhase; + friend class PictureObject; Common::Rect _rect; Bitmap *_convertedBitmap; @@ -130,6 +131,7 @@ class GameObject : public CObject { }; class PictureObject : public GameObject { + public: Picture *_picture; CPtrList *_pictureObject2List; int _ox2; diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 0480753bc2..8df06e617e 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -101,7 +101,7 @@ void CInventory2::addItem(int itemId, int value) { } void CInventory2::rebuildItemRects() { - g_fullpipe->accessScene(_sceneId); + _scene = g_fullpipe->accessScene(_sceneId); warning("STUB: CInventory2::rebuildItemRects()"); } diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 00d46198d9..eb50cfb481 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -29,6 +29,7 @@ #include "fullpipe/objects.h" #include "fullpipe/gameloader.h" #include "fullpipe/scene.h" +#include "fullpipe/statics.h" #include "fullpipe/gameobj.h" @@ -104,16 +105,42 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->rebuildItemRects(); - //for (CPtrList::iterator s = _inventory->getScene()->_picObjList.begin(); s != _inventory->getScene()->_picObjList.end(); ++s) { - //} + for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) { + ((MemoryObject *)((PicPicturetureObject *)*p)->_picture)->load(); + } //_sceneSwitcher = sceneSwitcher; //_preloadCallback = gameLoaderPreloadCallback //_readSavegameCallback = gameLoaderReadSavegameCallback; _aniMan = accessScene(SC_COMMON)->getAniMan(); _scene2 = 0; - - warning("STUB: loadGam()"); +#if 0 + _movTable = _aniMan->preloadMovements(); + + _aniMan->setSpeed(1); + + PictureObject *pic = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0); + + pic->setFlags(pic->_flags & 0xFFFB); + + // Not used in full game + //_evalVersionPic = accessScene(SC_COMMON)->getPictureObjectById(PIC_CMN_EVAL, 0); + + initMaps(); + initCursors(); + + setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED")); + + if (_flgPlayIntro) { + _gameLoader->loadScene(SC_INTRO1); + _gameLoader->gotoScene(SC_INTRO1, TrubaUp); + } else { + _gameLoader->loadScene(SC_1); + _gameLoader->gotoScene(SC_1, TrubaLeft); + } +#endif + if (!_currentScene) + return false; } else return false; -- cgit v1.2.3 From 94fedf012872487d6511bbd428980e5706b5caba Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 28 Jul 2013 14:54:25 +0300 Subject: FULLPIPE: Finished stubbing loadGam() --- engines/fullpipe/fullpipe.cpp | 32 ++++++++++++++++++++++++++++++++ engines/fullpipe/fullpipe.h | 14 ++++++++++++++ engines/fullpipe/gameloader.cpp | 6 ++++++ engines/fullpipe/gameloader.h | 3 ++- engines/fullpipe/stateloader.cpp | 10 +++++----- engines/fullpipe/statics.cpp | 10 ++++++++++ engines/fullpipe/statics.h | 8 ++++++++ 7 files changed, 77 insertions(+), 6 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 1e342bc9a8..2563a9ce78 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -34,6 +34,8 @@ #include "fullpipe/messages.h" #include "fullpipe/behavior.h" +#include "fullpipe/gameobj.h" + namespace Fullpipe { FullpipeEngine *g_fullpipe = 0; @@ -63,11 +65,15 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _inputDisabled = false; _needQuit = false; + _flgPlayIntro = true; + + _musicAllowed = -1; _aniMan = 0; _aniMan2 = 0; _currentScene = 0; _scene2 = 0; + _movTable = 0; _globalMessageQueueList = 0; _messageHandlers = 0; @@ -336,4 +342,30 @@ void FullpipeEngine::setObjectState(const char *name, int state) { var->setSubVarAsInt(name, state); } +void FullpipeEngine::initCursors() { + warning("STUB: FullpipeEngine::initCursors()"); +} + +void FullpipeEngine::initMap() { + memset(_mapTable, 0, sizeof(_mapTable)); + + updateMapPiece(PIC_MAP_S01, 1); + updateMapPiece(PIC_MAP_A13, 1u); +} + +void FullpipeEngine::updateMapPiece(int mapId, int update) { + for (int i = 0; i < 200; i++) { + int hiWord = (_mapTable[i] >> 16) & 0xffff; + + if (hiWord == mapId) { + _mapTable[i] |= update; + return; + } + if (!hiWord) { + _mapTable[i] = (mapId << 16) | update; + return; + } + } +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 4415115588..0ae837d7b9 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -52,6 +52,7 @@ class EntranceInfo; class GameProject; class GlobalMessageQueueList; class MessageHandler; +struct MovTable; class NGIArchive; class Scene; class SoundList; @@ -68,6 +69,8 @@ public: void initialize(); + void setMusicAllowed(int val) { _musicAllowed = val; } + // Detection related functions const ADGameDescription *_gameDescription; const char *getGameId() const; @@ -116,16 +119,27 @@ public: BehaviorManager *_behaviorManager; + MovTable *_movTable; + + void initMap(); + void updateMapPiece(int mapId, int update); + bool _needQuit; + bool _flgPlayIntro; + int _musicAllowed; void initObjectStates(); void setLevelStates(); void setSwallowedEggsState(); + void initCursors(); + CGameVar *_swallowedEgg1; CGameVar *_swallowedEgg2; CGameVar *_swallowedEgg3; + int32 _mapTable[200]; + Scene *_inventoryScene; CInventory2 *_inventory; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 675839f9a6..1641d4d81e 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -155,6 +155,12 @@ bool CGameLoader::loadScene(int sceneId) { return false; } +bool CGameLoader::gotoScene(int sceneId, int entranceId) { + warning("STUB: CGameLoader::gotoScene(%d, %d)", sceneId, entranceId); + + return true; +} + int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) { if (_sc2array.size() > 0 && _gameProject->_sceneTagList->size() > 0) { for (uint i = 0; i < _sc2array.size(); i++) { diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index fa1bb33b7c..36c99f20dc 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -39,7 +39,8 @@ class CGameLoader : public CObject { virtual ~CGameLoader(); virtual bool load(MfcArchive &file); - bool loadScene(int num); + bool loadScene(int sceneId); + bool gotoScene(int sceneId, int entranceId); int getSceneTagBySceneId(int sceneId, SceneTag **st); void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index eb50cfb481..82c72b8eb9 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -106,7 +106,7 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->rebuildItemRects(); for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) { - ((MemoryObject *)((PicPicturetureObject *)*p)->_picture)->load(); + ((MemoryObject *)((PictureObject *)*p)->_picture)->load(); } //_sceneSwitcher = sceneSwitcher; @@ -114,8 +114,8 @@ bool FullpipeEngine::loadGam(const char *fname) { //_readSavegameCallback = gameLoaderReadSavegameCallback; _aniMan = accessScene(SC_COMMON)->getAniMan(); _scene2 = 0; -#if 0 - _movTable = _aniMan->preloadMovements(); + + _movTable = _aniMan->countMovements(); _aniMan->setSpeed(1); @@ -126,7 +126,7 @@ bool FullpipeEngine::loadGam(const char *fname) { // Not used in full game //_evalVersionPic = accessScene(SC_COMMON)->getPictureObjectById(PIC_CMN_EVAL, 0); - initMaps(); + initMap(); initCursors(); setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED")); @@ -138,7 +138,7 @@ bool FullpipeEngine::loadGam(const char *fname) { _gameLoader->loadScene(SC_1); _gameLoader->gotoScene(SC_1, TrubaLeft); } -#endif + if (!_currentScene) return false; } else diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 32dbf4a854..1f87721f01 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -238,6 +238,16 @@ void StaticANIObject::draw2() { } } +MovTable *StaticANIObject::countMovements() { + warning("STUB: StaticANIObject::countMovements()"); + + return 0; +} + +void StaticANIObject::setSpeed(int speed) { + warning("STUB: StaticANIObject::setSpeed(%d)", speed); +} + Statics::Statics() { _staticsId = 0; _picture = 0; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 83bdc73e8c..8a0f36aa6b 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -185,6 +185,14 @@ class StaticANIObject : public GameObject { Statics *addReverseStatics(Statics *ani); void draw(); void draw2(); + + MovTable *countMovements(); + void setSpeed(int speed); +}; + +struct MovTable { + int count; + int16 *movs; }; } // End of namespace Fullpipe -- cgit v1.2.3 From 4d215a849ddc7289615e9ba0a6916974c4d64b2a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 28 Jul 2013 14:59:20 +0300 Subject: FULLPIPE: Moved all engine initialization functions to init.cpp --- engines/fullpipe/fullpipe.cpp | 135 ---------------------------------- engines/fullpipe/init.cpp | 163 ++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/module.mk | 1 + 3 files changed, 164 insertions(+), 135 deletions(-) create mode 100644 engines/fullpipe/init.cpp (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 2563a9ce78..32ccbda78a 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -28,14 +28,10 @@ #include "engines/util.h" #include "fullpipe/fullpipe.h" -#include "fullpipe/objectnames.h" -#include "fullpipe/objects.h" #include "fullpipe/gameloader.h" #include "fullpipe/messages.h" #include "fullpipe/behavior.h" -#include "fullpipe/gameobj.h" - namespace Fullpipe { FullpipeEngine *g_fullpipe = 0; @@ -195,126 +191,6 @@ void FullpipeEngine::updateEvents() { } } -void FullpipeEngine::initObjectStates() { - setLevelStates(); - - setObjectState(sO_Dude, getObjectEnumState(sO_Dude, sO_NotCarryingEgg)); - setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_NotCrackedEggs)); - setObjectState(sO_GuvTheDrawer, getObjectEnumState(sO_GuvTheDrawer, sO_Awaken)); - setObjectState(sO_EggGulper, getObjectEnumState(sO_EggGulper, sO_First)); - setObjectState(sO_EggGulperGaveCoin, getObjectEnumState(sO_EggGulperGaveCoin, sO_No)); - setObjectState(sO_Jar_4, getObjectEnumState(sO_Jar_4, sO_OnTheSpring)); - setObjectState(sO_GulpedEggs, getObjectEnumState(sO_GulpedEgg, sO_NotPresent)); - - setSwallowedEggsState(); - - setObjectState(sO_WeirdWacko, getObjectEnumState(sO_WeirdWacko, sO_InGlasses)); - setObjectState(sO_TumyTrampie, getObjectEnumState(sO_TumyTrampie, sO_Drinking)); - setObjectState(sO_StairsUp_8, getObjectEnumState(sO_StairsUp_8, sO_NotBroken)); - setObjectState(sO_HareTheNooksiter, getObjectEnumState(sO_HareTheNooksiter, sO_WithHandle)); - setObjectState(sO_Elephantine, getObjectEnumState(sO_Elephantine, sO_WithBoot)); - setObjectState(sO_Fly_12, 0); - setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_NotAvailable)); - setObjectState(sO_ClockHandle, getObjectEnumState(sO_ClockHandle, sO_In_7)); - setObjectState(sO_BigMumsy, getObjectEnumState(sO_BigMumsy, sO_Sleeping)); - setObjectState(sO_CoinSlot_1, getObjectEnumState(sO_CoinSlot_1, sO_Empty)); - setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple)); - setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked)); - setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_ClosedShe)); - setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug)); - setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum)); - setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_Swinging)); - setObjectState(sO_DudeJumped, getObjectEnumState(sO_DudeJumped, sO_No)); - setObjectState(sO_Bridge, getObjectEnumState(sO_Bridge, sO_Convoluted)); - setObjectState(sO_Guardian, getObjectEnumState(sO_Guardian, sO_OnRight)); - setObjectState(sO_Grandma, getObjectEnumState(sO_Grandma, sO_In_14)); - setObjectState(sO_Boot_15, getObjectEnumState(sO_Boot_15, sO_NotPresent)); - setObjectState(sO_LeftPipe_15, getObjectEnumState(sO_LeftPipe_15, sO_OpenedShe)); - setObjectState(sO_Pedestal_16, getObjectEnumState(sO_Pedestal_16, sO_IsFree)); - setObjectState(sO_Cup, getObjectEnumState(sO_Cup, sO_InSmokeRoom)); - setObjectState(sO_Pedestal_17, getObjectEnumState(sO_Pedestal_17, sO_IsFree)); - setObjectState(sO_UsherHand, getObjectEnumState(sO_UsherHand, sO_WithoutCoin)); - setObjectState(sO_RightPipe_17, getObjectEnumState(sO_RightPipe_17, sO_ClosedShe)); - setObjectState(sO_Fly_17, 1); - setObjectState(sO_DudeSwinged, 0); - setObjectState(sO_Girl, getObjectEnumState(sO_Girl, sO_Swinging)); - setObjectState(sO_Sugar, getObjectEnumState(sO_Sugar, sO_Present)); - setObjectState(sO_Janitors, getObjectEnumState(sO_Janitors, sO_Together)); - setObjectState(sO_Bag_22, getObjectEnumState(sO_Bag_22, sO_NotFallen)); - setObjectState(sO_Grandpa, getObjectEnumState(sO_Grandpa, sO_InSock)); - setObjectState(sO_CoinSlot_22, getObjectEnumState(sO_CoinSlot_22, sO_Empty)); - setObjectState(sO_UpperHatch_23, getObjectEnumState(sO_UpperHatch_23, sO_Closed)); - setObjectState(sO_LowerHatch_23, getObjectEnumState(sO_LowerHatch_23, sO_Closed)); - setObjectState(sO_Lever_23, getObjectEnumState(sO_Lever_23, sO_NotTaken)); - setObjectState(sO_LeverHandle_23, getObjectEnumState(sO_LeverHandle_23, sO_WithoutStool)); - setObjectState(sO_LowerPipe_21, getObjectEnumState(sO_LowerPipe_21, sO_ClosedShe)); - setObjectState(sO_StarsDown_24, getObjectEnumState(sO_StarsDown_24, sO_OpenedShe)); - setObjectState(sO_Hatch_26, getObjectEnumState(sO_Hatch_26, sO_Closed)); - setObjectState(sO_Sock_26, getObjectEnumState(sO_Sock_26, sO_NotHanging)); - setObjectState(sO_LeftPipe_26, getObjectEnumState(sO_LeftPipe_26, sO_ClosedShe)); - setObjectState(sO_Valve1_26, getObjectEnumState(sO_Valve1_26, sO_Opened)); - setObjectState(sO_Valve2_26, getObjectEnumState(sO_Valve2_26, sO_Closed)); - setObjectState(sO_Valve3_26, getObjectEnumState(sO_Valve3_26, sO_Closed)); - setObjectState(sO_Valve4_26, getObjectEnumState(sO_Valve4_26, sO_Closed)); - setObjectState(sO_Valve5_26, getObjectEnumState(sO_Valve5_26, sO_Opened)); - setObjectState(sO_Pool, getObjectEnumState(sO_Pool, sO_Overfull)); - setObjectState(sO_Plank_25, getObjectEnumState(sO_Plank_25, sO_NearDudesStairs)); - setObjectState(sO_Driver, getObjectEnumState(sO_Driver, sO_WithSteering)); - setObjectState(sO_Janitress, getObjectEnumState(sO_Janitress, sO_WithMop)); - setObjectState(sO_LeftPipe_29, getObjectEnumState(sO_LeftPipe_29, sO_ClosedShe)); - setObjectState(sO_LeftPipe_30, getObjectEnumState(sO_LeftPipe_30, sO_ClosedShe)); - setObjectState(sO_Leg, getObjectEnumState(sO_Leg, sO_ShowingHeel)); - setObjectState(sO_Tub, getObjectEnumState(sO_Tub, sO_EmptyShe)); - setObjectState(sO_Cactus, getObjectEnumState(sO_Cactus, sO_NotGrown)); - setObjectState(sO_Fireman, getObjectEnumState(sO_Fireman, sO_WithHose)); - setObjectState(sO_Cube, getObjectEnumState(sO_Cube, sO_In_33)); - setObjectState(sO_MommyOfHandle_32, getObjectEnumState(sO_MommyOfHandle_32, sO_WithoutHandle)); - setObjectState(sO_Pedestal_33, getObjectEnumState(sO_Pedestal_33, sO_IsFree)); - setObjectState(sO_Valve_34, getObjectEnumState(sO_Valve_34, sO_WithNothing)); - setObjectState(sO_Stool_34, getObjectEnumState(sO_Stool_34, sO_WithoutDrawer)); - setObjectState(sO_Plank_34, getObjectEnumState(sO_Plank_34, sO_Passive)); - setObjectState(sO_Hatch_34, getObjectEnumState(sO_Hatch_34, sO_Closed)); - setObjectState(sO_Valve_35, getObjectEnumState(sO_Valve_35, sO_TurnedOff)); - setObjectState(sO_Carpet_35, getObjectEnumState(sO_Carpet_35, sO_CannotTake)); - setObjectState(sO_CoinSlot_35, getObjectEnumState(sO_CoinSlot_35, sO_WithCoin)); - setObjectState(sO_BellyInflater, getObjectEnumState(sO_BellyInflater, sO_WithCork)); - setObjectState(sO_Jawcrucnher, getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet)); - setObjectState(sO_Guard_1, getObjectEnumState(sO_Guard_1, sO_On)); - setObjectState(sO_Gurad_2, getObjectEnumState(sO_Gurad_2, sO_On)); - setObjectState(sO_Guard_3, getObjectEnumState(sO_Guard_3, sO_On)); - setObjectState(sO_Bottle_38, getObjectEnumState(sO_Bottle_38, sO_OnTheTable)); - setObjectState(sO_Boss, getObjectEnumState(sO_Boss, sO_WithHammer)); -} - -void FullpipeEngine::setLevelStates() { - CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons); - - if (v) { - v->setSubVarAsInt(sO_Level0, 2833); - v->setSubVarAsInt(sO_Level1, 2754); - v->setSubVarAsInt(sO_Level2, 2757); - v->setSubVarAsInt(sO_Level3, 2760); - v->setSubVarAsInt(sO_Level4, 2763); - v->setSubVarAsInt(sO_Level5, 2766); - v->setSubVarAsInt(sO_Level6, 2769); - v->setSubVarAsInt(sO_Level7, 2772); - v->setSubVarAsInt(sO_Level8, 2775); - v->setSubVarAsInt(sO_Level9, 2778); - } -} - -void FullpipeEngine::setSwallowedEggsState() { - CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs); - - _swallowedEgg1 = v->getSubVarByName(sO_Egg1); - _swallowedEgg2 = v->getSubVarByName(sO_Egg2); - _swallowedEgg3 = v->getSubVarByName(sO_Egg3); - - _swallowedEgg1->_value.intValue = 0; - _swallowedEgg2->_value.intValue = 0; - _swallowedEgg3->_value.intValue = 0; -} - int FullpipeEngine::getObjectEnumState(const char *name, const char *state) { CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); @@ -342,17 +218,6 @@ void FullpipeEngine::setObjectState(const char *name, int state) { var->setSubVarAsInt(name, state); } -void FullpipeEngine::initCursors() { - warning("STUB: FullpipeEngine::initCursors()"); -} - -void FullpipeEngine::initMap() { - memset(_mapTable, 0, sizeof(_mapTable)); - - updateMapPiece(PIC_MAP_S01, 1); - updateMapPiece(PIC_MAP_A13, 1u); -} - void FullpipeEngine::updateMapPiece(int mapId, int update) { for (int i = 0; i < 200; i++) { int hiWord = (_mapTable[i] >> 16) & 0xffff; diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp new file mode 100644 index 0000000000..07a7c9c7f5 --- /dev/null +++ b/engines/fullpipe/init.cpp @@ -0,0 +1,163 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/objects.h" +#include "fullpipe/gameloader.h" +#include "fullpipe/objectnames.h" +#include "fullpipe/gameobj.h" + +namespace Fullpipe { + +void FullpipeEngine::initObjectStates() { + setLevelStates(); + + setObjectState(sO_Dude, getObjectEnumState(sO_Dude, sO_NotCarryingEgg)); + setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_NotCrackedEggs)); + setObjectState(sO_GuvTheDrawer, getObjectEnumState(sO_GuvTheDrawer, sO_Awaken)); + setObjectState(sO_EggGulper, getObjectEnumState(sO_EggGulper, sO_First)); + setObjectState(sO_EggGulperGaveCoin, getObjectEnumState(sO_EggGulperGaveCoin, sO_No)); + setObjectState(sO_Jar_4, getObjectEnumState(sO_Jar_4, sO_OnTheSpring)); + setObjectState(sO_GulpedEggs, getObjectEnumState(sO_GulpedEgg, sO_NotPresent)); + + setSwallowedEggsState(); + + setObjectState(sO_WeirdWacko, getObjectEnumState(sO_WeirdWacko, sO_InGlasses)); + setObjectState(sO_TumyTrampie, getObjectEnumState(sO_TumyTrampie, sO_Drinking)); + setObjectState(sO_StairsUp_8, getObjectEnumState(sO_StairsUp_8, sO_NotBroken)); + setObjectState(sO_HareTheNooksiter, getObjectEnumState(sO_HareTheNooksiter, sO_WithHandle)); + setObjectState(sO_Elephantine, getObjectEnumState(sO_Elephantine, sO_WithBoot)); + setObjectState(sO_Fly_12, 0); + setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_NotAvailable)); + setObjectState(sO_ClockHandle, getObjectEnumState(sO_ClockHandle, sO_In_7)); + setObjectState(sO_BigMumsy, getObjectEnumState(sO_BigMumsy, sO_Sleeping)); + setObjectState(sO_CoinSlot_1, getObjectEnumState(sO_CoinSlot_1, sO_Empty)); + setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple)); + setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked)); + setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_ClosedShe)); + setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug)); + setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum)); + setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_Swinging)); + setObjectState(sO_DudeJumped, getObjectEnumState(sO_DudeJumped, sO_No)); + setObjectState(sO_Bridge, getObjectEnumState(sO_Bridge, sO_Convoluted)); + setObjectState(sO_Guardian, getObjectEnumState(sO_Guardian, sO_OnRight)); + setObjectState(sO_Grandma, getObjectEnumState(sO_Grandma, sO_In_14)); + setObjectState(sO_Boot_15, getObjectEnumState(sO_Boot_15, sO_NotPresent)); + setObjectState(sO_LeftPipe_15, getObjectEnumState(sO_LeftPipe_15, sO_OpenedShe)); + setObjectState(sO_Pedestal_16, getObjectEnumState(sO_Pedestal_16, sO_IsFree)); + setObjectState(sO_Cup, getObjectEnumState(sO_Cup, sO_InSmokeRoom)); + setObjectState(sO_Pedestal_17, getObjectEnumState(sO_Pedestal_17, sO_IsFree)); + setObjectState(sO_UsherHand, getObjectEnumState(sO_UsherHand, sO_WithoutCoin)); + setObjectState(sO_RightPipe_17, getObjectEnumState(sO_RightPipe_17, sO_ClosedShe)); + setObjectState(sO_Fly_17, 1); + setObjectState(sO_DudeSwinged, 0); + setObjectState(sO_Girl, getObjectEnumState(sO_Girl, sO_Swinging)); + setObjectState(sO_Sugar, getObjectEnumState(sO_Sugar, sO_Present)); + setObjectState(sO_Janitors, getObjectEnumState(sO_Janitors, sO_Together)); + setObjectState(sO_Bag_22, getObjectEnumState(sO_Bag_22, sO_NotFallen)); + setObjectState(sO_Grandpa, getObjectEnumState(sO_Grandpa, sO_InSock)); + setObjectState(sO_CoinSlot_22, getObjectEnumState(sO_CoinSlot_22, sO_Empty)); + setObjectState(sO_UpperHatch_23, getObjectEnumState(sO_UpperHatch_23, sO_Closed)); + setObjectState(sO_LowerHatch_23, getObjectEnumState(sO_LowerHatch_23, sO_Closed)); + setObjectState(sO_Lever_23, getObjectEnumState(sO_Lever_23, sO_NotTaken)); + setObjectState(sO_LeverHandle_23, getObjectEnumState(sO_LeverHandle_23, sO_WithoutStool)); + setObjectState(sO_LowerPipe_21, getObjectEnumState(sO_LowerPipe_21, sO_ClosedShe)); + setObjectState(sO_StarsDown_24, getObjectEnumState(sO_StarsDown_24, sO_OpenedShe)); + setObjectState(sO_Hatch_26, getObjectEnumState(sO_Hatch_26, sO_Closed)); + setObjectState(sO_Sock_26, getObjectEnumState(sO_Sock_26, sO_NotHanging)); + setObjectState(sO_LeftPipe_26, getObjectEnumState(sO_LeftPipe_26, sO_ClosedShe)); + setObjectState(sO_Valve1_26, getObjectEnumState(sO_Valve1_26, sO_Opened)); + setObjectState(sO_Valve2_26, getObjectEnumState(sO_Valve2_26, sO_Closed)); + setObjectState(sO_Valve3_26, getObjectEnumState(sO_Valve3_26, sO_Closed)); + setObjectState(sO_Valve4_26, getObjectEnumState(sO_Valve4_26, sO_Closed)); + setObjectState(sO_Valve5_26, getObjectEnumState(sO_Valve5_26, sO_Opened)); + setObjectState(sO_Pool, getObjectEnumState(sO_Pool, sO_Overfull)); + setObjectState(sO_Plank_25, getObjectEnumState(sO_Plank_25, sO_NearDudesStairs)); + setObjectState(sO_Driver, getObjectEnumState(sO_Driver, sO_WithSteering)); + setObjectState(sO_Janitress, getObjectEnumState(sO_Janitress, sO_WithMop)); + setObjectState(sO_LeftPipe_29, getObjectEnumState(sO_LeftPipe_29, sO_ClosedShe)); + setObjectState(sO_LeftPipe_30, getObjectEnumState(sO_LeftPipe_30, sO_ClosedShe)); + setObjectState(sO_Leg, getObjectEnumState(sO_Leg, sO_ShowingHeel)); + setObjectState(sO_Tub, getObjectEnumState(sO_Tub, sO_EmptyShe)); + setObjectState(sO_Cactus, getObjectEnumState(sO_Cactus, sO_NotGrown)); + setObjectState(sO_Fireman, getObjectEnumState(sO_Fireman, sO_WithHose)); + setObjectState(sO_Cube, getObjectEnumState(sO_Cube, sO_In_33)); + setObjectState(sO_MommyOfHandle_32, getObjectEnumState(sO_MommyOfHandle_32, sO_WithoutHandle)); + setObjectState(sO_Pedestal_33, getObjectEnumState(sO_Pedestal_33, sO_IsFree)); + setObjectState(sO_Valve_34, getObjectEnumState(sO_Valve_34, sO_WithNothing)); + setObjectState(sO_Stool_34, getObjectEnumState(sO_Stool_34, sO_WithoutDrawer)); + setObjectState(sO_Plank_34, getObjectEnumState(sO_Plank_34, sO_Passive)); + setObjectState(sO_Hatch_34, getObjectEnumState(sO_Hatch_34, sO_Closed)); + setObjectState(sO_Valve_35, getObjectEnumState(sO_Valve_35, sO_TurnedOff)); + setObjectState(sO_Carpet_35, getObjectEnumState(sO_Carpet_35, sO_CannotTake)); + setObjectState(sO_CoinSlot_35, getObjectEnumState(sO_CoinSlot_35, sO_WithCoin)); + setObjectState(sO_BellyInflater, getObjectEnumState(sO_BellyInflater, sO_WithCork)); + setObjectState(sO_Jawcrucnher, getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet)); + setObjectState(sO_Guard_1, getObjectEnumState(sO_Guard_1, sO_On)); + setObjectState(sO_Gurad_2, getObjectEnumState(sO_Gurad_2, sO_On)); + setObjectState(sO_Guard_3, getObjectEnumState(sO_Guard_3, sO_On)); + setObjectState(sO_Bottle_38, getObjectEnumState(sO_Bottle_38, sO_OnTheTable)); + setObjectState(sO_Boss, getObjectEnumState(sO_Boss, sO_WithHammer)); +} + +void FullpipeEngine::setLevelStates() { + CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons); + + if (v) { + v->setSubVarAsInt(sO_Level0, 2833); + v->setSubVarAsInt(sO_Level1, 2754); + v->setSubVarAsInt(sO_Level2, 2757); + v->setSubVarAsInt(sO_Level3, 2760); + v->setSubVarAsInt(sO_Level4, 2763); + v->setSubVarAsInt(sO_Level5, 2766); + v->setSubVarAsInt(sO_Level6, 2769); + v->setSubVarAsInt(sO_Level7, 2772); + v->setSubVarAsInt(sO_Level8, 2775); + v->setSubVarAsInt(sO_Level9, 2778); + } +} + +void FullpipeEngine::setSwallowedEggsState() { + CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs); + + _swallowedEgg1 = v->getSubVarByName(sO_Egg1); + _swallowedEgg2 = v->getSubVarByName(sO_Egg2); + _swallowedEgg3 = v->getSubVarByName(sO_Egg3); + + _swallowedEgg1->_value.intValue = 0; + _swallowedEgg2->_value.intValue = 0; + _swallowedEgg3->_value.intValue = 0; +} + +void FullpipeEngine::initCursors() { + warning("STUB: FullpipeEngine::initCursors()"); +} + +void FullpipeEngine::initMap() { + memset(_mapTable, 0, sizeof(_mapTable)); + + updateMapPiece(PIC_MAP_S01, 1); + updateMapPiece(PIC_MAP_A13, 1u); +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 335d34732d..1771036749 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -6,6 +6,7 @@ MODULE_OBJS = \ fullpipe.o \ gameloader.o \ gfx.o \ + init.o \ input.o \ inventory.o \ messages.o \ -- cgit v1.2.3 From 74b662516dec82d17d897510e7ef3a322e7fdd26 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 28 Jul 2013 15:53:43 +0300 Subject: FULLPIPE: Implemented StaticANIObject::countMovements() --- engines/fullpipe/fullpipe.h | 2 ++ engines/fullpipe/gameloader.cpp | 7 +++++++ engines/fullpipe/gfx.h | 1 + engines/fullpipe/objects.h | 2 +- engines/fullpipe/stateloader.cpp | 10 ++++++++++ engines/fullpipe/statics.cpp | 24 ++++++++++++++++++++++-- 6 files changed, 43 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 0ae837d7b9..c058022312 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -91,6 +91,8 @@ public: GameProject *_gameProject; bool loadGam(const char *fname); + CGameVar *getGameLoaderGameVar(); + int _gameProjectVersion; int _pictureScale; int _scrollSpeed; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 1641d4d81e..1049e1cc3d 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -184,4 +184,11 @@ void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAn warning("STUB: CGameLoader::applyPicAniInfo()"); } +CGameVar *FullpipeEngine::getGameLoaderGameVar() { + if (_gameLoader) + return _gameLoader->_gameVar; + else + return 0; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index bfe21aaed1..27be7c474f 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -128,6 +128,7 @@ class GameObject : public CObject { void renumPictures(CPtrList *lst); void setFlags(int16 flags) { _flags = flags; } void clearFlags() { _flags = 0; } + const char *getName() { return _objectName; } }; class PictureObject : public GameObject { diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index cc6fef581c..ba65181cf8 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -162,7 +162,7 @@ class CGameVar : public CObject { int getSubVarAsInt(const char *name); CGameVar *addSubVarAsInt(const char *name, int value); bool addSubVar(CGameVar *subvar); - + int getSubVarsCount(); }; struct PreloadItem { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 82c72b8eb9..6470b1c687 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -384,6 +384,16 @@ bool CGameVar::addSubVar(CGameVar *subvar) { return false; } +int CGameVar::getSubVarsCount() { + int res; + CGameVar *sub = _subVars; + + for (res = 0; sub; res++) + sub = sub->_nextVarObj; + + return res; +} + Sc2::Sc2() { _sceneId = 0; _field_2 = 0; diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 1f87721f01..cca12cef65 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -239,9 +239,29 @@ void StaticANIObject::draw2() { } MovTable *StaticANIObject::countMovements() { - warning("STUB: StaticANIObject::countMovements()"); + CGameVar *preloadSubVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("PRELOAD"); - return 0; + if (preloadSubVar || preloadSubVar->getSubVarsCount() == 0) + return 0; + + MovTable *movTable = new MovTable; + + movTable->count = _movements.size(); + movTable->movs = (int16 *)calloc(_movements.size(), sizeof(int16)); + + for (uint i = 0; i < _movements.size(); i++) { + GameObject *obj = (GameObject *)_movements[i]; + movTable->movs[i] = 2; + + for (CGameVar *sub = preloadSubVar->_subVars; sub; sub = sub->_nextVarObj) { + if (scumm_stricmp(obj->getName(), sub->_varName) == 0) { + movTable->movs[i] = 1; + break; + } + } + } + + return movTable; } void StaticANIObject::setSpeed(int speed) { -- cgit v1.2.3 From 3c77ad17afab558f638b3f09dd938847ec3a6685 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 28 Jul 2013 16:50:43 +0300 Subject: FULLPIPE: Implement FullpipeEngine::initCursors() --- engines/fullpipe/fullpipe.h | 3 +++ engines/fullpipe/gameloader.cpp | 7 ++++++ engines/fullpipe/gfx.h | 1 + engines/fullpipe/init.cpp | 43 ++++++++++++++++++++++++++++++++++++- engines/fullpipe/input.cpp | 47 ++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/input.h | 23 +++++++++++++++++--- 6 files changed, 119 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index c058022312..a0dba6a431 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -48,6 +48,7 @@ class CGameLoader; class CGameVar; class CInputController; class CInventory2; +struct CursorInfo; class EntranceInfo; class GameProject; class GlobalMessageQueueList; @@ -92,6 +93,7 @@ public: bool loadGam(const char *fname); CGameVar *getGameLoaderGameVar(); + CInputController *getGameLoaderInputController(); int _gameProjectVersion; int _pictureScale; @@ -135,6 +137,7 @@ public: void setSwallowedEggsState(); void initCursors(); + void addCursor(CursorInfo *cursorInfo, Scene *inv, int pictureId, int hotspotX, int hotspotY, int itemPictureOffsX, int itemPictureOffsY); CGameVar *_swallowedEgg1; CGameVar *_swallowedEgg2; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 1049e1cc3d..72b2827568 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -191,4 +191,11 @@ CGameVar *FullpipeEngine::getGameLoaderGameVar() { return 0; } +CInputController *FullpipeEngine::getGameLoaderInputController() { + if (_gameLoader) + return _gameLoader->_inputController; + else + return 0; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 27be7c474f..81de8ec1c0 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -61,6 +61,7 @@ class Picture : public MemoryObject { friend class Movement; friend class DynamicPhase; friend class PictureObject; + friend class CInputController; Common::Rect _rect; Bitmap *_convertedBitmap; diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp index 07a7c9c7f5..9892f55574 100644 --- a/engines/fullpipe/init.cpp +++ b/engines/fullpipe/init.cpp @@ -25,6 +25,8 @@ #include "fullpipe/objects.h" #include "fullpipe/gameloader.h" #include "fullpipe/objectnames.h" +#include "fullpipe/input.h" + #include "fullpipe/gameobj.h" namespace Fullpipe { @@ -149,8 +151,47 @@ void FullpipeEngine::setSwallowedEggsState() { _swallowedEgg3->_value.intValue = 0; } +void FullpipeEngine::addCursor(CursorInfo *cursorInfo, Scene *inv, int pictureId, int hotspotX, int hotspotY, int itemPictureOffsX, int itemPictureOffsY) { + cursorInfo->pictureId = pictureId; + cursorInfo->picture = inv->getPictureObjectById(pictureId, 0)->_picture; + cursorInfo->hotspotX = hotspotX; + cursorInfo->hotspotY = hotspotY; + cursorInfo->itemPictureOffsX = itemPictureOffsX; + cursorInfo->itemPictureOffsY = itemPictureOffsY; + + getGameLoaderInputController()->addCursor(cursorInfo); +} + void FullpipeEngine::initCursors() { - warning("STUB: FullpipeEngine::initCursors()"); + CursorInfo crs; + Scene *inv = accessScene(SC_INV); + + addCursor(&crs, inv, PIC_CSR_DEFAULT, 15, 1, 10, 10); + addCursor(&crs, inv, PIC_CSR_DEFAULT_INV, 18, 18, 23, 23); + addCursor(&crs, inv, PIC_CSR_ITN, 11, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ITN_RED, 11, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ITN_GREEN, 11, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ITN_INV, 23, 17, 23, 17); + addCursor(&crs, inv, PIC_CSR_GOU, 15, 17, 10, 10); + addCursor(&crs, inv, PIC_CSR_GOD, 15, 1, 10, 10); + addCursor(&crs, inv, PIC_CSR_GOL, 26, 1, 10, 10); + addCursor(&crs, inv, PIC_CSR_GOR, 15, 1, 10, 10); + addCursor(&crs, inv, PIC_CSR_GOFAR_L, 1, 1, 10, 10); + addCursor(&crs, inv, PIC_CSR_GOFAR_R, 39, 1, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE1, 12, 24, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE2, 11, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE2_D, 22, 15, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE3, 11, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE4, 18, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE5, 23, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE6, 11, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE6_D, 0, 0, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE7, 21, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE7_D, 7, 20, 10, 10); + addCursor(&crs, inv, PIC_CSR_ARCADE8, 23, 11, 10, 10); + addCursor(&crs, inv, PIC_CSR_LIFT, 6, 13, 10, 10); + + getGameLoaderInputController()->setCursorMode(0); } void FullpipeEngine::initMap() { diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 68efacf74b..bb6d8baae5 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -24,6 +24,7 @@ #include "fullpipe/objects.h" #include "fullpipe/input.h" +#include "fullpipe/gfx.h" namespace Fullpipe { @@ -36,7 +37,7 @@ CInputController::CInputController() { _field_14 = 0; _cursorId = 0; _cursorIndex = -1; - _flags = 1; + _inputFlags = 1; _cursorBounds.left = 0; _cursorBounds.top = 0; @@ -55,4 +56,48 @@ void setInputDisabled(bool state) { g_fullpipe->_inputController->setInputDisabled(state); } +void CInputController::addCursor(CursorInfo *cursor) { + CursorInfo *newc = new CursorInfo(cursor); + Common::Point p; + + cursor->picture->getDimensions(&p); + + newc->width = p.x; + newc->height = p.y; + + newc->picture->_x = -1; + newc->picture->_y = -1; + + _cursorsArray.push_back(newc); +} + +void CInputController::setCursorMode(bool enabled) { + if (enabled) + _inputFlags |= 1; + else + _inputFlags &= ~1; +} + +CursorInfo::CursorInfo() { + pictureId = 0; + picture = 0; + hotspotX = 0; + hotspotY = 0; + itemPictureOffsX = 0; + itemPictureOffsY = 0; + width = 0; + height = 0; +} + +CursorInfo::CursorInfo(CursorInfo *src) { + pictureId = src->pictureId; + picture = src->picture; + hotspotX = src->hotspotX; + hotspotY = src->hotspotY; + itemPictureOffsX = src->itemPictureOffsX; + itemPictureOffsY = src->itemPictureOffsY; + width = src->width; + height = src->height; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h index a9106b7b01..72742b04b6 100644 --- a/engines/fullpipe/input.h +++ b/engines/fullpipe/input.h @@ -25,27 +25,44 @@ namespace Fullpipe { +class Picture; + void setInputDisabled(bool state); -class CInputControllerItemArray : public CObArray { +struct CursorInfo { + int pictureId; + Picture *picture; + int hotspotX; + int hotspotY; + int itemPictureOffsX; + int itemPictureOffsY; + int width; + int height; + + CursorInfo(); + CursorInfo(CursorInfo *src); }; +typedef Common::Array CursorsArray; + class CInputController { //CObject obj; int _flag; - int _flags; + int _inputFlags; int _cursorHandle; int _hCursor; int _field_14; int _cursorId; int _cursorIndex; - CInputControllerItemArray _cursorsArray; + CursorsArray _cursorsArray; Common::Rect _cursorBounds; int _cursorItemPicture; public: CInputController(); void setInputDisabled(bool state); + void addCursor(CursorInfo *cursor); + void setCursorMode(bool mode); }; } // End of namespace Fullpipe -- cgit v1.2.3 From d8cca2357e27b6794f1b7ebebbf17ac462ad1012 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 28 Jul 2013 16:56:36 +0300 Subject: FULLPIPE: Moved debug code to loadAllScenes() --- engines/fullpipe/fullpipe.cpp | 4 +++ engines/fullpipe/fullpipe.h | 1 + engines/fullpipe/init.cpp | 55 ++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/stateloader.cpp | 55 ---------------------------------------- 4 files changed, 60 insertions(+), 55 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 32ccbda78a..ddbae7ac07 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -121,6 +121,10 @@ Common::Error FullpipeEngine::run() { sceneSwitcher(&ent); +#if 1 + loadAllScenes(); +#endif + _currentScene->draw(); while (!g_fullpipe->_needQuit) { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index a0dba6a431..ba4b3171de 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -135,6 +135,7 @@ public: void initObjectStates(); void setLevelStates(); void setSwallowedEggsState(); + void loadAllScenes(); void initCursors(); void addCursor(CursorInfo *cursorInfo, Scene *inv, int pictureId, int hotspotX, int hotspotY, int itemPictureOffsX, int itemPictureOffsY); diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp index 9892f55574..b1c9d6d0de 100644 --- a/engines/fullpipe/init.cpp +++ b/engines/fullpipe/init.cpp @@ -201,4 +201,59 @@ void FullpipeEngine::initMap() { updateMapPiece(PIC_MAP_A13, 1u); } +void FullpipeEngine::loadAllScenes() { + accessScene(301); + accessScene(302); + accessScene(303); + accessScene(304); + accessScene(305); + accessScene(321); + accessScene(635); + accessScene(649); + accessScene(650); + accessScene(651); + accessScene(652); + accessScene(653); + accessScene(654); + accessScene(655); + accessScene(726); + accessScene(858); + accessScene(903); + accessScene(1137); + accessScene(1138); + accessScene(1139); + accessScene(1140); + accessScene(1141); + accessScene(1142); + accessScene(1143); + accessScene(1144); + accessScene(1546); + accessScene(1547); + accessScene(1548); + accessScene(1549); + accessScene(1550); + accessScene(1551); + accessScene(1552); + accessScene(2062); + accessScene(2063); + accessScene(2064); + accessScene(2065); + accessScene(2066); + accessScene(2067); + accessScene(2068); + accessScene(2069); + accessScene(2070); + accessScene(2071); + accessScene(2072); + accessScene(2460); + accessScene(3896); + accessScene(3907); + accessScene(4620); + accessScene(4999); + accessScene(5000); + accessScene(5001); + accessScene(5166); + accessScene(5222); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 6470b1c687..859e6eac15 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -48,61 +48,6 @@ bool FullpipeEngine::loadGam(const char *fname) { _inventory->setItemFlags(ANI_INV_MAP, 0x10003); _inventory->addItem(ANI_INV_MAP, 1); -#if 0 - g_fullpipe->accessScene(301); - g_fullpipe->accessScene(302); - g_fullpipe->accessScene(303); - g_fullpipe->accessScene(304); - g_fullpipe->accessScene(305); - g_fullpipe->accessScene(321); - g_fullpipe->accessScene(635); - g_fullpipe->accessScene(649); - g_fullpipe->accessScene(650); - g_fullpipe->accessScene(651); - g_fullpipe->accessScene(652); - g_fullpipe->accessScene(653); - g_fullpipe->accessScene(654); - g_fullpipe->accessScene(655); - g_fullpipe->accessScene(726); - g_fullpipe->accessScene(858); - g_fullpipe->accessScene(903); - g_fullpipe->accessScene(1137); - g_fullpipe->accessScene(1138); - g_fullpipe->accessScene(1139); - g_fullpipe->accessScene(1140); - g_fullpipe->accessScene(1141); - g_fullpipe->accessScene(1142); - g_fullpipe->accessScene(1143); - g_fullpipe->accessScene(1144); - g_fullpipe->accessScene(1546); - g_fullpipe->accessScene(1547); - g_fullpipe->accessScene(1548); - g_fullpipe->accessScene(1549); - g_fullpipe->accessScene(1550); - g_fullpipe->accessScene(1551); - g_fullpipe->accessScene(1552); - g_fullpipe->accessScene(2062); - g_fullpipe->accessScene(2063); - g_fullpipe->accessScene(2064); - g_fullpipe->accessScene(2065); - g_fullpipe->accessScene(2066); - g_fullpipe->accessScene(2067); - g_fullpipe->accessScene(2068); - g_fullpipe->accessScene(2069); - g_fullpipe->accessScene(2070); - g_fullpipe->accessScene(2071); - g_fullpipe->accessScene(2072); - g_fullpipe->accessScene(2460); - g_fullpipe->accessScene(3896); - g_fullpipe->accessScene(3907); - g_fullpipe->accessScene(4620); - g_fullpipe->accessScene(4999); - g_fullpipe->accessScene(5000); - g_fullpipe->accessScene(5001); - g_fullpipe->accessScene(5166); - g_fullpipe->accessScene(5222); -#endif - _inventory->rebuildItemRects(); for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) { -- cgit v1.2.3 From 795a926744d4b39604fe8710a402bdb0cda5f79c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 28 Jul 2013 17:22:18 +0300 Subject: FULLPIPE: Unstubbed loadGam() and CGameLoader() --- engines/fullpipe/fullpipe.cpp | 5 +++ engines/fullpipe/fullpipe.h | 11 ++++++ engines/fullpipe/gameloader.cpp | 17 ++++----- engines/fullpipe/scenes.cpp | 24 +++++++++++++ engines/fullpipe/stateloader.cpp | 74 +++++++++++++++++++++------------------- 5 files changed, 85 insertions(+), 46 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index ddbae7ac07..efecffa552 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -77,6 +77,11 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _updateScreenCallback = 0; _updateCursorCallback = 0; + _msgX = 0; + _msgY = 0; + _msgObjectId2 = 0; + _msgId = 0; + _behaviorManager = 0; _cursorId = 0; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index ba4b3171de..760bd4e9cc 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -50,6 +50,7 @@ class CInputController; class CInventory2; struct CursorInfo; class EntranceInfo; +class ExCommand; class GameProject; class GlobalMessageQueueList; class MessageHandler; @@ -59,6 +60,11 @@ class Scene; class SoundList; class StaticANIObject; +int global_messageHandler1(ExCommand *cmd); +int global_messageHandler2(ExCommand *cmd); +int global_messageHandler3(ExCommand *cmd); +int global_messageHandler4(ExCommand *cmd); + class FullpipeEngine : public ::Engine { protected: @@ -121,6 +127,11 @@ public: GlobalMessageQueueList *_globalMessageQueueList; MessageHandler *_messageHandlers; + int _msgX; + int _msgY; + int _msgObjectId2; + int _msgId; + BehaviorManager *_behaviorManager; MovTable *_movTable; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 72b2827568..61a4915fa7 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -51,9 +51,9 @@ CGameLoader::CGameLoader() { _gameProject = 0; //_gameName = "untitled"; - //addMessageHandler2(CGameLoader_messageHandler1, 0, 0); - //insertMessageHandler(CGameLoader_messageHandler2, 0, 128); - //insertMessageHandler(CGameLoader_messageHandler3, 0, 1); + addMessageHandlerByIndex(global_messageHandler2, 0, 0); + insertMessageHandler(global_messageHandler3, 0, 128); + insertMessageHandler(global_messageHandler4, 0, 1); _field_FA = 0; _field_F8 = 0; @@ -65,13 +65,10 @@ CGameLoader::CGameLoader() { _preloadId2 = 0; _updateCounter = 0; - //g_x = 0; - //g_y = 0; - //dword_478480 = 0; - //g_objectId2 = 0; - //g_id = 0; - - warning("STUB: CGameLoader::CGameLoader()"); + g_fullpipe->_msgX = 0; + g_fullpipe->_msgY = 0; + g_fullpipe->_msgObjectId2 = 0; + g_fullpipe->_msgId = 0; } CGameLoader::~CGameLoader() { diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 6e033a08f3..8a7d7805b5 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -624,6 +624,30 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { return true; } +int global_messageHandler1(ExCommand *cmd) { + warning("STUB: global_messageHandler1()"); + + return 0; +} + +int global_messageHandler2(ExCommand *cmd) { + warning("STUB: global_messageHandler2()"); + + return 0; +} + +int global_messageHandler3(ExCommand *cmd) { + warning("STUB: global_messageHandler3()"); + + return 0; +} + +int global_messageHandler4(ExCommand *cmd) { + warning("STUB: global_messageHandler4()"); + + return 0; +} + int sceneIntro_updateCursor() { g_fullpipe->_cursorId = 0; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 859e6eac15..d4c4948f21 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -38,55 +38,57 @@ namespace Fullpipe { bool FullpipeEngine::loadGam(const char *fname) { _gameLoader = new CGameLoader(); - if (_gameLoader->loadFile(fname)) { - g_fullpipe->_currSoundListCount = 0; - initObjectStates(); + if (!_gameLoader->loadFile(fname)) + return false; - //set_g_messageQueueCallback1(messageQueueCallback1); - //addMessageHandler2(global_messageHandler, 0, 4); - _inventory = getGameLoaderInventory(); - _inventory->setItemFlags(ANI_INV_MAP, 0x10003); - _inventory->addItem(ANI_INV_MAP, 1); + _currSoundListCount = 0; + initObjectStates(); + // set_g_messageQueueCallback1(messageQueueCallback1); - _inventory->rebuildItemRects(); + addMessageHandlerByIndex(global_messageHandler1, 0, 4); - for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) { - ((MemoryObject *)((PictureObject *)*p)->_picture)->load(); - } + _inventory = getGameLoaderInventory(); + _inventory->setItemFlags(ANI_INV_MAP, 0x10003); + _inventory->addItem(ANI_INV_MAP, 1); - //_sceneSwitcher = sceneSwitcher; - //_preloadCallback = gameLoaderPreloadCallback - //_readSavegameCallback = gameLoaderReadSavegameCallback; - _aniMan = accessScene(SC_COMMON)->getAniMan(); - _scene2 = 0; + _inventory->rebuildItemRects(); - _movTable = _aniMan->countMovements(); + for (CPtrList::iterator p = _inventory->getScene()->_picObjList.begin(); p != _inventory->getScene()->_picObjList.end(); ++p) { + ((MemoryObject *)((PictureObject *)*p)->_picture)->load(); + } - _aniMan->setSpeed(1); + // _sceneSwitcher = sceneSwitcher; + // _preloadCallback = gameLoaderPreloadCallback + // _readSavegameCallback = gameLoaderReadSavegameCallback; - PictureObject *pic = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0); + _aniMan = accessScene(SC_COMMON)->getAniMan(); + _scene2 = 0; - pic->setFlags(pic->_flags & 0xFFFB); + _movTable = _aniMan->countMovements(); - // Not used in full game - //_evalVersionPic = accessScene(SC_COMMON)->getPictureObjectById(PIC_CMN_EVAL, 0); + _aniMan->setSpeed(1); - initMap(); - initCursors(); + PictureObject *pic = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0); - setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED")); + pic->setFlags(pic->_flags & 0xFFFB); - if (_flgPlayIntro) { - _gameLoader->loadScene(SC_INTRO1); - _gameLoader->gotoScene(SC_INTRO1, TrubaUp); - } else { - _gameLoader->loadScene(SC_1); - _gameLoader->gotoScene(SC_1, TrubaLeft); - } + // Not used in full game + //_evalVersionPic = accessScene(SC_COMMON)->getPictureObjectById(PIC_CMN_EVAL, 0); + + initMap(); + initCursors(); + + setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED")); + + if (_flgPlayIntro) { + _gameLoader->loadScene(SC_INTRO1); + _gameLoader->gotoScene(SC_INTRO1, TrubaUp); + } else { + _gameLoader->loadScene(SC_1); + _gameLoader->gotoScene(SC_1, TrubaLeft); + } - if (!_currentScene) - return false; - } else + if (!_currentScene) return false; return true; -- cgit v1.2.3 From 8cceaae590792b8a96b295530288437b17b21437 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 29 Jul 2013 14:28:47 +0300 Subject: FULLPIPE: Implement StaticANIObject::draw() --- engines/fullpipe/fullpipe.cpp | 2 +- engines/fullpipe/gfx.cpp | 13 +++ engines/fullpipe/gfx.h | 20 ++--- engines/fullpipe/scene.cpp | 6 +- engines/fullpipe/scene.h | 1 + engines/fullpipe/statics.cpp | 180 ++++++++++++++++++++++++++++++++++++++++-- engines/fullpipe/statics.h | 15 +++- 7 files changed, 215 insertions(+), 22 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index efecffa552..27ccb29dcc 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -126,7 +126,7 @@ Common::Error FullpipeEngine::run() { sceneSwitcher(&ent); -#if 1 +#if 0 loadAllScenes(); #endif diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 2b007bd2e4..88b86630b9 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -777,5 +777,18 @@ void Shadows::initMovement(Movement *mov) { warning("STUB: Shadows::initMovement()"); } +DynamicPhase *Shadows::findSize(int width, int height) { + int idx = 0; + int min = 1000; + + for (uint i = 0; i < _items.size(); i++) { + int w = abs(width - _items[i].width); + if (w < min) { + min = w; + idx = i; + } + } + return _items[idx].dynPhase; +} } // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 81de8ec1c0..1dbdd28b44 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -30,10 +30,6 @@ namespace Fullpipe { class DynamicPhase; class Movement; -class ShadowsItemArray : public CObArray { - // empty -}; - struct Bitmap { int _x; int _y; @@ -62,6 +58,7 @@ class Picture : public MemoryObject { friend class DynamicPhase; friend class PictureObject; friend class CInputController; + friend class StaticANIObject; Common::Rect _rect; Bitmap *_convertedBitmap; @@ -168,6 +165,14 @@ class Background : public CObject { void addPictureObject(PictureObject *pct); }; +struct ShadowsItem { + int width; + int height; + DynamicPhase *dynPhase; +}; + +typedef Common::Array ShadowsItemArray; + class Shadows : public CObject { int _sceneId; int _staticAniObjectId; @@ -180,12 +185,7 @@ class Shadows : public CObject { void init(); void initMovement(Movement *mov); -}; - -struct ShadowsItem { - int width; - int height; - DynamicPhase *dynPhase; + DynamicPhase *findSize(int width, int height); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 1f6cb21ad7..5347d761d2 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -122,6 +122,7 @@ Scene::Scene() { _field_BC = 0; _shadows = 0; _soundList = 0; + _libHandle = 0; } bool Scene::load(MfcArchive &file) { @@ -236,7 +237,8 @@ bool Scene::load(MfcArchive &file) { } void Scene::initStaticANIObjects() { - warning("STUB: Scene::initStaticANIObjects"); + for (uint i = 0; i < _staticANIObjectList1.size(); i++) + ((StaticANIObject *)_staticANIObjectList1[i])->initMovements(); } void Scene::init() { @@ -249,7 +251,7 @@ void Scene::init() { ((PictureObject *)_picObjList[i])->clearFlags(); for (uint i = 0; i < _staticANIObjectList1.size(); i++) - ((PictureObject *)_staticANIObjectList1[i])->clearFlags(); + ((StaticANIObject *)_staticANIObjectList1[i])->clearFlags(); if (_staticANIObjectList2.size() != _staticANIObjectList1.size()) { _staticANIObjectList2.clear(); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index d51d113b5e..95528d2e9e 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -30,6 +30,7 @@ namespace Fullpipe { class Scene : public Background { friend class FullpipeEngine; friend class SceneTag; + friend class StaticANIObject; CPtrList _staticANIObjectList1; CPtrList _staticANIObjectList2; diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index cca12cef65..2fa53e2d96 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -219,7 +219,64 @@ Statics *StaticANIObject::addReverseStatics(Statics *st) { } void StaticANIObject::draw() { - warning("STUB: StaticANIObject::draw()"); + if (_flags & 4 == 0) + return; + + Common::Point point; + Common::Rect rect; + + debug(0, "StaticANIObject::draw()"); + + if (_shadowsOn && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_shadows + && (getCurrDimensions(point)->x != 1 || getCurrDimensions(point)->y != 1)) { + + DynamicPhase *dyn; + + if (!_movement || _flags & 0x20 ) + dyn = _statics; + else + dyn = _movement->_currDynamicPhase; + + if (dyn->getDynFlags() & 4) { + rect = *dyn->_rect; + + DynamicPhase *shd = g_fullpipe->_currentScene->_shadows->findSize(rect.width(), rect.height()); + if (shd) { + shd->getDimensions(&point); + int midx = _ox - shd->_x / 2 - dyn->_someX; + int midy = _oy - shd->_y / 2 - dyn->_someY + rect.bottom - 3; + int shdy = shd->_y; + + int px; + if (!_movement || _flags & 0x20 ) + px = _statics->getCenter(&point)->x; + else + px = _movement->getCenter(&point)->x; + + if (_shadowsOn != 1) + midy = _shadowsOn - shdy / 2; + + shd->draw(px + midx, midy, 0, 0); + } + } + } + + int angle = 0; + if (_field_30 & 0xC000) { + if (_field_30 & 0x8000) + angle = -(_field_30 ^ 0x8000); + else + angle = _field_30 ^ 0x4000; + } + + if (!_movement || _flags & 0x20) { + _statics->getSomeXY(point); + _statics->_x = _ox - point.x; + _statics->_y = _oy - point.y; + _statics->draw(_statics->_x, _statics->_y, 0, angle); + } else { + _movement->draw(0, angle); + } } void StaticANIObject::draw2() { @@ -268,6 +325,33 @@ void StaticANIObject::setSpeed(int speed) { warning("STUB: StaticANIObject::setSpeed(%d)", speed); } +void StaticANIObject::initMovements() { + for (uint i = 0; i < _movements.size(); i++) + ((Movement *)_movements[i])->removeFirstPhase(); +} + +Common::Point *StaticANIObject::getCurrDimensions(Common::Point &p) { + Picture *pic; + + if (_movement) + pic = _movement->_currDynamicPhase; + else + pic = _statics; + + if (pic) { + Common::Point point; + + pic->getDimensions(&point); + p.x = point.x; + p.y = point.y; + } else { + p.x = 0; + p.y = 0; + } + + return &p; +} + Statics::Statics() { _staticsId = 0; _picture = 0; @@ -317,6 +401,24 @@ Common::Point *Statics::getSomeXY(Common::Point &p) { return &p; } +Common::Point *Statics::getCenter(Common::Point *p) { + Common::Rect rect; + + rect = *_rect; + + if (_staticsId & 0x4000) { + Common::Point point; + + getDimensions(&point); + rect.moveTo(point.x - _rect->right, _rect->top); + } + + p->x = rect.left + _rect->width() / 2; + p->y = rect.top + _rect->height() / 2; + + return p; +} + Movement::Movement() { _lastFrameSpecialFlag = 0; _flipFlag = 0; @@ -335,7 +437,7 @@ Movement::Movement() { _field_8C = 0; _currDynamicPhaseIndex = 0; _field_94 = 0; - _currMovementObj = 0; + _currMovement = 0; _counter = 0; _counterMax = 83; } @@ -400,7 +502,7 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { } else { int movid = file.readUint16LE(); - _currMovementObj = ani->getMovementById(movid); + _currMovement = ani->getMovementById(movid); _staticsObj1 = 0; _staticsObj2 = 0; @@ -433,6 +535,28 @@ Common::Point *Movement::getCurrDynamicPhaseXY(Common::Point &p) { return &p; } +Common::Point *Movement::getDimensionsOfPhase(Common::Point *p, int phaseIndex) { + int idx = phaseIndex; + + if (idx == -1) + idx = _currDynamicPhaseIndex; + + DynamicPhase *dyn; + + if (_currMovement) + dyn = (DynamicPhase *)_currMovement->_dynamicPhases[idx]; + else + dyn = (DynamicPhase *)_dynamicPhases[idx]; + + Common::Point point; + + dyn->getDimensions(&point); + + *p = point; + + return p; +} + void Movement::initStatics(StaticANIObject *ani) { warning("STUB: Movement::initStatics"); } @@ -448,7 +572,7 @@ void Movement::updateCurrDynamicPhase() { void Movement::loadPixelData() { Movement *mov = this; - for (Movement *i = _currMovementObj; i; i = i->_currMovementObj) + for (Movement *i = _currMovement; i; i = i->_currMovement) mov = i; for (uint i = 0; i < _dynamicPhases.size(); i++) { @@ -460,6 +584,49 @@ void Movement::loadPixelData() { mov->_staticsObj1->getPixelData(); } +void Movement::removeFirstPhase() { + if (_updateFlag1) { + if (!_currDynamicPhaseIndex) + gotoNextFrame(0, 0); + + if (!_currMovement) { + _dynamicPhases.remove_at(0); + + for (uint i = 0; i < _dynamicPhases.size(); i++) { + _framePosOffsets[i - 1]->x = _framePosOffsets[i]->x; + _framePosOffsets[i - 1]->y = _framePosOffsets[i]->y; + } + } + _currDynamicPhaseIndex--; + } + + updateCurrDynamicPhase(); + _updateFlag1 = 0; +} + +void Movement::gotoNextFrame(int callback1, int callback2) { + warning("STUB: Movement::gotoNextFrame()"); +} + +Common::Point *Movement::getCenter(Common::Point *p) { + Common::Rect rect; + + rect = *_currDynamicPhase->_rect; + + if (_currMovement) { + Common::Point point; + + getDimensionsOfPhase(&point, _currDynamicPhaseIndex); + + rect.moveTo(point.x - _currDynamicPhase->_rect->right, _currDynamicPhase->_rect->top); + } + + p->x = rect.left + _currDynamicPhase->_rect->width() / 2; + p->y = rect.top + _currDynamicPhase->_rect->height() / 2; + + return p; +} + DynamicPhase::DynamicPhase() { _someX = 0; _rect = 0; @@ -508,10 +675,7 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) { _someY = src->_someY; } - _rect->top = src->_rect->top; - _rect->bottom = src->_rect->bottom; - _rect->left = src->_rect->left; - _rect->right = src->_rect->right; + *_rect = *src->_rect; _width = src->_width; _height = src->_height; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 8a0f36aa6b..bfd7e70f99 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -64,6 +64,7 @@ class StaticPhase : public Picture { class DynamicPhase : public StaticPhase { friend class Movement; friend class Statics; + friend class StaticANIObject; int _someX; int _someY; @@ -77,6 +78,8 @@ class DynamicPhase : public StaticPhase { DynamicPhase(DynamicPhase *src, bool reverse); virtual bool load(MfcArchive &file); + + int getDynFlags() { return _dynFlags; } }; class Statics : public DynamicPhase { @@ -96,11 +99,14 @@ class Statics : public DynamicPhase { Statics *getStaticsById(int itemId); Common::Point *getSomeXY(Common::Point &p); + Common::Point *getCenter(Common::Point *p); }; class StaticANIObject; class Movement : public GameObject { + friend class StaticANIObject; + int _field_24; int _field_28; int _lastFrameSpecialFlag; @@ -118,7 +124,7 @@ class Movement : public GameObject { CPtrList _dynamicPhases; int _field_78; Common::Point **_framePosOffsets; - Movement *_currMovementObj; + Movement *_currMovement; int _field_84; DynamicPhase *_currDynamicPhase; int _field_8C; @@ -131,10 +137,15 @@ class Movement : public GameObject { bool load(MfcArchive &file, StaticANIObject *ani); Common::Point *getCurrDynamicPhaseXY(Common::Point &p); + Common::Point *getCenter(Common::Point *p); + Common::Point *getDimensionsOfPhase(Common::Point *p, int phaseIndex); void initStatics(StaticANIObject *ani); void updateCurrDynamicPhase(); + void removeFirstPhase(); + void gotoNextFrame(int callback1, int callback2); + void loadPixelData(); void draw(bool flipFlag, int angle); @@ -174,12 +185,14 @@ class StaticANIObject : public GameObject { Statics *getStaticsById(int id); Movement *getMovementById(int id); Movement *getMovementByName(char *name); + Common::Point *getCurrDimensions(Common::Point &p); void clearFlags(); bool isIdle(); void deleteFromGlobalMessageQueue(); + void initMovements(); void loadMovementsPixelData(); Statics *addReverseStatics(Statics *ani); -- cgit v1.2.3 From 56cb6bbd4523dd92bf3a4ad6b896363da887b9cd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 29 Jul 2013 22:16:14 +0300 Subject: FULLPIPE: Implemented CGameLoader::gotoScene() --- engines/fullpipe/gameloader.cpp | 69 ++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/messages.cpp | 69 +++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/messages.h | 14 +++++++++ engines/fullpipe/scene.cpp | 8 +++++ engines/fullpipe/scene.h | 1 + 5 files changed, 160 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 61a4915fa7..1d53cd3e15 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -25,6 +25,7 @@ #include "fullpipe/gameloader.h" #include "fullpipe/scene.h" #include "fullpipe/input.h" +#include "fullpipe/statics.h" namespace Fullpipe { @@ -153,7 +154,73 @@ bool CGameLoader::loadScene(int sceneId) { } bool CGameLoader::gotoScene(int sceneId, int entranceId) { - warning("STUB: CGameLoader::gotoScene(%d, %d)", sceneId, entranceId); + SceneTag *st; + + int sc2idx = getSceneTagBySceneId(sceneId, &st); + + if (sc2idx < 0) + return false; + + if (!_sc2array[sc2idx]._isLoaded) + return 0; + + if (_sc2array[sc2idx]._entranceDataCount < 1) { + g_fullpipe->_currentScene = st->_scene; + return true; + } + + if (_sc2array[sc2idx]._entranceDataCount <= 0 ) + return false; + + int entranceIdx; + for (entranceIdx = 0; _sc2array[sc2idx]._entranceData[entranceIdx]->_field_4 != entranceId; entranceIdx++) { + if (entranceIdx >= _sc2array[sc2idx]._entranceDataCount) + return false; + } + + CGameVar *sg = _gameVar->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME"); + + if (sg || (sg = _gameVar->getSubVarByName("OBJSTATES")->addSubVarAsInt("SAVEGAME", 0)) != 0) + sg->setSubVarAsInt("Entrance", entranceId); + + if (!g_fullpipe->sceneSwitcher(_sc2array[sc2idx]._entranceData[entranceIdx])) + return 0; + + g_fullpipe->_msgObjectId2 = 0; + g_fullpipe->_msgY = -1; + g_fullpipe->_msgX = -1; + + g_fullpipe->_currentScene = st->_scene; + + MessageQueue *mq1 = g_fullpipe->_currentScene->getMessageQueueById(_sc2array[sc2idx]._entranceData[entranceIdx]->_messageQueueId); + if (mq1) { + MessageQueue *mq = new MessageQueue(mq1, 0, 0); + + StaticANIObject *stobj = g_fullpipe->_currentScene->getStaticANIObject1ById(_field_FA, -1); + if (stobj) { + stobj->setFlags(stobj->_flags & 0x100); + + ExCommand *ex = new ExCommand(stobj->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0); + + ex->_field_14 = 256; + ex->_messageNum = 0; + ex->_excFlags |= 3; + + mq->_exCommands.push_back(ex); + } + + mq->setFlags(mq->getFlags() | 1); + + if (!mq->chain(0)) { + delete mq; + + return false; + } + } else { + StaticANIObject *stobj = g_fullpipe->_currentScene->getStaticANIObject1ById(_field_FA, -1); + if (stobj) + stobj->setFlags(stobj->_flags & 0xfeff); + } return true; } diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 6b07a4ef69..69b29dcef8 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -42,6 +42,14 @@ ExCommand::ExCommand(ExCommand *src) : Message(src) { } +ExCommand::ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11) : + Message(parentId, messageKind, x, y, a7, a8, sceneClickX, sceneClickY, a11) { + _field_3C = 1; + _messageNum = messageNum; + _excFlags = 0; + _parId = 0; +} + bool ExCommand::load(MfcArchive &file) { debug(5, "ExCommand::load()"); @@ -103,6 +111,22 @@ Message::Message(Message *src) { _field_34 = src->_field_34; } +Message::Message(int16 parentId, int messageKind, int x, int y, int a6, int a7, int sceneClickX, int sceneClickY, int a10) { + _messageKind = messageKind; + _parentId = parentId; + _x = x; + _y = y; + _field_14 = a6; + _sceneClickX = sceneClickX; + _sceneClickY = sceneClickY; + _field_24 = a7; + _field_20 = a10; + _param28 = 0; + _field_2C = 0; + _field_30 = 0; + _field_34 = 0; +} + CObjstateCommand::CObjstateCommand() { _value = 0; } @@ -128,6 +152,32 @@ MessageQueue::MessageQueue() { _flags = 0; } +MessageQueue::MessageQueue(MessageQueue *src, int parId, int field_38) { + _counter = 0; + _field_38 = (field_38 == 0); + + for (uint i = 0; i < src->_exCommands.size(); i++) { + ExCommand *ex = new ExCommand((ExCommand *)src->_exCommands[i]); + ex->_excFlags |= 2; + + _exCommands.push_back(ex); + } + _field_14 = src->_field_14; + + if (parId) + _parId = parId; + else + _parId = src->_parId; + + _id = g_fullpipe->_globalMessageQueueList->compact(); + _dataId = src->_dataId; + _flags = src->_flags; + + g_fullpipe->_globalMessageQueueList->addMessageQueue(this); + + _isFinished = 0; +} + bool MessageQueue::load(MfcArchive &file) { debug(5, "MessageQueue::load()"); @@ -153,6 +203,13 @@ bool MessageQueue::load(MfcArchive &file) { return true; } +bool MessageQueue::chain(StaticANIObject *ani) { + warning("STUB: MessageQueue::chain()"); + + return true; +} + + MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { for (CPtrList::iterator s = begin(); s != end(); ++s) { if (((MessageQueue *)s)->_id == id) @@ -179,6 +236,18 @@ void GlobalMessageQueueList::disableQueueById(int id) { } } +int GlobalMessageQueueList::compact() { + warning("STUB: GlobalMessageQueueList::compact()"); + + return 0; +} + +void GlobalMessageQueueList::addMessageQueue(MessageQueue *msg) { + msg->setFlags(msg->getFlags() | 2); + + push_back(msg); +} + bool removeMessageHandler(int16 id, int pos) { if (g_fullpipe->_messageHandlers) { MessageHandler *curItem = g_fullpipe->_messageHandlers; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 97e416426b..c8fe264da3 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -50,9 +50,13 @@ class Message : public CObject { public: Message(); Message(Message *src); + Message(int16 parentId, int messageKind, int x, int y, int a6, int a7, int sceneClickX, int sceneClickY, int a10); }; class ExCommand : public Message { + friend class CGameLoader; + friend class MessageQueue; + int _messageNum; int _field_3C; int _excFlags; @@ -61,6 +65,7 @@ class ExCommand : public Message { public: ExCommand(); ExCommand(ExCommand *src); + ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11); virtual ~ExCommand() {} virtual bool load(MfcArchive &file); @@ -78,6 +83,8 @@ class CObjstateCommand : public CObject { class MessageQueue : public CObject { friend class GlobalMessageQueueList; + friend class CGameLoader; + friend class Scene; protected: int _id; @@ -95,9 +102,13 @@ class MessageQueue : public CObject { public: MessageQueue(); + MessageQueue(MessageQueue *src, int parId, int field_38); virtual bool load(MfcArchive &file); int getFlags() { return _flags; } + void setFlags(int flags) { _flags = flags; } + + bool chain(StaticANIObject *ani); }; class GlobalMessageQueueList : public CPtrList { @@ -105,6 +116,9 @@ class GlobalMessageQueueList : public CPtrList { MessageQueue *getMessageQueueById(int id); void deleteQueueById(int id); void disableQueueById(int id); + void addMessageQueue(MessageQueue *msg); + + int compact(); }; struct MessageHandler { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 5347d761d2..9f4901d83a 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -332,6 +332,14 @@ PictureObject *Scene::getPictureObjectById(int objId, int flags) { return 0; } +MessageQueue *Scene::getMessageQueueById(int messageId) { + for (uint i = 0; i < _messageQueueList.size(); i++) + if (((MessageQueue *)_messageQueueList[i])->_dataId == messageId) + return (MessageQueue *)_messageQueueList[i]; + + return 0; +} + void Scene::preloadMovements(CGameVar *var) { CGameVar *preload = var->getSubVarByName("PRELOAD"); if (!preload) diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 95528d2e9e..b3dbdcc605 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -57,6 +57,7 @@ class Scene : public Background { StaticANIObject *getAniMan(); StaticANIObject *getStaticANIObject1ById(int obj, int a3); StaticANIObject *getStaticANIObject1ByName(char *name, int a3); + MessageQueue *getMessageQueueById(int messageId); void deleteStaticANIObject(StaticANIObject *obj); void addStaticANIObject(StaticANIObject *obj, bool addList2); -- cgit v1.2.3 From f22f7a8682e159e61daa111928183db4e7f8d48b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 30 Jul 2013 12:33:47 +0300 Subject: FULLPIPE: Removed all garbage from constants list and added include guards --- engines/fullpipe/gameobj.h | 5183 +------------------------------------------- 1 file changed, 105 insertions(+), 5078 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameobj.h b/engines/fullpipe/gameobj.h index 54a3f85410..7b24dd79ef 100644 --- a/engines/fullpipe/gameobj.h +++ b/engines/fullpipe/gameobj.h @@ -1,5095 +1,122 @@ -#define PIC_MAP_H09 5365 -#define PIC_SC19_RTRUBA31 5320 -#define PIC_SC7_LTRUBA 709 -#define PIC_SC5_RTRUBA1 664 -#define MV_MOM_JUMPFW 661 -#define PIC_SC8_RTRUBA 736 -#define PIC_CSR_LIFT 5176 -#define SC_FINAL4 2460 -#define SND_FIN_009 5081 -#define MV_FNHED_LOOK 5046 -#define ANI_FN3_HEAD 5042 -#define QU_SC32_TRYKUBIK 4981 -#define QU_BRD16_STARTBEARDED 4948 -#define MV_BRDCMN_TURN_RL 4946 -#define SND_CMN_064 4933 -#define PIC_CSR_ARCADE8 4911 -#define SND_22_034 4866 -#define PIC_INV_SWAB_C 4854 -#define PIC_INV_GLASSES_C 4839 -#define PIC_INV_BOARD_C 4824 -#define PIC_INV_COIN_H 4794 -#define PIC_INV_CARPET 1875 -#define MSG_RESTARTGAME 4767 -#define rMV_BRDCMN_FLYAWAY 4740 -#define SND_30_015 4710 -#define MV_EGTR_MD1_SHOW 4694 -#define MV_EGTR_SLIMSHOW 4693 -#define MV_CPT35_NORM 4593 -#define ST_BTN27_NORM 4581 -#define MV_SCK26_NORM 4554 -#define ANI_SOCK_26 4553 -#define SND_34_033 4493 -#define SND_34_022 4482 -#define SND_34_011 4471 -#define SND_33_012 4449 -#define SND_31_003 4381 -#define MV_VNT34_NORM 4308 -#define MV_MAN34_TURNVENT_R 2500 -#define MV_MAN32_PIPETOTUBE 4298 -#define MSG_SC28_ENDLIFT1 4259 -#define MV_MAN25_TRYHAND 4217 -#define MV_MAN_LOOKLADDER_RRV 4212 -#define SND_27_040 4141 -#define SND_25_020 4073 -#define SND_21_024 3978 -#define SND_21_013 3967 -#define SND_21_002 3951 -#define SND_13_032 3777 -#define SND_13_021 3766 -#define SND_12_011 3731 -#define SND_10_013 3679 -#define SND_10_002 3663 -#define SND_7_017 3597 -#define SND_7_006 3586 -#define SND_6_029 3568 -#define SND_6_018 3557 -#define SND_6_007 3544 -#define SND_CMN_031 3516 -#define QU_DRP25_TOFLOOR 3502 -#define MV_MAN25_TRYSPADE 3497 -#define QU_SC28_WORKINSIDE 3449 -#define MV_WMN28_IN_2 3445 -#define QU_MAN_DEF_SHOES1 3380 -#define MV_MAN_STARTSHOES_1 3373 -#define ST_BTH_1 3365 -#define MV_MAN_TURN_SRL 1081 -#define MSG_SC13_CLOSEFAST 1267 -#define MV_CDI_SHOWEYE 3309 -#define QU_GRL_LAUGH_POPA 3281 -#define QU_KZW14_TOEDGE 3272 -#define MSG_SC14_SHOWBALLGMAHIT2 3245 -#define QU_SC5_SND5 3244 -#define QU_SC4_SND4 3238 -#define QU_SC3_SND3 3232 -#define QU_SC2_SND1 3225 -#define SND_4_009 3124 -#define QU_STR_TURNL_L 3058 -#define QU_MID11_LOOK 3033 -#define ANI_CLOCK_8 2989 -#define QU_SC38_SHOWBOTTLE_ONTABLE 2838 -#define ST_LBN_6P 2769 -#define ST_LBN_4N 2762 -#define MV_LBN_2 2755 -#define MV_GRT9_FALL 2720 -#define MV_PTI25_NORM 2674 -#define PIC_SC33_TUMBA 2619 -#define PIC_SC33_LTRUBA 2618 -#define QU_SC35_SHOWHOSE 2519 -#define ST_CTS34_GROWN2 2474 -#define ST_CTS34_EMPTY 2383 -#define MV_DMN38_NORM4 2252 -#define ANI_PORTER 2082 -#define PIC_SC29_RTRUBA 2079 -#define QU_DRV_FROMRIGHT 2037 -#define QU_DRV_LOOKRIGHT2 2035 -#define QU_DRV_STOPDRIVE 2031 -#define ANI_BITA 2026 -#define MV_MID_SWAB2 2024 -#define QU_SC26_OPEN4 1941 -#define MV_MAN25_TOTRUBA 1884 -#define PIC_SC25_LADDERUP 1854 -#define ST_LUK23_CLOSED 1815 -#define QU_SC22_HANDLEDOWN 1804 -#define MV_MAN23_PUSH2 1725 -#define MV_GRFU_STARTKISS 1680 -#define QU_GRFU_STARTCHMOK 1669 -#define QU_GRFB_TAILUP 1644 -#define PIC_SCD_20 1622 -#define PIC_SC21_LADDER 1555 -#define MV_CDI_HIDEEMPTY 1541 -#define MV_MAN18_STANDKRESLO 1500 -#define MV_BOY18_JUMPFROM 1478 -#define QU_SMG_FILLBOTTLE 1433 -#define MSG_SC17_SHOWSUGAR 1416 -#define QU_SC17_SHOWSUGAR 1415 -#define ANI_INV_SUGAR 1410 -#define MSG_SC13_STARTWHIRLGIG 1388 -#define ST_GRL_EMPTY 1336 -#define MV_GRD2_LOOKRIGHT 1285 -#define MV_MAN15_TRIESOFF 1273 -#define QU_SC13_OPENBRIDGE 1213 -#define MV_MAN13_TAKEGUM 1208 -#define ST_MAN11_STARTJUMP 1130 -#define MSG_SC2_SHOWLADDER 1027 -#define MV_MAN6_PUSHBUTTON 1016 -#define MV_GLT_EAT 930 -#define ST_BLK_CLOSED 912 -#define MSG_SC8_GETHIMUP 789 -#define MV_BTT_CHESHET 752 -#define MV_BTT_LOOKMAN_SPOON 750 -#define MSG_STARTHAND 612 -#define ST_HND_EMPTY 603 -#define MV_CLK_CLOSE 594 -#define MSG_TESTKZWFLIGHT 570 -#define MSG_CLICKPLANK 549 -#define MSG_TESTPLANK 538 -#define MV_MAN_TURN_DL 492 -#define MV_MAN_TURN_UL 488 -#define MV_EGBR_SIGH 377 -#define MV_EGTR_FAT2SORROW 354 -#define MV_DYAS_CLOSEBOX 310 -#define MV_DYAS_FROMUS 313 -#define MV_EGTR_SLAPPIN 347 -#define MV_EGTR_SLAPPING 348 -#define MV_EGBR_RAISEHEAD 380 -#define MV_KZW_FROMHOLE 496 -#define QU_KZW_JUMPBOTTLE1 580 -#define MV_OTM_HANDLEUP 621 -#define QU_SC5_ENTER 637 -#define QU_SC6_TAKEBALL 681 -#define TrubaRight 696 -#define QU_BTT_LOOKMAN2 761 -#define MV_MAN8_HANDSUP 777 -#define MV_HGN_MORG 812 -#define ANI_INV_BOOT 881 -#define ANI_VISUNCHIK 904 -#define MV_NDV_LOOKBACK 951 -#define QU_GLT_BREATHE 960 -#define ANI_PACHKA 975 -#define PIC_INV_MENU 991 -#define MV_STR_NOSE 1182 -#define QU_STR_SHOW 1185 -#define QU_SC17_ENTER_UP 1326 -#define MV_JTI_FLOWIN 1394 -#define ANI_INV_BOTTLEFULL 1421 -#define QU_HND_TAKE2 1442 -#define MV_HND17_FIGA 1449 -#define PIC_SC19_RTRUBA1 1513 -#define PIC_SC16_LADDER 1523 -#define MSG_SC18_MANCLIMBEDDOWN 1540 -#define MV_GFA_SWING 1595 -#define QU_GFA_CHESHET 1608 -#define QU_GFA_STOPSOCK 1617 -#define MV_GRFU_TURN_LU 1646 -#define PIC_SC1_UTRUBA2 1696 -#define MV_CND_2_3 1708 -#define MSG_SC23_CLICKBTN3 1738 -#define MV_MAN21_COINTOBROOM 1773 -#define PIC_SC22_WALL 1797 -#define MSG_SC22_ONSTOOL 1798 -#define PIC_SC24_DTRUBA 1824 -#define PIC_SC24_UTRUBA 1829 -#define ANI_SHOOTER2 2111 -#define ST_DMN38_NORM 2202 -#define QU_DLD_DENY 2218 -#define QU_MLS_BLINK 2222 -#define MV_CTS_GROWMAN 2271 -#define MV_CTS_SHRINK 2272 -#define PIC_INV_PIPE 2321 -#define MV_LEG_POT2_OUT 2370 -#define MSG_SC32_SPIN 2405 -#define QU_SC35_ENTER_DOWN 2409 -#define MV_MAN32_POUR 2413 -#define MV_GMA20_STD_LOOK 2437 -#define QU_GMA20_STL_LOOK 2446 -#define QU_SC31_ENTER_RIGHT 2454 -#define MV_MAN34_PUTBOX 2483 -#define MV_BRD34_0_1 2510 -#define MV_PDV_NRM_BLINK 2525 -#define QU_PDV_CUT_BLINK 2528 -#define QU_SC37_ENTER_RIGHT 2565 -#define PIC_SCD_31 2566 -#define ANI_GUARD3 2577 -#define PIC_SC37_WALL2 2601 -#define ST_DMN01_default 2617 -#define ST_SCR36_NORM 2649 -#define MV_TSTG_FLOW 2663 -#define ANI_BOOTS_11 2704 -#define PIC_SC31_FLOOR 2712 -#define ST_TBE33_NORM 2717 -#define MV_DMN3_NORM 2733 -#define QU_SC32_EXITLIFT 2828 -#define MV_MOM_STANDUP 2891 -#define MV_MAN3_GIVEBLACK_2 2915 -#define MV_EGTR_1_2 343 -#define QU_CST_TRY 2875 -#define MV_BDP_SHOW 2953 -#define MV_CST_DENY_WHANDLE 2979 -#define QU_SWR_SITDOWN 3018 -#define SND_5_008 3149 -#define SND_5_019 3160 -#define SND_CMN_020 3167 -#define MV_DOMINO_18_default 3175 -#define ST_DOMINO_18_default 3176 -#define PIC_SC15_DFLOOR 3254 -#define ST_MAN_SHOES1_1 3458 -#define rMV_MAN_SNEEZE 3460 -#define QU_MAN_DEF_CLEAN 3462 -#define QU_MAN_DEF_SNEEZE_R 3465 -#define PIC_CMN_EVAL 3468 -#define MV_MAN25_ROWHAND 3482 -#define SND_8_005 3615 -#define SND_8_016 3626 -#define SND_9_004 3643 -#define SND_9_015 3659 -#define SND_11_001 3680 -#define SND_11_012 3696 -#define SND_11_023 3707 -#define SND_13_010 3755 -#define SND_20_003 3931 -#define SND_20_014 3947 -#define SND_22_001 3979 -#define SND_22_012 3995 -#define SND_23_011 4029 -#define SND_CMN_042 4035 -#define SND_24_010 4045 -#define QU_DRP24_TOWATER2 4046 -#define PIC_SC28_DARK3 4268 -#define MSG_SC28_TURNOFF_2 4277 -#define MV_CTS34_FALLEFT 4314 -#define SND_30_004 4362 -#define SND_32_002 4393 -#define SND_32_013 4409 -#define SND_32_024 4420 -#define SND_32_035 4431 -#define SND_33_001 4433 -#define SND_35_010 4508 -#define SND_35_021 4519 -#define MV_MAN34_TAKEBOX_FLOOR 4568 -#define ST_GRT38_NORM 4575 -#define PIC_MNU_SAVE_L 4630 -#define PIC_MSV_4_D 4654 -#define QU_SC28_LIFT5_START 4674 -#define PIC_SC30_EGG 4711 -#define ST_EYE_NORM 4715 -#define ST_LEG31_EMPTY 4726 -#define SND_CMN_053 4748 -#define MSG_HMRKICK_STUCCO 4765 -#define PIC_MNU_MUSICSLIDER_L 4915 -#define MV_FLY_FLY 4917 -#define QU_BRD28_GOR 4959 -#define PIC_SC12_WALL 4943 -#define ANI_FN2_HAND2 5031 -#define ST_FNHND2_NORM1 5033 -#define PIC_FN2_LEG 5035 -#define ST_FN4MAN_LAUGH 5100 -#define ANI_IN1GLASSES 5119 -#define SC_19 1143 -#define PIC_TTL_CREDITS 5172 -#define PIC_SC4_PLANK 5183 -#define MSG_DISABLESAVES 5201 -#define MSG_SC5_BGRSOUNDOFF 5315 -#define PIC_MAP_A10 5272 -#define PIC_MAP_P01 5277 -#define PIC_MAP_P12 5288 -#define ANI_BUTTON_32 5347 -#define MV_BTN32_TURNON 5348 -#define PIC_MEX_BGR 5300 -#define PIC_MAP_S20 5241 -#define PIC_MAP_S23_1 5244 -#define SND_26_020 5342 -#define MV_MAN11_JUMPFROMSWING 5209 -#define SND_30_016 5165 -#define MSG_INTR_GETUPMAN 5135 -#define MV_FNHED_EYES 5043 -#define ST_FNHND3_NORM1 5038 -#define QU_FIN1_TAKECOIN 5023 -#define SND_CMN_065 4934 -#define PIC_INV_VENT_C 4857 -#define PIC_INV_HAMMER_C 4841 -#define PIC_INV_EGGCOIN_C 4836 -#define PIC_INV_EGGBLACK_H 4798 -#define PIC_INV_BOOT_H 4788 -#define PIC_INV_COIN 861 -#define PIC_INV_BROOM 1783 -#define PIC_INV_BOX 866 -#define MV_MAN_LOOKUP 4773 -#define SND_13_033 4685 -#define ANI_CARPET_35 4592 -#define SND_35_022 4587 -#define SND_36_010 4534 -#define SND_34_023 4483 -#define SND_34_012 4472 -#define SND_34_001 4456 -#define SND_33_013 4450 -#define SND_31_004 4382 -#define SND_CMN_043 4319 -#define PIC_SC34_DTRUBA2 4311 -#define MV_TTA_STARTD 4287 -#define QU_SC28_LIFT6_START 4243 -#define ST_BAL14_GMA 4210 -#define SND_38_030 4197 -#define SND_27_041 4142 -#define SND_27_030 4131 -#define SND_25_021 4074 -#define SND_25_010 4063 -#define SND_23_001 4014 -#define SND_21_025 3972 -#define SND_21_014 3968 -#define SND_21_003 3952 -#define QU_SC19_SND1 3914 -#define SND_13_022 3767 -#define SND_12_012 3732 -#define SND_12_001 3716 -#define SND_10_003 3664 -#define SND_7_018 3598 -#define SND_7_007 3587 -#define SND_6_019 3558 -#define SND_6_008 3545 -#define SND_CMN_032 3517 -#define MSG_SC28_ENDCABIN 3456 -#define MV_WMN28_IN_3 3446 -#define MSG_SC25_STOPBEARDEDS 3424 -#define QU_SC17_FILLMUG_DROP 3415 -#define ST_BTH_2 3363 -#define MV_BTH_5_4 3358 -#define MSG_SC14_GMATOTRUBA 3249 -#define QU_SC4_SND5 3239 -#define QU_SC3_SND4 3233 -#define QU_SC2_SND2 3226 -#define QU_SC1_SND1 3220 -#define ST_GMA_SIT2 3212 -#define rMV_STR_THROWGLASSES 3202 -#define QU_SC38_SHOWBOTTLE_FULL 3173 -#define SND_CMN_010 3080 -#define QU_STR_TURNR 1186 -#define ST_HDL_LAID 3039 -#define MV_VSN_CYCLE2 2987 -#define MV_MAN8_STANDUP 2970 -#define QU_MOM_LOOKEMPTY 2948 -#define ST_LBN_5P 2766 -#define ST_LBN_3N 2759 -#define MV_LBN_3 2758 -#define ANI_GRIT_14 2724 -#define MV_NBL_DEFORM 1075 -#define MV_BDP_DROP 2686 -#define ANI_NEWBALL 1073 -#define ANI_KADKA 2670 -#define QU_SC32_FLOWG 2668 -#define MV_MAN34_TAKEBOX 2502 -#define ST_CTS34_GROWNEMPTY2 2475 -#define ST_LEG_UP1 2329 -#define PIC_SCD_32 2312 -#define ST_STR1_RIGHT 2143 -#define MV_SHR_NORM 2131 -#define ST_MAN29_RUN 2086 -#define QU_DRV_DRIVE 2030 -#define MV_MAN27_TAKEVENT 1993 -#define QU_SC26_OPEN5 1943 -#define ANI_VENT 1927 -#define QU_SC25_PUTBOARD 1896 -#define ST_LUK26_CLOSED 1870 -#define MV_WTR24_0_1 1842 -#define QU_SC22_FROMSTOOL 1800 -#define MSG_SC22_FROMSTOOL 1799 -#define PIC_SC21_WALL 1788 -#define MV_MAN23_PUSH3 1726 -#define PIC_SCD_21 1623 -#define PIC_SC19_LADDER 1538 -#define MV_CDI_HIDE 1533 -#define ST_MAN18_JUMP 1512 -#define MSG_SC18_SHOWMANJUMP 1510 -#define ST_GRL18_FLYTO 1490 -#define MV_JTI_FLOWBY 1393 -#define QU_SC16_BOYOUT 1364 -#define MSG_SC13_CHEW 1220 -#define PIC_SC8_RTRUBA_ITN 1014 -#define PIC_SCD_10 981 -#define ST_PLV_SIT 921 -#define MV_PBAR_RUN 897 -#define MV_BTT_MORG 743 -#define ANI_BATUTA 737 -#define PIC_SC3_UTRUBA 700 -#define PIC_SC4_MONETOPR 689 -#define MV_MAN_TAKEBALL 673 -#define QU_MOM_JUMPFW 670 -#define QU_SC6_ENTER 669 -#define MV_MANHDL_HANDLEUP 631 -#define MV_MAN_LOOKLADDERRV 556 -#define ANI_SPRING 542 -#define PIC_SC3_BOX 536 -#define QU_EGTR_SLIMOBLRV 528 -#define QU_DYAS_DEFAULT1 319 -#define MV_MAN_TURN_LD 490 -#define MV_MAN_TURN_LU 486 -#define ST_MAN_UP 449 -#define MV_EGBR_BRK_APPLE 385 -#define MV_DYAS_MORGOPEN 316 -#define MV_DYAS_MORGTOUS 315 -#define ST_DYAS_LIES 318 +/* 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. + * + */ + +#ifndef FULLPIPE_GAMEOBJ_H +#define FULLPIPE_GAMEOBJ_H + +namespace Fullpipe { + +#define ANI_IN1MAN 5110 +#define ANI_INV_MAP 5321 #define ANI_MAN 322 -#define MV_EGTR_SORROW2SLIM 341 -#define MV_OTM_BOX_TURNL 436 -#define MSG_SHOOTKOZAW 557 -#define ST_KZW_SIT 560 -#define QU_KZW_JUMPBOTTLE2 583 -#define PIC_SC4_MASK 585 -#define MSG_CLICKBUTTON 609 -#define MV_OTM_BOXHANDLEUP 627 -#define QU_BTT_LOOKMAN 760 -#define MV_CST_LOOKHOLE 713 -#define MV_MAN7_HANDLE2BOX 802 -#define MV_INV_OLDAPPLE_default 393 -#define ST_SLN_POT_HOBOTUP 843 -#define QU_SLN_POT_MORG2 850 -#define MV_NDV_LOOK 949 -#define QU_GLT_OPEN 961 -#define QU_SC5_MANBUMP 1167 -#define QU_SC13_ENTER_LEFT 1191 -#define ST_HDLL_DOWN 1212 -#define QU_TEST 1056 -#define QU_SC14_ENTER_LIFTUP 1066 -#define MV_MAN14_DECLINE 1239 -#define MV_HDLL_1_2 1309 -#define MV_GRL_PULL 1338 -#define MSG_SC16_FILLMUG 1363 -#define MSG_SC17_TESTTRUBA 1458 -#define PIC_SC19_RTRUBA2 1514 -#define MV_MAN17_GIVECOIN 1557 -#define MV_INV_EGGCOIN_default 1568 -#define MV_GFA_STOP 1601 -#define MV_GFA_STOPSOCK 1602 -#define QU_GFA_GREETSOCK 1607 -#define QU_GFA_BREATHE 1610 -#define PIC_SC22_LADDERD 1632 -#define MSG_SC23_CLICKBTN4 1739 -#define ANI_CHHI 1957 -#define MV_MAN25_ONBOARD 1885 -#define MV_HDL23_DEF 1979 -#define QU_GRFM_PODMYSHA 1987 -#define MV_ASS_SHOW 2123 -#define QU_ASS_SIT 2134 -#define MV_MAN29_TOPORTER 2085 -#define ST_GLV_HAMMER 2156 -#define MV_GLV_LOOKHMR 2168 -#define ANI_MUG38 2191 -#define MV_MUG38_NORM 2192 -#define QU_DLD_TAKE1 2214 -#define MV_FFT_TUBE_START 2230 -#define MV_GLV_PROPOSE 2278 -#define MV_DMN38_NORM5 2282 -#define MV_LEG_2_3 2345 -#define PIC_INV_POTTIE 2393 -#define MSG_SC34_CLIMB 2490 -#define MV_MAN34_BOARD_FLY 2505 -#define ST_BRD34_GRANDMA 2511 -#define MV_PDV_1_2 2521 -#define QU_LUK34_CLOSE 2547 -#define PIC_SC37_RTRUBA 2562 -#define MSG_SC35_SHRINK 2570 -#define MV_GRD3_LOOKR 2582 -#define MV_GRD37_LOOKR 2594 -#define PIC_SC37_WALL3 2602 -#define ANI_MUG_33 2623 -#define ST_INV_MUGFULL_default 2635 -#define ST_TST31_NORM 2654 -#define ANI_GRIT_6 677 -#define MV_MAN13_TAKEFIRECAN 2711 -#define MV_MUG17_NORM 2738 -#define QU_SC35_ENTER_LIFTUP 2817 -#define QU_SC34_ENTER_LIFTUP 2821 -#define QU_SC32_ENTER_LIFTDOWN 2830 -#define rMV_MAN_TOTRUBAHOR2 2840 -#define MV_MAN3_GIVEBLACK_3 2916 -#define MV_PL3_FLOW 2925 -#define QU_SC4_ENTER_DOWN 2937 -#define ST_BTN6_OFF 2993 -#define ST_GUM_NORM 977 -#define SND_5_009 3150 -#define SND_CMN_021 3168 -#define PIC_SC13_LWALL 3169 -#define MV_MAN13_TAKEHAMMER 3207 -#define ANI_ROPE_15 3255 -#define PIC_SC17_PIPE2 3293 -#define MV_MAN17_TAKEBOTTLEEMPTY 3308 -#define ANI_DOMINOS 3317 -#define MV_MAN_STARTSHOES_2 3385 -#define QU_MAN_DEF_SITDOWN_R 3390 -#define QU_MAN_DEF_SHOES2 3395 -#define MV_MAN_LOOKLADDER_R 3418 -#define ST_MAN_SHOES2_1 3459 -#define SND_8_006 3616 -#define SND_8_017 3627 -#define SND_9_005 3644 -#define SND_9_016 3660 -#define SND_11_002 3681 -#define SND_11_013 3697 -#define SND_11_024 3708 -#define SND_13_011 3756 -#define SND_14_010 3792 -#define SND_16_030 3850 -#define SND_20_004 3932 -#define SND_22_002 3980 -#define SND_22_013 3996 -#define SND_23_012 3948 -#define SND_24_011 4047 -#define MV_MAN17_TAKEBOOT 4224 -#define ST_MAN_SIT_NOBOOT 4229 -#define PIC_SC28_DARK4 4269 -#define MSG_SC28_TURNOFF_3 4275 -#define SND_30_005 4363 -#define SND_32_003 4394 -#define SND_32_014 4410 -#define SND_32_025 4421 -#define SND_32_036 4432 -#define SND_33_002 4434 -#define SND_35_011 4509 -#define SND_34_034 4614 -#define PIC_MNU_AUTHORS_L 4624 -#define PIC_MSV_5_D 4655 -#define MV_EYE30_HIDE 4718 -#define ANI_LEG_31 4723 -#define MV_BRD_STARTR 4733 -#define SND_CMN_054 4762 -#define SND_20_015 4888 +#define MV_MAN_TURN_LU 486 +#define PIC_CMN_EVAL 3468 +#define PIC_CSR_ARCADE1 4901 +#define PIC_CSR_ARCADE2 4902 +#define PIC_CSR_ARCADE2_D 4903 +#define PIC_CSR_ARCADE3 4904 +#define PIC_CSR_ARCADE4 4905 +#define PIC_CSR_ARCADE5 4906 +#define PIC_CSR_ARCADE6 4907 +#define PIC_CSR_ARCADE6_D 4908 +#define PIC_CSR_ARCADE7 4909 +#define PIC_CSR_ARCADE7_D 4910 +#define PIC_CSR_ARCADE8 4911 +#define PIC_CSR_DEFAULT 4891 +#define PIC_CSR_DEFAULT_INV 4892 +#define PIC_CSR_GOD 4900 #define PIC_CSR_GOFAR_L 4895 -#define PIC_SCD_FIN 5026 -#define MV_FNHND2_MOVE 5032 -#define ST_FNHND2_NORM2 5034 -#define MV_FNHND6_MOVE2 5068 -#define ST_IN1MAN_LOOK 5118 -#define ST_IN1MAN_GONE 5125 -#define ST_IN2BOOT_EMPTY 5143 -#define MSG_SC32_TRUBATOBACK 5181 -#define PIC_MNU_SLIDER_D 4913 -#define MSG_SC33_TESTMUG 5185 -#define MSG_MANSHADOWSOFF 5196 -#define SND_22_035 5211 -#define PIC_SC5_RTRUBA2 665 -#define PIC_MAP_A11 5273 -#define PIC_MAP_P02 5278 -#define PIC_MAP_P13 5289 -#define PIC_INV_MAP 5324 -#define MSG_SC28_LIFT6MUSIC 5355 -#define MSG_FN4_STARTMUSIC 5356 -#define PIC_MSV_BGR 4634 -#define PIC_MAP_S10 5232 -#define PIC_MAP_S21 5242 -#define PIC_MAP_S23_2 5245 -#define PIC_SC3_LADDER 1102 -#define PIC_SC19_REACTOR 1498 -#define SND_INTR_010 5155 -#define QU_INTR_STARTINTRO 5133 -#define ST_IN1CLK_CLOSED 5128 -#define MSG_SC31_TESTCACTUS 5095 -#define QU_FN3_SHOWKICKING 5074 -#define QU_FN2_DOFINAL 5066 -#define ANI_FN3_HAND3 5036 -#define ST_MANFIN1_RIGHT 5021 -#define MSG_SC16_LAUGHSOUND 4993 -#define rMV_BBL_GOR 4926 -#define MV_BBL_GOR 4924 -#define PIC_INV_SCISSORS_C 4850 -#define PIC_INV_EGGBOOT_C 4835 -#define PIC_INV_POT_H 4813 -#define PIC_INV_BOOT 863 -#define MV_DRP25_TOWATER 3503 -#define SND_13_034 4686 -#define MV_PDV_LEGS 4589 -#define SND_35_023 4588 -#define SND_36_011 4535 -#define SND_34_024 4484 -#define SND_34_013 4473 -#define SND_34_002 4457 -#define SND_33_014 4451 -#define SND_31_005 4383 -#define SND_CMN_044 4320 -#define MV_MAN34_TRYTABUR 2489 -#define QU_KDK_DRIZZLE 4301 -#define ST_MAN28_SIT 4253 -#define SND_38_031 4198 -#define SND_38_020 4187 -#define SND_27_031 4132 -#define SND_27_020 4121 -#define SND_25_022 4075 -#define SND_25_011 4064 -#define SND_23_002 4015 -#define SND_21_026 3974 -#define SND_21_015 3969 -#define SND_21_004 3953 -#define QU_SC19_SND2 3915 -#define QU_SC18_SND1 3901 -#define SND_15_010 3812 -#define SND_13_023 3768 -#define SND_12_013 3733 -#define SND_12_002 3717 -#define SND_10_004 3665 -#define SND_7_019 3599 -#define SND_7_008 3588 -#define SND_CMN_033 3554 -#define SND_6_009 3546 -#define PIC_CMN_EXIT 3467 -#define MV_WMN28_IN_4 3447 -#define ANI_WOMAN_28 3439 -#define QU_SC25_BEARDED2 3426 -#define MV_MAN_SMILE 3416 -#define SND_CMN_022 3404 -#define QU_SC27_SHOWBET 3368 -#define ST_BTH_3 3361 -#define ST_VNT27_LIES 3355 -#define MV_MAN16_TRYBOTTLE 3305 -#define QU_SC19_ENTER_DOWNRIGHT 3300 -#define MV_KZW14_TOEDGE 3265 -#define QU_SC3_SND5 3234 -#define QU_SC2_SND3 3227 -#define QU_SC1_SND2 3221 -#define ST_BAL14_NORM2 3215 -#define MV_BAL14_TOGMA 3214 -#define SND_CMN_011 3081 -#define QU_SC13_CLOSEFAIL 3063 -#define rMV_STR_HIDE 3055 -#define QU_STR_RTOL 3053 -#define ANI_MAID_11 3024 -#define MSG_SC11_PUTBOOT 1117 -#define MSG_SC4_DROPBOTTLE 2896 -#define QU_SC15_ENTER_LIFTUP 2813 -#define QU_SC10_EXITLIFT 2809 -#define ST_LBN_4P 2763 -#define MV_LBN_4 2761 -#define ST_LBN_2N 2756 -#define PIC_SCD_33 2636 -#define MV_BRD34_1_2 2573 -#define MV_MAN34_BOARD_FLY2 2572 -#define QU_SC34_FROMBOX 2494 -#define MV_CTS34_0_1 2387 -#define ANI_CACTUS_34 2381 -#define ST_LEG_EMPTY 2338 -#define ST_LEG_UP2 2333 -#define PIC_SC32_UTRUBA 2293 -#define MV_MAN38_TAKEHAMMER 2289 -#define MV_DMN38_NORM6 2284 -#define MV_MAN29_PUSHASS 2145 -#define ST_STR2_RIGHT 2144 -#define QU_SC29_ENTER_LEFT 2078 -#define QU_MID_SWITCHBACK 2044 -#define QU_DRV_FROMLEFT2 2038 -#define ST_INV_VENT_default 1970 -#define MV_MAN25_BACKTOLADDER 1954 -#define QU_SC25_ENTERUP_WATER 1895 -#define MV_MAN25_PUTBOARD 1878 -#define ST_LUK26_NOHANDLE 1869 -#define QU_SC25_ENTER_UP 1860 -#define MV_HDL22_FALL 1760 -#define MV_MAN23_PUSH4 1727 -#define QU_GRFU_CHMOKLEFT 1667 -#define MV_GRFB_TAILUP 1640 -#define MV_GRFB_TRYSTAND 1634 -#define ANI_GIRAFFE_BOTTOM 1633 -#define PIC_SCD_22 1624 -#define QU_GRD_LOOKLEFT 1001 -#define ST_GRD_SIT2 1525 -#define ST_INV_SUGAR_default 1412 -#define MV_INV_SUGAR_default 1411 -#define ANI_SAMOGONSHCHIK 1397 -#define QU_SC16_GIRLOUT 1365 -#define MSG_SC16_HIDEMUG 1351 -#define MSG_SC16_SHOWWIRE 1350 -#define ST_BOY_STAND 1331 -#define QU_GMS_DRYG_BOOTLESS 1276 -#define ST_BAL14_MAIN 1248 -#define ST_HDLR_UP 1198 -#define ST_SWR_SITBALD 1153 -#define ANI_SC2_BOX 1020 -#define MV_MAN12_POT2BOOT 983 -#define ST_GLT_OPEN 928 -#define MV_GLT_BREATHE 925 -#define QU_SLN_POT_TURN 851 -#define MSG_SC7_CLOSELUKE 822 -#define ST_BTT_NOSPOON 739 -#define ST_CST_HEADUP 717 -#define TrubaUp 680 -#define PIC_SC6_UTRUBA 668 -#define MV_CLK_HAND 592 -#define ST_MAN_LOOKPLANK 555 -#define QU_DYAS_DEFAULT2 471 -#define ST_MAN_GOD 480 -#define ST_MAN_GOU 459 -#define MV_OTM_GLS_TURNR 422 -#define MV_EGBR_BRK_COIN 389 -#define MV_EGTR_SORROW2FAT 356 -#define MV_OTM_BOX_MORGRIGHT 439 -#define MV_KZW_TOPLANK 497 -#define QU_KZW_WALKBOTTLE 578 -#define PIC_SC4_ULTRUBA 615 -#define ST_HDL_DOWN 625 -#define MV_MANOTM_BOX2GLASSES 628 -#define QU_OTM_VNT_TRIESOFF 648 -#define MV_BRD_DROPBALLROT 695 -#define MV_LUK_0_1 804 -#define ST_LUK_CLOSED 805 -#define MV_CST_CLOSELUKE 807 -#define MV_INV_BOOT_default 882 -#define PIC_SC2_DFLOOR 891 -#define QU_GRD_MORG 1004 -#define MV_MAN6_SPINHANDLE 1008 -#define ANI_SC4_COIN 690 -#define MV_MAN_TAKECOIN 1031 -#define MV_SLN_0_1 834 -#define LiftUp 1057 -#define PIC_SCD_11 1098 -#define MV_MAN11_SWING_0 1109 -#define ST_MAN_SIT 1164 -#define MV_STR_CHEW 1177 -#define PIC_SC15_LTRUBA 1261 -#define PIC_SC16_RTRUBA 1293 -#define MV_HDL_1_2 1308 -#define MV_INV_MUG_default 1371 -#define QU_SMG_STOPFINGERS 1408 -#define QU_SC17_FILLBOTTLE 1437 -#define QU_HND_TAKEBOTTLE 1443 -#define ST_HND17_EMPTY 1448 -#define QU_SC18_ENTER_WHIRLIGIG 1469 -#define PIC_SC19_RTRUBA3 1515 -#define QU_CDI_DRYG 1536 -#define MSG_SC3_TESTFAT 1582 -#define QU_GFA_GREET 1606 -#define QU_SC22_ENTER_LEFT 1618 -#define QU_SC23_ENTER_DOWN 1630 -#define ST_CND_0 1704 -#define MV_CND_3_4 1710 -#define MV_INV_BROOM_default 1775 -#define ST_INV_BROOM_default 1776 -#define QU_SC22_FALLBROOM 1786 -#define PIC_SC24_PIPE 1828 -#define MV_MAN_FROMTRUBAVER2_R 1849 -#define ANI_BOARD25 1898 -#define QU_SC25_TRUBATOBOARD 1909 -#define PIC_INV_LOPAT 1924 -#define ST_CHI_EMPTY 1959 -#define MV_MAN27_BROOMTOSWAB 1992 -#define ST_BTA_HILITE 2052 -#define QU_SC29_MANTO_R 2100 -#define MV_SHR_HITASS 2152 -#define ANI_DYLDA 2169 -#define ST_MLS_LEFT 2179 -#define MV_MLS_TURNLR 2181 -#define MV_MAN38_TAKEBOTTLE 2184 -#define QU_SC38_SHOWMUG 2198 -#define QU_GLV_TOSMALL_NOHMR 2209 -#define QU_GLV_DRINK 2210 -#define QU_DLD_TAKE2 2215 -#define QU_MLS_TURNL 2220 -#define ST_FFT_TUBE 2231 -#define ST_FFT_TUBEOPEN 2236 -#define MV_CTS_GROW 2268 -#define QU_FFT_PIPE_CYCLE 2297 -#define QU_FFT_TUBE_FLOW 2304 -#define PIC_SC35_FLOOR 2407 -#define ST_HZE_NORM 2426 -#define MV_CTS34_EYES 2478 -#define MV_BRD34_RIGHT 2507 -#define MSG_SC35_PLUGHOSE 2524 -#define ST_LUK34_CLOSED 2543 -#define MV_PDV_SML_BLINK 2551 -#define PIC_SC35_DTRUBA_L 2558 -#define QU_GRD3_LOOKR 2587 -#define PIC_SC31_WALL 2603 -#define ANI_TESTO_BLUE 2659 -#define MV_MAN6_TAKEBALL 2691 -#define ST_GRT6_GRIT 2693 -#define MV_JET17_FLOW 2747 -#define MSG_SC4_MANFROMBOTTLE 2854 -#define QU_EGTR_MD1_BOLTLEGS 2877 -#define MV_MAN_PLANKTOLADDER 553 -#define MV_MAN3_GIVEBLACK_4 2917 -#define MV_EGTR_2_3 351 -#define ST_STP8_3 2980 -#define ST_BALL9_NORM 2973 -#define ST_PCH2_NORM 3021 -#define MV_SLN_POT_DENY 3040 -#define MV_MAN38_TRYTAKEBOTTLE 3178 -#define MV_HDLL_1_3 3204 -#define rMV_MAN_STARTSHOES_1 3382 -#define rMV_MAN_STOPSHOES_1 3384 -#define MV_MAN17_GIVEBOOT 3432 -#define ST_GRFU_KISSOPEN 3475 -#define MV_GRFU_CLOSEEYES 3476 -#define ST_DRP26_NORM2 3483 -#define SND_8_007 3617 -#define SND_8_018 3628 -#define SND_9_006 3650 -#define SND_9_017 3661 -#define SND_11_003 3682 -#define SND_11_014 3698 -#define SND_11_025 3709 -#define SND_13_012 3757 -#define SND_14_011 3793 -#define SND_16_020 3840 -#define SND_16_031 3851 -#define SND_17_030 3894 -#define SND_20_005 3933 -#define SND_22_003 3981 -#define SND_22_014 3997 -#define SND_22_025 4008 -#define SND_23_013 3949 -#define SND_24_001 4003 -#define SND_24_012 4048 -#define SND_26_010 4091 -#define MV_BOT17_FILL 4221 -#define ST_BOT17_NORM 4222 -#define ST_MAN25_ROW2 4235 -#define ST_MAN_TEMPPP 4236 -#define PIC_SC28_DARK5 4270 -#define MSG_SC28_TURNOFF_4 4282 -#define QU_SC29_SND1 4335 -#define SND_30_006 4369 -#define MV_MAN30_ITCHSWAB 4373 -#define SND_32_004 4395 -#define SND_32_015 4411 -#define SND_32_026 4422 -#define SND_33_003 4435 -#define SND_35_001 4494 -#define SND_35_012 4510 -#define ANI_CARPET_36 4600 -#define SND_34_035 4615 -#define PIC_MLD_OK_L 4647 -#define PIC_MSV_6_D 4656 -#define SND_32_037 3560 -#define QU_EYE30_HIDE 4722 -#define SND_CMN_055 4763 -#define SND_CMN_066 4966 -#define PIC_FN2_BODY 5027 -#define ST_FNHND6_BEFORE2 5069 -#define MSG_ENABLESAVES 5202 -#define PIC_SC23_BOXOPEN 1723 -#define SND_22_036 5304 -#define PIC_MAP_A01 5263 -#define PIC_MAP_A12 5274 -#define PIC_MAP_P03 5279 -#define PIC_MAP_P14 5290 -#define MV_MAN35_CUTPIPE 2514 -#define PIC_MAP_S11 5233 -#define PIC_MAP_S22 5243 -#define PIC_MAP_S33 5257 -#define MV_MOM_TAKE1 2885 -#define ST_MAP_NORM 5323 -#define ANI_INV_MAP 5321 -#define PIC_MEX_OK 5301 -#define PIC_SC6_LADDER 1104 -#define MV_MOM_CYCLEBK 3012 -#define QU_SC16_MANDRINK 5200 -#define ST_PBAR_START2 5178 -#define MV_MAN30_ITCHSPADE 5164 -#define SND_INTR_011 5156 -#define ANI_IN1CLOCK 5126 -#define ANI_IN1HAND 5113 -#define ST_FNHND6_BEFORE3 5057 -#define ANI_FN3_HAND4 5048 -#define ANI_FIN1_MAN 5019 -#define ANI_FIN_COIN 5014 -#define SND_29_030 4879 -#define SND_13_035 4871 -#define SND_21_027 4867 -#define PIC_INV_EGGDOM_C 4837 -#define PIC_INV_APPLE_C 4823 -#define PIC_INV_STOOL_H 4817 -#define PIC_INV_EGGGLS_H 4801 -#define PIC_INV_EGGAPL_H 4797 -#define PIC_INV_EGG_H 4796 -#define rMV_MAN_LOOKUP 4775 -#define SND_CMN_056 4772 -#define MV_MAN_LOOKSTUCCO 4771 -#define SND_15_011 4754 -#define MV_BRD_FALL 4731 -#define SND_36_012 4606 -#define QU_PDV_LRG_LEGS 4591 -#define SND_35_024 4590 -#define QU_SC34_FROMBOX_FLOOR 4572 -#define SND_36_001 4520 -#define SND_34_025 4485 -#define SND_34_014 4474 -#define SND_34_003 4458 -#define MV_MAN33_TAKEMUGEMPTY 4452 -#define SND_28_020 4329 -#define SND_CMN_045 4321 -#define MV_LEG_POT0_DENY 4283 -#define QU_SC28_LIFT1_WORK 4256 -#define MSG_SC21_UPDATEASS 4211 -#define SND_9_018 4200 -#define SND_38_032 4199 -#define SND_38_021 4188 -#define SND_38_010 4175 -#define SND_27_032 4133 -#define SND_27_021 4122 -#define SND_27_010 4111 -#define SND_25_023 4076 -#define SND_25_012 4065 -#define SND_25_001 4049 -#define SND_23_003 4016 -#define SND_21_016 3970 -#define SND_21_005 3954 -#define QU_SC19_SND3 3916 -#define QU_SC18_SND2 3902 -#define PIC_SC38_ROPE 3859 -#define SND_13_024 3769 -#define SND_13_013 3758 -#define SND_12_014 3734 -#define SND_12_003 3718 -#define SND_10_005 3666 -#define SND_7_009 3589 -#define SND_CMN_034 3555 -#define QU_SC25_TRYROWHAND 3493 -#define MV_WMN28_IN_5 3448 -#define QU_SC25_BEARDED3 3427 -#define SND_CMN_023 3405 -#define MV_MAN_SHOES1 3375 -#define MSG_SC27_SHOWNEXTBET 3369 -#define ST_BTH_4 3359 -#define MV_KZW14_TOUS 3267 -#define QU_SC2_SND4 3228 -#define QU_SC1_SND3 3222 -#define ST_BAL14_NORM3 3216 -#define QU_GLV_TAKEDOMINO_NOHMR 3182 -#define SND_CMN_012 3082 -#define SND_CMN_001 2927 -#define MV_MAN8_JUMPOFF 2969 -#define ANI_PLUSMINUS 2938 -#define PIC_SC1_OSK2 2932 -#define MV_KZW_JUMPHIT 2857 -#define MV_MAN4_FROMBOTTLE 2849 -#define MV_LBN_5 2764 -#define ST_LBN_3P 2760 -#define ST_LBN_1N 2753 -#define MV_MAN2_TRYBOX 2736 -#define ST_GRT14_NORM 2726 -#define ST_MAN6_BALL 2688 -#define QU_SC35_SHOWSTOPPER 2520 -#define QU_SC32_SHOWHANDLE 2399 -#define MV_FLG_STARTL 2258 -#define MV_FLG_CYCLER 2266 -#define MV_LEG_POT2_SHOW 2332 -#define MSG_SC38_PROPOSE 2287 -#define ST_SHG_NORM 2118 -#define ST_MAN29_SIT 2089 -#define ST_DRV_LEFTNOVENT 2000 -#define QU_SC25_TRYSWAB 1913 -#define ANI_INV_BOARD 1872 -#define ANI_LUK26 1867 -#define LadderDown 1851 -#define PIC_SC22_DTRUBA2 1810 -#define MV_MAN22_STANDTABUR 1750 -#define ANI_INV_SOCK 1698 -#define QU_GRFG_SHOW 1683 -#define PIC_SCD_23 1625 -#define ST_CDI_SUGAR 1532 -#define MV_MAN19_TAKESUGAR 1528 -#define MV_MAN18_JUMPTOTRUBA 1511 -#define MV_BOY18_JUMPTO 1481 -#define ST_SMG_HANDSUP 1403 -#define QU_MOM_START 1389 -#define MV_WHR13_SPIN 1384 -#define MSG_SC14_SHOWBALLMAN 1254 -#define ANI_INV_GUM2 1204 -#define ST_GLT_EMPTY 1070 -#define MV_MAN_LIFTFROMU 1061 -#define MV_MAN_LIFTFROMD 1060 -#define ANI_HDL6 1009 -#define MV_MAN_FROMVTRUBA 966 -#define ST_BALL9_default 935 -#define ST_SLN_POT 835 -#define QU_SC8_FINISH 788 -#define PIC_SC8_LADDER_D 755 -#define MV_CST_SPINHANDLE 714 -#define ANI_INV_BOX 890 -#define PIC_SC4_DOWNTRUBA 619 -#define MV_BTN_CLICK 599 -#define ST_CLK_OPEN 591 -#define MV_CLK_GO 589 -#define MSG_SHAKEBOTTLE 584 -#define ST_SPR_DOWN 545 -#define MV_PNK_WEIGHTLEFT 541 -#define QU_KOZAW_WALK 505 -#define QU_DYAS_DEFAULT3 514 -#define QU_SC1_EGBRHEADDOWN 513 -#define rMV_EGBR_SIGH 464 -#define MV_EGBR_BRK_BOOT 384 -#define MV_EGTR_TAKEMONEY 352 -#define MV_EGTR_FATBOLTLEGS 374 -#define MV_MANDYAS_GIVESGLAS 363 -#define MV_MANEGBR_EGG2APPLE 444 -#define MV_MAN_TURN_RL 332 -#define QU_KZW_GOOUT 567 -#define QU_OTM_GLS_TURNL 641 -#define QU_OTM_BOX_MORGR 643 -#define MV_MAN_TAKESBALL 674 -#define QU_SC1_ENTER_RIGHT 702 -#define QU_CST_TURNDOWN 724 -#define ANI_VMYATS 764 -#define MV_MAN8_DRYGDOWN 770 -#define MV_MAN8_STARTJUMP 779 -#define ST_HGN_LUKE 810 -#define PIC_SCD_12 857 -#define PIC_SC9_DTRUBA 902 -#define MV_VSN_TURNLEFT 953 -#define MV_GRD_MORG1 1000 -#define MV_MAN_TAKEBOOT 1034 -#define ANI_SC4_BOOT 1035 -#define MV_LFT_OPEN 1048 -#define MV_MAN_TURN_SDR 1085 -#define MV_MAN_TURN_SUR 1088 -#define MV_MAN11_SWING_1 1111 -#define MSG_SC13_UPDATEBRIDGE 1217 -#define QU_SC14_ENTER_LIFTDOWN 1068 -#define MSG_SC14_MANKICKBALL 1257 -#define MV_GMS_DRYGNOBOOT 1268 -#define PIC_SC18_LTRUBA 1320 -#define QU_SC16_GOBOY 1347 -#define QU_SC16_GOGIRL 1348 -#define QU_SC16_BOYDRINK 1353 -#define QU_SC16_BOYKICK 1367 -#define ST_GRL_LAUGH 1342 -#define MV_BDG_CLOSE 1382 -#define MV_MAN17_TAKEBOTTLE 1427 -#define QU_HND17_TOCYCLE 1454 -#define QU_CDI_SHOW 1535 -#define PIC_INV_EGGDOM 1576 -#define MV_GFA_0_1 1605 -#define MV_GRFU_BLINKLEFT 1651 -#define MV_GRFU_STOP 1655 -#define ST_CND_1 1705 -#define QU_SC23_TOCALENDAR 1733 -#define QU_SC25_SHOWBOARD_L 1907 -#define MSG_SC26_UPDATEPOOL 1956 -#define MV_PTR_MOVEFAST 2102 -#define ST_STR1_EMPTY 2115 -#define QU_ASS_SIT_R 2136 -#define MV_SHG_HITASS 2151 -#define MV_GLV_PUTDOMIN 2157 -#define ST_GLV_NOHAMMER 2159 -#define MV_HMR38_NORM 2195 -#define MV_FFT_TUBE_FLOWOPEN 2237 -#define MV_FFT_STARTPIPE 2239 -#define MSG_SC38_POSTHMRKICK 2256 -#define QU_GLV_PROPOSE_NOHMR 2281 -#define ANI_INV_TUBE 2314 -#define MV_RHT_BLINK 2361 -#define PIC_SCD_34 2389 -#define MV_POTTIE_default 2391 -#define MV_HDL32_FALL 2395 -#define MSG_SC32_STARTCACTUS 2414 -#define ST_PDV_SMALL 2420 -#define QU_CTS34_EYES 2384 -#define MV_LUK34_CLOSE 2545 -#define ANI_DMN01 2615 -#define QU_SC33_SHOWMUG 2631 -#define QU_TST_FLOW 2655 -#define ANI_TESTO_ORANGE 2656 -#define MV_MAN17_TAKEMUG 2744 -#define MV_MAN_TOLADDER 448 -#define QU_SC6_DROPS2 2905 -#define MV_MAN3_GIVECOIN_2 2931 -#define MV_MAN4_LOOKINBOTTLE 2935 -#define rMV_MAN_HMRKICK_COINLESS 2965 -#define MV_STP8_FALL 2972 -#define PIC_SC9_UTRUBA 2985 -#define MV_VSN_FROMLEFT 1015 -#define QU_VSN_FROMR 3000 -#define QU_SC11_MANFALL 3017 -#define MSG_SC8_ENTERUP 3037 -#define ANI_DOMINO_18 3174 -#define MSG_SC38_TRYTAKEBOTTLE 3179 -#define QU_DRP7_DROP 3188 -#define MV_BTT_LOOK_SPOON 3194 -#define QU_RPE_NORM 3258 -#define MV_JET17_DROP 3291 -#define QU_JET17_FLOW 3294 -#define MSG_SC19_UPDATESUGAR 3315 -#define QU_SC22_TOSTOOL_R 3332 -#define rMV_MAN_STARTSHOES_2 3398 -#define rMV_MAN_STOPSHOES_2 3400 -#define rMV_MAN_CLEANNOSE 3461 -#define QU_GRFU_KISSOPEN 3480 -#define SND_8_008 3618 -#define SND_8_019 3629 -#define SND_9_007 3651 -#define SND_11_004 3683 -#define SND_11_015 3699 -#define SND_11_026 3710 -#define SND_13_002 3742 -#define SND_14_001 3778 -#define SND_14_012 3794 -#define SND_16_010 3830 -#define SND_16_021 3841 -#define SND_16_032 3852 -#define QU_SC17_SND1 3865 -#define SND_17_020 3884 -#define SND_17_031 3895 -#define SND_20_006 3939 -#define SND_22_004 3982 -#define SND_22_015 3998 -#define SND_22_026 4009 -#define SND_24_002 4004 -#define SND_26_011 4092 -#define QU_SC28_SND1 4148 -#define ANI_SHD_01 4202 -#define PIC_SC28_DARK6 4271 -#define PIC_SC32_LADDER 4296 -#define QU_SC29_SND2 4336 -#define SND_30_007 4370 -#define SND_31_006 4389 -#define SND_32_005 4396 -#define SND_32_016 4412 -#define SND_32_027 4423 -#define SND_33_004 4436 -#define SND_35_002 4495 -#define SND_35_013 4511 -#define MV_MAN34_PUTBOX_FLOOR 4567 -#define MV_MAN34_FROMBOX_FLOOR 4570 -#define ANI_GRIT_38 4573 -#define MV_MID_CLEANVENT 4582 -#define SND_34_036 4616 -#define PIC_MNU_DEBUG_L 4632 -#define PIC_MSV_7_D 4657 -#define MSG_HMRKICK_METAL 4764 -#define ST_FLY_FLY 4918 -#define QU_GLV28_GOL 4958 -#define SND_CMN_067 4967 -#define SND_32_038 4996 -#define SND_FINAL1_001 5007 -#define MV_FN4MAN_LAUGH 5101 -#define MV_IN1MAN_GETUP 5117 -#define PIC_MSV_DOT_D 5188 -#define SND_23_014 5193 -#define MSG_MANSHADOWSON 5197 -#define MV_MAN_LOOKUP_EYES 5206 -#define SND_22_037 5305 -#define PIC_MAP_A02 5264 -#define PIC_MAP_A13 5275 -#define PIC_MAP_P04 5280 -#define PIC_MAP_P15 5291 -#define PIC_MAP_S01 5223 -#define PIC_MAP_S12 5234 -#define PIC_MAP_S34 5258 -#define PIC_MAP_S02 5224 -#define QU_SC32_FALLHANDLE 5351 -#define MV_HDL_FALL 2396 -#define SND_17_032 5212 -#define SND_21_028 5192 -#define PIC_SC18_DOMIN 5184 -#define SND_INTR_012 5157 -#define SND_INTR_001 5146 -#define QU_INTR_CLOCK 5137 -#define PIC_IN1_LADDER 5102 -#define ST_FNHND6_BEFORE 5058 -#define ANI_FN2_HAND6 5056 -#define ANI_FN3_HAND5 5052 -#define ST_FNHND3_HMR 5041 -#define ST_MANFIN1_EMPTY 5022 -#define SND_29_031 4880 -#define SND_25_024 4872 -#define SND_CMN_057 4868 -#define PIC_INV_LOPAT_C 4844 -#define PIC_INV_BOX_C 4828 -#define PIC_INV_VANTUZ_H 4821 -#define PIC_INV_TUBE_H 4820 -#define PIC_INV_SOCK_H 4816 -#define PIC_INV_GUM2_H 4804 -#define QU_MAN_DEF_LOOKUP_R 4777 -#define PIC_SC27_HITZONE2 4756 -#define rMV_BRD_STARTR 4738 -#define SND_38_033 4729 -#define PIC_MSV_0_L 4644 -#define PIC_MSV_FULL_L 4642 -#define SND_36_013 4607 -#define MSG_SC34_CLIMBBOX 4571 -#define MSG_SC4_HIDEBOOT 4563 -#define SND_37_001 4536 -#define SND_36_002 4521 -#define SND_34_026 4486 -#define SND_34_015 4475 -#define SND_34_004 4459 -#define SND_29_020 4354 -#define SND_CMN_046 4322 -#define QU_SC28_LIFT1_END 4257 -#define SND_9_019 4201 -#define SND_38_022 4189 -#define SND_38_011 4176 -#define QU_SC38_SND1 4166 -#define SND_27_033 4134 -#define SND_27_022 4123 -#define SND_27_011 4112 -#define QU_SC27_SND1 4102 -#define SND_25_013 4066 -#define SND_25_002 4050 -#define SND_23_004 4017 -#define SND_21_017 3971 -#define SND_21_006 3960 -#define QU_SC19_SND4 3917 -#define QU_SC18_SND3 3903 -#define SND_15_001 3798 -#define SND_13_025 3770 -#define SND_13_014 3759 -#define SND_12_015 3735 -#define SND_12_004 3719 -#define SND_10_006 3672 -#define SND_2_020 3514 -#define SND_1_010 3511 -#define QU_DRP24_TOFLOOR 3510 -#define QU_SC28_WMN_START 3452 -#define SND_CMN_024 3406 -#define ST_TEST 3367 -#define ST_BTH_5 3357 -#define MV_SPK4_PLAY 3276 -#define QU_KZW14_TOUS 3273 -#define QU_SC2_SND5 3229 -#define QU_SC1_SND4 3223 -#define SND_CMN_013 3112 -#define SND_CMN_002 2928 -#define rMV_STR_NOSE 3052 -#define MSG_SC13_TESTOPEN 3048 -#define PIC_SC10_FLOOR 3001 -#define ST_LBN_0N 2832 -#define MV_LBN_6 2767 -#define ST_LBN_2P 2757 -#define MV_EGBR_DENY 2735 -#define ANI_GRIT_9 2719 -#define MV_TEST2 2684 -#define ST_BRD34_GRANDMA2 2574 -#define MV_MAN34_FROMBOX 2493 -#define MV_CTS34_HIDE 2476 -#define MV_CTS34_GROW 2382 -#define MV_LEG_POT1_SHOW 2328 -#define MV_MAN32_SITDOWN 2276 -#define QU_SC38_SHOWDMN_DLD1 2254 -#define PIC_SC38_UTRUBA 2171 -#define QU_SC29_MANFROM_R 2104 -#define MV_DRV_TOLEFT_V 2007 -#define MV_MAN26_TURNVENT_R 1932 -#define MV_MAN25_CHIH 1886 -#define QU_SC26_ENTER_LEFT 1866 -#define PIC_SC26_LTRUBA 1864 -#define MV_MAN22_TAKEBROOM 1753 -#define MV_INV_SOCK_default 1699 -#define PIC_SC21_HDLBASE 1635 -#define QU_GRFG_BLINKBALD 1684 -#define QU_GRFB_DANGLE 1643 -#define MV_GRFB_TAIL 1636 -#define rMV_MANEGBR_EGG2APPLE 465 -#define MV_GRD_LOOKRIGHT 1527 -#define MV_GRD_LOOKLEFT 1526 -#define MV_KSL_0_1 1466 -#define ST_WR16_DEFAULT 1346 -#define MSG_SC17_HIDESUGAR 1417 -#define QU_SMG_FINGERS 1407 -#define ST_SMG_SIT 1399 -#define MSG_SC13_STOPWHIRLGIG 1387 -#define MSG_SC16_SHOWMUG 1352 -#define MV_GRL_GOOUT 1340 -#define ANI_BOY 1327 -#define ANI_WHIRLGIG_19 1302 -#define MSG_SC14_SHOWBALLGMADIVE 1260 -#define MSG_SC14_GMAJUMP 1250 -#define PIC_SC14_DTRUBA 1222 -#define MV_MAN11_JUMPOVER 1131 -#define QU_SC10_ENTER_LIFTDOWN 1063 -#define QU_SC10_ENTER_LEFT 989 -#define MSG_SC9_EATBALL 941 -#define MSG_SC5_HIDEHANDLE 917 -#define MV_BLK_CLOSE 911 -#define SC_TEST 903 -#define MV_SLN_POT_TURN 632 -#define SC_INV 858 -#define QU_SC12_ENTER_RIGHT 856 -#define ST_SLN_BOOT 830 -#define MSG_SC7_HIDELUKE 821 -#define MV_BTT_LOOKMAN 738 -#define MV_BTT_ZANIUKH 742 -#define PIC_SCD_1 727 -#define QU_SC7_ENTER_RIGHT 721 -#define QU_SC7_ENTER_LEFT 720 -#define ANI_CORNERSITTER 711 -#define MSG_SC6_TAKEBALL 682 -#define ST_INV_BOX_default 892 -#define ANI_BUTTON 598 -#define MV_KZW_TOHOLERV 537 -#define QU_EFTR_FATTOSORROW 530 -#define MV_MAN_TOTRUBAVER2 519 -#define ST_MAN_1PIX 518 -#define QU_DYAS_DEFAULT4 515 -#define QU_SC1_EGBRSIGH 510 -#define PIC_SC3_RTRUBA 414 -#define MV_EGBR_BRK_DOMINO 388 -#define ST_EGBR_HEADLOWER 378 -#define MV_EGTR_SLIMBOLTLEGS 335 -#define PIC_SC2_LTRUBA 411 -#define MV_MANEGTR_GIVESEGGSLIM 418 -#define MV_OTM_BOX_MORGLEFT 427 -#define ST_OTM_BOX_RIGHT 430 -#define ST_KZW_FRONT 573 -#define MV_KZW_GOEDGE 575 -#define QU_OTM_GLS_MORGRIGHT 640 -#define QU_SC4_ENTER_RIGHT 707 -#define ST_MAN8_FLYUP 769 -#define MV_MAN8_HANDSDOWN 772 -#define MV_BRD_PICKBALL 692 -#define MV_INV_OLDGLASSES_default 403 -#define PIC_INV_OLDEGG 370 -#define MV_INV_OLDCOIN_default 390 -#define ANI_INV_OLDCOIN 386 -#define MV_SLN_POT_TURNBACK 634 -#define ST_VSN_NORMAL 906 -#define ST_VSN_RIGHT 956 -#define QU_VSN_DRYG 958 -#define PIC_SC6_CLKAXIS 1006 -#define MV_MAN_FROMTRUBAVER2 1024 -#define MV_SC4_COIN_default 1029 -#define PIC_SC4_HOLE 1038 -#define MSG_SC2_LADDERCLICK 1101 -#define MSG_SC8_HIDELADDER_D 1107 -#define MV_MAN11_SWING_2 1112 -#define MV_MAN11_JUMPONSWING 1125 -#define PIC_SCD_13 1195 -#define MV_GMA_TOTRUBA 1234 -#define MV_BAL14_SPIN 1247 -#define QU_SC15_ENTER_RIGHT 1274 -#define ST_WHR19_SPIN 1318 -#define PIC_SC18_RTRUBA2 1322 -#define ST_BDG_CLOSED 1380 -#define ST_INV_BOTTLEFULL_default 1423 -#define QU_SC16_TAKEMUG 1435 -#define MV_BTL_FILL 1430 -#define MV_HND17_CYCLE 1452 -#define MSG_SC18_SHOWMANJUMPTO 1508 -#define QU_SC18_ENTER_RIGHT 1521 -#define ST_HND17_ASK 1559 -#define MV_INV_EGGAPL_default 1565 -#define MV_GFA_BREATHE 1589 -#define ST_GFA_SITSOCK 1592 -#define ST_GFA_SWINGSOCK 1598 -#define QU_SC22_ENTER_UP 1619 -#define ST_CND_2 1707 -#define MV_CND_4_5 1712 -#define MV_CND_9_0 1722 -#define PIC_SCD_24 1845 -#define MV_MAN24_TAKEBOARD 1876 -#define ANI_INV_SWAB 1917 -#define MV_CHI_HIDE 1961 -#define ST_BTA_EMPTY 2050 -#define ST_SHR_EMPTY 2150 -#define MV_MAN29_HIT 2088 -#define QU_DLD_BLINK 2216 -#define QU_FFT_PIPE_LOOKFLAG 2302 -#define PIC_SCD_35 2412 -#define MV_GMA20_FLR_LOOK 2430 -#define MV_GMA20_STD_BLINK 2435 -#define ANI_STOOL_20 2463 -#define MV_CTS_CYCLEDOWN 2470 -#define MSG_SC22_SHOWSTOOL 2495 -#define MV_BOX34_MAIN 2499 -#define MV_MAN1_TAKEDOMINO 2614 -#define QU_SC33_STARTWATER 2644 -#define ST_HZE_CUT 2678 -#define MV_POT_9 2698 -#define ST_BTS11_2 2707 -#define QU_SC14_EXITLIFT 1226 -#define QU_SC34_ENTERLIFT 2819 -#define ST_EGTR_MID1 2863 -#define MV_MOM_TAKE2 2886 -#define MSG_SC6_JUMPFW 2901 -#define MSG_SC6_RESTORESCROLL 2906 -#define ST_DRP3_NORM2 2923 -#define MV_MAN3_GIVECOIN_3 2930 -#define MSG_SC31_PULL 2944 -#define QU_SC6_DROPS3 2955 -#define ANI_NADUVTAIL 3023 -#define PIC_SC11_LADDER 3038 -#define QU_BTT_CLOCK 3195 -#define ST_BAL14_NORM4 3219 -#define MSG_SC14_HIDEPINK 3248 -#define QU_JET17_DROP 3295 -#define ST_BTL_FULL2 3307 -#define MV_MAN_SHOES2 3387 -#define SND_8_009 3619 -#define SND_9_008 3652 -#define SND_11_005 3684 -#define SND_11_016 3700 -#define SND_11_027 3711 -#define SND_13_003 3743 -#define SND_14_002 3779 -#define SND_14_013 3795 -#define QU_SC16_SND1 3821 -#define SND_16_011 3831 -#define SND_16_022 3842 -#define SND_16_033 3853 -#define QU_SC17_SND2 3866 -#define SND_17_010 3874 -#define SND_17_021 3885 -#define SND_20_007 3940 -#define SND_22_005 3983 -#define SND_22_016 3999 -#define SND_22_027 4010 -#define SND_24_003 4006 -#define SND_26_001 4077 -#define SND_26_012 4093 -#define QU_SC28_SND2 4149 -#define SND_28_010 4157 -#define MSG_SC9_TOLADDER 4206 -#define MV_MAN25_STARTROW 1880 -#define MSG_SC28_TURNOFF_6 4273 -#define QU_SC29_SND3 4337 -#define SND_30_008 4371 -#define SND_31_007 4390 -#define SND_32_006 4402 -#define SND_32_017 4413 -#define SND_32_028 4424 -#define SND_33_005 4437 -#define MV_JTI33_POURFULL 4455 -#define SND_35_003 4496 -#define SND_35_014 4512 -#define MV_BOX34_FLOOR 4564 -#define MV_GLV_DRINKBOTTLE 2164 -#define SND_35_025 4603 -#define SND_34_037 4617 -#define PIC_MSV_8_D 4658 -#define QU_TBL_GOR 4709 -#define SND_27_044 4687 -#define ST_BRDCMN_GOR 4734 -#define ST_BOT15_NORM 4781 -#define MV_LUK26_HIT 4889 +#define PIC_CSR_GOFAR_R 4896 +#define PIC_CSR_GOL 4897 #define PIC_CSR_GOR 4898 -#define rMV_BRDCMN_STOPR 4945 -#define MSG_SC16_SHOWBEARDED 4956 -#define SND_CMN_068 4968 -#define rMV_KBK_FROMTRUBA 4973 -#define SND_13_036 4992 -#define SND_32_039 4997 -#define PIC_INTR1_RTRUBA 5002 -#define PIC_FIN1_UTRUBA 5004 -#define ST_FNFNG_AFTER 5065 -#define ST_FNG_SINGLE 5078 -#define SND_22_038 5306 -#define SND_23_015 5309 -#define PIC_MAP_A03 5265 -#define PIC_MAP_A14 5276 -#define PIC_MAP_P05 5281 -#define PIC_MAP_P16 5292 -#define SND_CMN_035 3714 -#define SND_28_021 4672 -#define PIC_MAP_S13 5235 -#define PIC_MAP_S24 5246 -#define PIC_MAP_S35 5259 -#define PIC_MAP_H30 5384 -#define PIC_MAP_S03 5225 -#define SND_13_037 5335 -#define PIC_SC26_SOCK 5312 -#define PIC_SC11_RTRUBA 1120 -#define PIC_SC3_DOMIN 5182 -#define MV_BHD_GOR 4939 -#define rMV_BHD_GOR 4941 -#define SND_INTR_013 5158 -#define ST_IN1HAND_BEFORE 5115 -#define MV_IN1HAND_DO 5114 -#define MV_FNHED_NOSE 5045 -#define ST_FNHED_NORM 5044 -#define ST_FNHND3_NORM 5039 -#define MSG_FIN_GOTO2 5024 -#define QU_SC33_TRYKUBIK 4979 -#define QU_BRD16_FLYL 4954 -#define QU_EGG6_GOL 4936 -#define ST_BBL_GOR 4925 -#define SND_25_025 4874 -#define SND_CMN_058 4869 -#define PIC_INV_MUGFULL_C 4846 -#define PIC_INV_HANDLE_C 4842 -#define PIC_INV_DOMINO_C 4832 -#define PIC_INV_CARPET_C 4830 -#define PIC_INV_SWAB_H 4819 -#define PIC_INV_GLASSES_H 4802 -#define PIC_INV_BOARD_H 4787 -#define MV_MAN_LOOKMONETOPR 4770 -#define SND_38_034 4730 -#define SND_36_014 4608 -#define ANI_BOOT_34 4560 -#define QU_SC26_SHOWSOCK 4556 -#define QU_SC37_SND1 4541 -#define SND_37_002 4537 -#define SND_36_003 4522 -#define SND_34_027 4487 -#define SND_34_016 4476 -#define SND_34_005 4460 -#define SND_33_006 4443 -#define SND_29_021 4355 -#define ST_STL34_BOX2 4305 -#define MV_TTA_GOD 4290 -#define MSG_SC28_ENDLIFT6 4244 -#define SND_38_023 4190 -#define SND_38_012 4177 -#define QU_SC38_SND2 4167 -#define SND_38_001 4161 -#define SND_27_034 4135 -#define SND_27_023 4124 -#define SND_27_012 4113 -#define QU_SC27_SND2 4103 -#define SND_27_001 4097 -#define SND_25_014 4067 -#define QU_SC25_SC3 4056 -#define SND_25_003 4051 -#define SND_21_007 3961 -#define QU_SC19_SND5 3918 -#define QU_SC18_SND4 3904 -#define QU_SC15_SND1 3803 -#define SND_15_002 3799 -#define SND_13_026 3771 -#define SND_13_015 3760 -#define SND_12_016 3736 -#define SND_12_005 3720 -#define SND_10_007 3673 -#define SND_1_011 3524 -#define SND_2_021 3515 -#define MSG_SC26_UPDATEDROP 3496 -#define QU_CHI_NORM 3485 -#define QU_WMN_SHOWBEFORE 3450 -#define ST_WMN28_EMPTY 3444 -#define MV_MUG17_FILLDROP 3412 -#define QU_MAN_DEF_STARTSHOES1 3379 -#define MV_CDI_BLINK 3311 -#define PIC_SC19_LADDER2 3301 -#define ST_GRL_POPA 3277 -#define ST_SPK4_NORM2 3113 -#define QU_SC1_SND5 3224 -#define SND_CMN_014 3138 -#define SND_2_010 3092 -#define MV_MID11_SWAB 3025 -#define ST_BOT4_LEFT 2882 -#define MV_MAN_STOPLADDER2 2845 -#define QU_SC6_ENTER_LIFTDOWN 2810 -#define QU_SC6_EXITLIFT 1055 -#define MV_LBN_9H 2806 -#define MV_LBN_7 2770 -#define ST_LBN_1P 2754 -#define ANI_BALLDROP 2685 -#define MV_MAN25_TAKEPOTTIE 2676 -#define MV_KDK_DRIZZLE 2671 -#define MV_MAN35_PLUGPIPE 2513 -#define MV_LEG_POT0_SHOW 2323 -#define QU_SC32_ENTER_RIGHT 2295 -#define PIC_SC32_RTRUBA 2292 -#define MV_FLG_STOPL 2261 -#define QU_SC38_SHOWDMN_DLD2 2255 -#define QU_SC29_ENTER_UP 2077 -#define QU_SC28_ENTER_RIGHT 2076 -#define QU_DRV_STARTDRIVE 2029 -#define ST_MID_BROOM 2022 -#define ST_DRV_RIGHTNOVENT 2002 -#define MV_DRV_TOLEFT 1998 -#define ANI_VODILLA 1994 -#define ANI_INV_VENT 1968 -#define QU_SC26_CLOSE1 1936 -#define MV_MAN25_TRYSWAB 1888 -#define PIC_SC24_PIPE2 1871 -#define QU_SC25_ENTER_RIGHT 1862 -#define ST_LUK23U_CLOSED 1819 -#define MV_LUK23U_OPEN 1818 -#define MV_LUK23_OPEN 1814 -#define QU_SC22_SHOWSACK 1792 -#define QU_SC22_SHOWSTOOL 1793 -#define MV_MSH_MOVE 1755 -#define MV_TABURETTE_default 1746 -#define PIC_INV_SOCK 1701 -#define MV_MAN2_TAKEBOX 1695 -#define ST_GRFU_KISS 1681 -#define PIC_SC22_UTRUBA 1587 -#define PIC_SC22_DTRUBA 1586 -#define MV_KSL_SWING 1460 -#define QU_GRL_LAUGH 1376 -#define ST_WHR18_SPIN 1301 -#define MV_GRD2_LOOKLEFT 1284 -#define QU_GRD2_BLINK1 1288 -#define QU_GMS_DRYG 1277 -#define ANI_BALL14 1246 -#define PIC_INV_GUM2 1207 -#define ST_INV_GUM2_default 1206 -#define MV_HDLR_0_1 1197 -#define ST_SWR_SIT 1147 -#define QU_NDV_EAT 968 -#define ANI_BIGLUK 909 -#define ANI_INV_OLDBOOT 396 -#define ST_SLN_POT_HOBOT 839 -#define MV_BTT_SLEEP 751 -#define ST_BTT_SPOON 741 -#define PIC_SCD_2 728 -#define MV_CST_TURNDOWN 719 -#define MV_CST_SPINHEADUP 716 -#define ST_CLK_CLOSED 590 -#define QU_EGTR_SORROWTOSLIM 526 -#define QU_DYAS_DEFAULT5 516 -#define MV_EGTR_BRK_BOOT 383 -#define MV_DYAS_SLEEPS 317 -#define MV_EGTR_SMOBLRV 338 -#define ANI_EGGBREAKER 376 -#define MV_MANYAS_TAKESCRATE 362 -#define ANI_KOZAWKA 495 -#define PIC_SC5_LTRUBA 636 -#define QU_SC3_ENTER_UP 706 -#define ST_MAN8_FLYDOWN 771 -#define MV_HGN_PLUU 813 -#define ST_SC7_BOX_default 793 -#define QU_SCT_LOOK 819 -#define MV_SLN_BOOT_DECLINE 832 -#define ST_INV_COIN_default 877 -#define MV_INV_GLASSES_default 888 -#define PIC_SC10_LTRUBA 972 -#define LiftDown 1058 -#define rMV_MAN_TURN_RL 1072 -#define MV_MAN11_FROMDOWN 1151 -#define MV_STR_TURNL 1173 -#define QU_STR_HIDE 1187 -#define PIC_SCD_14 1224 -#define QU_GMA_THROW 1255 -#define MV_BDG_OPEN 1379 -#define QU_SC18_ENTER_UP 1468 -#define MSG_SC18_MANCLIMBEDUP 1539 -#define ANI_INV_EGGCOIN 1567 -#define ST_INV_EGGCOIN_default 1569 -#define QU_GFA_SWINGSOCK 1615 -#define QU_DYAS_SLEEP 1690 -#define ST_CND_3 1709 -#define MV_CLN_ZHMUR 1768 -#define PIC_SCD_25 1846 -#define QU_SC25_ROWTOLADDER 1910 -#define ST_INV_SWAB_default 1919 -#define MV_GRFM_ASS 1982 -#define MV_ASS_TAIL 2121 -#define rMV_ASS_SHOW 2126 -#define ST_BTL38_NORM 2190 -#define QU_GLV_HMRKICK 2207 -#define MV_FFT_0_1 2274 -#define QU_GLV_DRINKBOTTLE 2286 -#define PIC_INV_TUBE 2320 -#define MV_MAN36_GOOUT 2367 -#define MV_MAN36_SHAKE 2368 -#define QU_SC35_ENTER_LEFT 2410 -#define ANI_HOSE 2424 -#define QU_GMA20_STL_NOSE 2447 -#define QU_GMA20_STD_BLINK 2450 -#define MV_STL20_NORM 2464 -#define QU_CTS34_BLINK 2388 -#define MV_MAN34_GOUP 2484 -#define ANI_INV_STOPPER 2535 -#define MV_LUK34_OPEN 2542 -#define PIC_SCD_36 2567 -#define MV_GRD3_PULL 2578 -#define MV_GMA22_TAKESTOOL 2610 -#define QU_SC22_FALLSACK_GMA 2613 -#define ANI_JETTIE_FLOW 2627 -#define MV_TSTB_FLOW 2660 -#define ST_TSTG_NORM 2664 -#define ST_POT_9 2699 -#define PIC_SC9_LADDER_R 2700 -#define ST_DMN3_NORM 2734 -#define MV_MAN_FROMHORTRUBA2 2846 -#define MV_MAN_FROMLADDER 493 -#define ST_EGTR_MID2 2869 -#define MV_MOM_TAKE3 2887 -#define MV_MOM_JUMPCLOSED 2892 -#define ST_INV_EGGBLACK_default 2920 -#define MV_CST_TRYCLOSE 2874 -#define QU_SC6_FALLGRIT2 2966 -#define PIC_CMN_SAVE 3034 -#define MV_GRIT2_FALL 3190 -#define ST_HDLL_HAMMER 3205 -#define MSG_SC14_SHOWBALLLAST 3246 -#define MSG_SC14_HIDEBALLLAST 3251 -#define PIC_SC18_BOARD 3296 -#define PIC_SC18_RTRUBA3 3298 -#define ST_DMS_3 3319 -#define ST_HDL_BROKEN 3342 -#define rMV_MAN_SHOES1 3383 -#define MV_DRP24_TOWATER 3506 -#define SND_9_009 3653 -#define SND_11_006 3690 -#define SND_11_017 3701 -#define SND_11_028 3712 -#define SND_13_004 3744 -#define SND_14_003 3780 -#define SND_14_014 3796 -#define SND_16_001 3816 -#define QU_SC16_SND2 3822 -#define SND_16_012 3832 -#define SND_16_023 3843 -#define SND_16_034 3854 -#define QU_SC17_SND3 3867 -#define SND_17_011 3875 -#define SND_17_022 3886 -#define SND_20_008 3941 -#define SND_22_006 3989 -#define SND_22_017 4000 -#define SND_22_028 4011 -#define SND_24_004 4007 -#define SND_26_002 4078 -#define QU_SC26_SND1 4082 -#define SND_26_013 4094 -#define QU_SC28_SND3 4150 -#define SND_28_011 4158 -#define MV_LFT28_OPEN 4239 -#define ST_LFT28_CLOSED 4240 -#define QU_MAN32_LOOKDOWN 4303 -#define QU_SC29_SND4 4338 -#define SND_29_010 4344 -#define SND_30_009 4372 -#define SND_31_008 4391 -#define SND_32_007 4403 -#define SND_32_018 4414 -#define SND_32_029 4425 -#define SND_35_004 4497 -#define SND_35_015 4513 -#define SND_3_020 4550 -#define SND_4_030 4551 -#define MSG_SC27_TAKEVENT 4584 -#define QU_SC35_FALLGRIT 4611 -#define SND_34_038 4618 -#define PIC_MNU_CONTINUE_D 4625 -#define PIC_MLD_CANCEL_L 4649 -#define PIC_MSV_9_D 4659 -#define PIC_MSV_1_L 4660 -#define SND_28_022 4673 -#define SND_CMN_047 4692 -#define ST_TBL_R 4707 -#define ST_BRDCMN_RIGHT 4732 -#define SND_35_026 4863 -#define MV_MAN11_TAKEBOOT 4884 -#define MV_GMA20_STL_DENY 4886 -#define PIC_CSR_DEFAULT 4891 -#define QU_BALL_WALKR 4919 -#define SND_CMN_069 4969 -#define QU_KBK32_START 4982 -#define SND_18_010 4994 -#define QU_FN1_ENTER_RIGHT 5005 -#define SND_FIN_030 5105 -#define MSG_FIN_ENDFINAL 5109 -#define MV_IN1GLS_NORM 5120 -#define ANI_IN2BOOT 5140 -#define SND_INTR_002 5147 -#define PIC_MSV_SPACE_L 5191 -#define SND_21_029 5213 -#define SND_17_033 4018 -#define SND_23_016 5310 -#define MSG_SC34_ONBUMP 5313 -#define PIC_MAP_A04 5266 -#define PIC_MAP_P06 5282 -#define PIC_MAP_P17 5293 -#define PIC_CSR_MAP 5339 -#define SND_CMN_025 3407 -#define SND_CMN_036 3715 -#define PIC_MOV_BGR 5343 -#define PIC_MAP_S14 5236 -#define PIC_MAP_S25 5247 -#define PIC_MAP_S36 5260 -#define PIC_MAP_H31 5385 -#define PIC_MAP_H20 5374 -#define PIC_MAP_S04 5226 -#define MSG_SC3_ONTAKECOIN 5338 +#define PIC_CSR_GOU 4899 #define PIC_CSR_HELPERBGR 5331 -#define SC_30 2064 -#define SND_INTR_014 5159 -#define SND_INTR_003 5148 -#define ST_CLK1_CYCLE 5129 -#define SND_FIN_020 5092 -#define MSG_FIN_GOTO3 5071 -#define MV_FCN_FALL 5015 -#define SND_25_026 4875 -#define SND_CMN_059 4873 -#define PIC_INV_LEVERHANDLE_C 4843 -#define PIC_INV_BROOM_C 4829 -#define PIC_INV_BOTTLE_C 4826 -#define PIC_INV_VENT_H 4822 -#define PIC_INV_HAMMER_H 4805 -#define PIC_INV_EGGCOIN_H 4800 -#define QU_SC29_BRD1 4741 -#define SND_CMN_048 4702 -#define QU_EGTR_MD2_SHOW 4698 -#define SND_3_021 4696 -#define SND_28_023 4683 -#define MSG_SC28_TURNON_0 4677 -#define ANI_BUTTON_27 4579 -#define QU_SC37_SND2 4542 -#define SND_37_003 4538 -#define QU_SC36_SND1 4525 -#define SND_36_004 4523 -#define SND_34_028 4488 -#define SND_34_017 4477 -#define SND_34_006 4466 -#define SND_33_007 4444 -#define SND_29_022 4356 -#define ANI_TIOTIA 4286 -#define MSG_SC28_LIFT1_SHOWAFTER 4261 -#define ST_MAN28_WASH 4250 -#define QU_SC25_MANLOOKUP 4213 -#define SND_38_024 4191 -#define QU_SC38_HMRKICK 4180 -#define SND_38_013 4178 -#define QU_SC38_SND3 4168 -#define SND_38_002 4162 -#define SND_27_035 4136 -#define SND_27_024 4125 -#define SND_27_013 4114 -#define QU_SC27_SND3 4104 -#define SND_27_002 4098 -#define SND_25_015 4068 -#define QU_SC25_SND1 4054 -#define SND_25_004 4052 -#define SND_23_006 4024 -#define SND_21_019 3973 -#define SND_21_008 3962 -#define SND_19_010 3923 -#define QU_SC18_SND5 3905 -#define QU_SC15_SND2 3804 -#define SND_15_003 3800 -#define SND_13_027 3772 -#define SND_13_016 3761 -#define SND_12_017 3737 -#define SND_12_006 3726 -#define SND_10_008 3674 -#define SND_1_012 3525 -#define SND_2_022 3518 -#define MV_MAN27_SPADE2SWAB 3486 -#define MSG_SC17_DROP 3414 -#define QU_SC27_RESTARTBETS 3370 -#define QU_SC22_TRYHANDLE 1802 -#define ANI_SPEAKER_4 3275 -#define SND_CMN_015 3139 -#define SND_4_020 3135 -#define SND_3_010 3109 -#define SND_2_011 3093 -#define SND_CMN_004 3074 -#define QU_SC13_CLOSESUCCESS 3062 -#define QU_STR_TURNR_L 3059 -#define QU_SC13_OPENFAIL 3042 -#define QU_MOM_OPENEYE 2949 -#define MSG_SC6_ENABLEDROPS 687 -#define PIC_SC4_LBTRUBA 2884 -#define MV_MAN17_TAKEFIRECAN 2859 -#define ST_LBN_0P 2833 -#define QU_SC15_ENTERLIFT 2811 -#define ST_LBN_9H 2807 -#define MV_LBN_8H 2804 -#define MV_LBN_8 2773 -#define QU_SC6_FALLBALL 2690 -#define MV_SPR_NORM 2516 -#define ST_LEG_DOWN1 2330 -#define ANI_LEG 2322 -#define ST_FLG_LEFT 2260 -#define PIC_SC38_TABLE 2206 -#define MV_MAN29_BEND 2091 -#define PIC_SC29_LTRUBA 2081 -#define QU_MID_BROOM 2046 -#define QU_MID_LOOK 2045 -#define MV_MID_SWITCH 2020 -#define ST_MID_SWAB2 2019 -#define QU_SC26_CLOSE2 1938 -#define MV_WTR25_FLOW 1857 -#define PIC_SC25_UTRUBA 1852 -#define MV_JET24_FLOW 1838 -#define QU_SC23_STARTKISS 1822 -#define QU_GRFU_KISS 1821 -#define QU_SC22_PUTSTOOL 1803 -#define MV_MAN22_TAKEHANDLE 1752 -#define ST_TABURETTE_default 1747 -#define QU_GRFU_STOPCHMOK 1671 -#define QU_GRFU_BLINKDOWN 1668 -#define PIC_SC22_LADDER 1585 -#define ST_KSL_JUMPMAN 1505 -#define ST_GRL18_FLYFROM 1486 -#define ANI_GIRL18 1484 -#define MV_KSL_1_2 1467 -#define MV_MAN16_TAKEMUG 1362 -#define MV_BOY_PULL 1332 -#define MV_GMA_JUMPFW 1230 -#define MV_MAN13_PUTGUM 1203 -#define ST_HDLR_GUM 1201 -#define MV_SWR_SWING 1114 -#define MSG_SC3_UTRUBACLICK 1103 -#define MV_MAN_STOPLADDERD 458 -#define MSG_SC10_HIDEGUM 993 -#define MSG_SC5_SHOWHANDLE 918 -#define MSG_SC5_TESTLUK 914 -#define MV_BLK_OPEN 910 -#define PIC_INV_OLDCOIN 406 -#define ST_INV_EGG_default 871 -#define ANI_INV_APPLE 878 -#define QU_SLN_POT_MOVEBACK 854 -#define MV_SLN_BOOT_KICK 828 -#define MV_BTT_EAT 740 -#define PIC_SCD_3 729 -#define ST_CST_WHANDLE 715 -#define PIC_SC1_UTRUBA 699 -#define MSG_CLICKBOTTLE 569 -#define ST_PNK_WEIGHTRIGHT 504 -#define ST_SPR_UP 544 -#define QU_EGTR_FATSLAP 529 -#define MV_MAN_TURN_DR 491 -#define MV_MAN_TURN_UR 487 -#define MV_MAN_FROMHORTRUBA 475 -#define ST_OTM_GLS_LEFT 421 -#define MV_EGBR_KACHAET 381 -#define MV_EGTR_FATOBLRV 373 -#define MV_EGTR_SLIMTRAIN 342 -#define MV_OTM_BOXDEFAULT 431 -#define MV_MAN_TOTRUBAHOR 445 -#define ST_KZW_RIGHT 559 -#define QU_KZW_WALKBOTTLE2 579 -#define QU_SC4_CLOSECLOCK 597 -#define PIC_SC4_LRTRUBA 616 -#define MV_OTM_HANDLEDOWN 620 -#define MV_OTM_BOXHANDLEDOWN 626 -#define ST_MOM_STANDS 658 -#define MV_CST_MORG 712 -#define ST_INV_OLDHANDLE_default 797 -#define PIC_INV_OLDAPPLE 409 -#define ST_PBAR_FINISH 899 -#define PIC_SC9_RTRUBA 901 -#define ST_BALL9_EMPTY 940 -#define ST_NDV_TURN 950 -#define ANI_LIFT 982 -#define MV_MAN4_TAKEAPPLE 1039 -#define ST_LFT_CLOSED 1049 -#define MV_MAN_TURN_SDU 1086 -#define MV_MAN_TURN_SUD 1089 -#define MV_MAN_STARTR 324 -#define MSG_SC6_UTRUBACLICK 1105 -#define ANI_MAN11 1108 -#define PIC_INV_GUM 1160 -#define ST_GMA_SIT 1229 -#define MV_MAN14_STEPFW 1240 -#define PIC_SCD_15 1278 -#define MV_GRD2_PULL 1280 -#define PIC_SC17_LADDER 1324 -#define PIC_INV_MUG 1373 -#define MV_HND17_FROMCYCLE 1453 -#define QU_HND17_ASK 1456 -#define MSG_SC17_UPDATEHAND 1560 -#define ST_INV_EGGAPL_default 1566 -#define ANI_INV_EGGBOOT 1570 -#define MV_INV_EGGBOOT_default 1571 -#define ST_GFA_SWING 1596 -#define MV_GFA_CHESHSOCK 1604 -#define ST_GRFG_HAIR 1677 -#define ST_CND_4 1711 -#define MV_CND_5_6 1714 -#define ST_CLN_STAND 1769 -#define ANI_INV_LEVERHANDLE 1777 -#define ST_INV_LEVERHANDLE_default 1779 -#define ANI_INV_STOOL 1780 -#define PIC_SCD_26 1847 -#define ST_BRD25_RIGHT 1900 -#define PIC_INV_SWAB 1923 -#define ST_CHI_NORM 1960 -#define QU_CHI_SHOW 1964 -#define MSG_SC29_DISABLERIDEBACK 2106 -#define QU_ASS_TAIL_R 2135 -#define ST_FFT_TUBEFLOW 2232 -#define ST_FFT_PIPEOPEN 2244 -#define PIC_SC32_HDLBASE 2400 -#define MV_MAN32_SPIN 2403 -#define ST_PDV_LARGE 2421 -#define MV_CTS34_SHRINK 2477 -#define MV_VNT34_SPIN 2480 -#define MV_MAN34_TRY 2485 -#define MV_MAN34_BOARD_BUMP 2504 -#define QU_LUK34_OPEN 2546 -#define PIC_SCD_37 2568 -#define MV_MOM_BLINK 825 -#define rMV_MAN_FROMHORTRUBA2 2847 -#define MV_EGTR_MD1_JOY 2867 -#define MV_MOM_TAKE4 2888 -#define ANI_POOL_3 2924 -#define MSG_SC1_SHOWOSK2 468 -#define MSG_SC4_HANDOVER 2960 -#define MV_GRIT1_FALL 2962 -#define QU_SWR_SITBALD 3007 -#define ST_SWR_STAND3 3014 -#define QU_SWR_STAND 3015 -#define MV_PCH_NORM 979 -#define QU_MID11_SWAB 3032 -#define SND_1_001 3041 -#define ST_MUG38_NORM2 3183 -#define ST_GRIT2_GRIT 3192 -#define ST_DMS_4 3320 -#define QU_CLN_TUZH 3327 -#define MV_MAN23_TRY 3333 -#define rMV_TABURETTE_default 3336 -#define QU_MAN_DEF_STARTSHOES2 3394 -#define rMV_MAN_SHOES2 3399 -#define ST_DRP24_EMPTY 3507 -#define SND_11_007 3691 -#define SND_11_018 3702 -#define SND_11_029 3713 -#define SND_13_005 3745 -#define SND_14_004 3781 -#define QU_SC14_SND1 3783 -#define SND_14_015 3797 -#define SND_16_002 3817 -#define QU_SC16_SND3 3823 -#define SND_16_013 3833 -#define SND_16_024 3844 -#define SND_16_035 3855 -#define SND_17_001 3860 -#define QU_SC17_SND4 3868 -#define SND_17_012 3876 -#define SND_17_023 3887 -#define SND_20_009 3942 -#define SND_22_007 3990 -#define SND_22_018 4001 -#define SND_22_029 4012 -#define SND_CMN_037 4030 -#define SND_24_005 4028 -#define SND_26_003 4079 -#define QU_SC26_SND2 4083 -#define SND_26_014 4095 -#define SND_28_001 4143 -#define QU_SC28_SND4 4151 -#define SND_28_012 4159 -#define MSG_SC25_TOLADDER 4215 -#define MV_MAN1_PUTBOOT 4230 -#define MSG_SC32_ONLADDER 2270 -#define QU_SC29_SND5 4339 -#define SND_29_011 4345 -#define SND_32_008 4404 -#define SND_32_019 4415 -#define SND_35_005 4498 -#define SND_35_016 4514 -#define MV_DRV_PUSHBUTTON 2005 -#define ST_CPT36_NORM 4602 -#define QU_SC36_SHOWCARPET 4605 -#define SND_36_015 4610 -#define SND_34_039 4619 -#define PIC_MNU_EXIT_D 4621 -#define PIC_MSV_OK_L 4636 -#define PIC_MSV_CANCEL_L 4638 -#define PIC_MSV_2_L 4661 -#define SND_31_009 4727 +#define PIC_CSR_ITN 4893 +#define PIC_CSR_ITN_GREEN 5330 +#define PIC_CSR_ITN_INV 4894 +#define PIC_CSR_ITN_RED 5329 +#define PIC_CSR_LIFT 5176 +#define PIC_CSR_MAP 5339 +#define PIC_INV_MENU 991 +#define PIC_MAP_A13 5275 +#define PIC_MAP_S01 5223 #define SC_1 301 -#define PIC_CSR_DEFAULT_INV 4892 -#define QU_KBK33_START 4983 -#define SND_4_031 4988 -#define MV_FNFNG_0_1 5077 -#define SND_FIN_031 5106 -#define MSG_LIFT_STARTEXITQUEUE 5186 -#define SND_38_035 5204 -#define SND_17_034 4023 -#define PIC_MNU_RESTART_L 5299 -#define QU_SC22_TRYBOX 5311 -#define PIC_MAP_A05 5267 -#define PIC_MAP_P07 5283 -#define PIC_MAP_P18 5294 -#define SND_CMN_026 3408 -#define PIC_MAP_S15 5237 -#define PIC_MAP_S26 5248 -#define PIC_MAP_S37 5261 -#define PIC_MAP_H32 5386 -#define PIC_MAP_H21 5375 -#define PIC_MAP_H10 5366 -#define PIC_SC17_RTRUBA2 5297 -#define SND_36_016 5208 -#define ST_PBAR_FINISH2 5179 -#define SC_31 2065 -#define SND_INTR_015 5160 -#define SND_INTR_004 5149 -#define MV_IN1CLK_SHOW 5127 -#define ST_IN1MAN_SLEEP 5112 -#define PIC_FN4_LADDER 5096 -#define SND_FIN_021 5093 -#define SND_FIN_010 5082 -#define MSG_FIN_GOTO4 5075 -#define ST_FNHND5_AFTER 5055 -#define ST_FNHND4_AFTER 5051 -#define MV_FNHED_SHOWHAND 5047 -#define QU_FIN1_FALLCOIN 5018 -#define PIC_SC35_DTRUBA_R2 4986 -#define ANI_BIGBALL 4923 -#define SND_25_027 4876 -#define PIC_INV_SCISSORS_H 4815 -#define PIC_INV_EGGBOOT_H 4799 -#define rMV_MAN_LOOKMONETOPR 4774 -#define MSG_SC15_ASSDRYG 4755 -#define MV_TBE36_NORM 4750 -#define QU_SC29_BRDOUT1 4743 -#define QU_SC29_BRD2 4742 -#define rMV_BRD_FALL 4737 -#define SND_CMN_049 4703 -#define QU_EGTR_MD1_SHOW 4697 -#define MSG_SC23_HIDEGIRAFFEE 4650 -#define ST_CPT35_NORM 4594 -#define ST_BOT34_NORM 4562 -#define MV_MAN26_PUTSOCK 4557 -#define QU_SC37_SND3 4543 -#define SND_37_004 4539 -#define QU_SC36_SND2 4526 -#define SND_36_005 4524 -#define SND_34_029 4489 -#define SND_34_018 4478 -#define SND_34_007 4467 -#define SND_33_008 4445 -#define SND_29_023 4357 -#define QU_SC32_FROMLADDER 4300 -#define SND_38_025 4192 -#define SND_38_014 4179 -#define QU_SC38_SND4 4169 -#define SND_38_003 4163 -#define SND_27_036 4137 -#define SND_27_025 4126 -#define SND_27_014 4115 -#define QU_SC27_SND4 4105 -#define SND_27_003 4099 -#define SND_25_016 4069 -#define QU_SC25_SND2 4055 -#define SND_25_005 4053 -#define SND_23_007 4025 -#define SND_21_009 3963 -#define SND_19_011 3924 -#define SND_14_016 3813 -#define QU_SC15_SND3 3805 -#define SND_15_004 3801 -#define SND_13_028 3773 -#define SND_13_017 3762 -#define SND_12_018 3738 -#define SND_12_007 3727 -#define SND_10_009 3675 -#define SND_6_030 3569 -#define SND_1_013 3526 -#define SND_2_023 3520 -#define ST_DRP25_EMPTY 3501 -#define MV_MID_SPADE 3488 -#define MSG_SC25_STARTBEARDEDS 3423 -#define ST_BRDCMN_EMPTY 3422 -#define SND_CMN_027 3409 -#define ST_VNT27_LIES2 3354 -#define ST_VNT26_UP 1929 -#define rMV_MAN25_CHIH 3343 -#define MV_MAN24_TRY 3340 -#define SND_2_001 3083 -#define QU_SC18_ENTER_UPRIGHT 3302 -#define QU_SC16_SHOWBOOT 3290 -#define MV_KZW14_JUMP 3268 -#define ST_KZW14_FRONT 3264 -#define MV_KZW14_SHOW 3262 -#define MV_GMA_BACKOFF2 3217 -#define ST_BTL38_FULL 3172 -#define SND_CMN_016 3140 -#define SND_4_021 3136 -#define SND_4_010 3125 -#define SND_2_012 3094 -#define SND_CMN_005 3075 -#define SND_1_002 3066 -#define rMV_STR_TURNL 3050 -#define QU_SC13_OPENSUCCESS 3047 -#define MSG_SC7_PULL 2943 -#define MV_FCN_NORM 2861 -#define QU_SC15_ENTER_LIFTDOWN 2814 -#define ST_LBN_8H 2805 -#define MV_LBN_7H 2802 -#define LIFTBTN_1 2781 -#define MV_LBN_9 2776 -#define ST_GRT9_NORM 2721 -#define ST_BDP_NORM 2687 -#define MV_MAN34_BOARD_STAND 2548 -#define MV_MAN34_JUMPDOWN 2385 -#define ST_LEG_DOWN2 2334 -#define MV_MAN32_TUBETOPIPE 2275 -#define ANI_FLAG 2257 -#define MSG_SC29_ENABLEPORTER 2096 -#define QU_MID_SWAB2 2043 -#define MV_MID_KERN 2016 -#define MV_DRV_FROMCYCLE 2003 -#define PIC_INV_VENT 1971 -#define MSG_SC26_HIDEVENT 1945 -#define QU_SC26_CLOSE3 1940 -#define QU_SC25_TRYBROOM 1912 -#define MV_MAN25_ROW 1882 -#define QU_SC26_ENTER_UP 1865 -#define QU_WTR25_FLOW 1859 -#define MV_WTR24_FLOW 1835 -#define QU_JET24_FLOW 1841 -#define ANI_JET24 1837 -#define QU_SC21_SHOWLEVER 1789 -#define QU_GRFU_TURN_UD 1664 -#define MV_GRFB_DANGLE 1639 -#define ST_MAN18_STANDKSL 1501 -#define MV_WR16_DEFAULT 1345 -#define MV_SMG_FINGERS 1404 -#define MV_MAN16_PUTMUG 1369 -#define PIC_SC16_TUMBA 1368 -#define MV_GRL_STARTLAUGH 1341 -#define MV_GRL_DRINK 1339 -#define PIC_SCD_16 1299 -#define QU_GMA_JUMPFW 1249 -#define MV_INV_BALL_default 1243 -#define PIC_SC14_RTRUBA 1221 -#define MV_HDLR_1_2 1200 -#define PIC_SC11_LTRUBA2 1150 -#define MSG_SC11_RESTARTMAN 1133 -#define MV_MAN11_JUMPHIT 1129 -#define PIC_SC1_LADDER 1091 -#define ST_KCH_180 1097 -#define MSG_SC10_SHOWGUM 994 -#define MV_MAN12_BOOT2POT 984 -#define QU_NDV_LOOK 970 -#define ST_GLT_FLOWN 932 -#define ANI_PLEVATEL 919 -#define PIC_INV_OLDBOOT 407 -#define QU_SLN_POT_MOVE 853 -#define QU_SLN_BOOT_LOOK 848 -#define MV_SLN_POT_INOUT 845 -#define ANI_SC7_BOX 791 -#define QU_HGN_MORG 814 -#define ST_MAN8_ONLADDER 786 -#define MV_MAN8_GOODLUCK 785 -#define MSG_STARTARCADE 781 -#define PIC_SCD_4 730 -#define QU_MOM_SHAKE 672 -#define MV_HND_TAKE0 604 -#define MV_KZW_RAISEHEAD 577 -#define ST_MAN_ONPLANK 552 -#define PIC_TEST 508 -#define ST_MAN_GOLADDER 450 -#define MV_EGBR_LOWERHEAD 382 -#define ST_EGTR_SLIM 336 -#define MV_OTM_GLS_DECLINES 426 -#define MV_OTM_BOX_TURNR 428 -#define ST_OTM_BOX_LEFT 429 -#define MV_OTM_MORGLEFT 420 -#define MSG_EGGEATEN 535 -#define ANI_MAMASHA 656 -#define TrubaDown 697 -#define ST_VMT_MIN 766 -#define MV_SCT_MORG 799 -#define ANI_INV_HAMMER 884 -#define ST_NDV_SIT 946 -#define MV_MAN6_INSTHANDLE 1007 -#define MSG_SHOWCOIN 1033 -#define PIC_SC8_ARCADENOW 1043 -#define MV_LFT_CLOSE 1053 -#define MV_KCH_MAIN 1095 -#define ST_MAN11_EMPTY 1110 -#define MV_MAN11_JUMPTOSWING 1126 -#define ANI_INV_VANTUZ 1157 -#define MV_INV_VANTUZ_default 1158 -#define PIC_SC13_LTRUBA 1171 -#define ST_STR_RIGHT 1174 -#define QU_STR_NOSE 1188 -#define ANI_HANDLE_L 1209 -#define MV_GMA_BLINK 1228 -#define MV_MAN14_KICK 1237 -#define QU_SC15_ENTER_UP 1275 -#define MV_BOY_KICK 1355 -#define ANI_INV_BOTTLE 1418 -#define QU_HND17_FROMCYCLE 1457 -#define PIC_SC18_LADDER1 1471 -#define MSG_SC18_SHOWBOYJUMP 1495 -#define MV_MAN_FROMLADDERUP 1522 -#define PIC_INV_EGGCOIN 1577 -#define MV_GFA_TOSWINGSOCK 1600 -#define QU_GFA_STARTSOCK 1613 -#define MV_GRFG_SHOWHAIR 1676 -#define MV_GRFG_BLINKHAIR 1679 -#define QU_GRFU_TURN_DU 1665 -#define ST_CND_5 1713 -#define QU_SC23_FROMCALENDAR 1734 -#define QU_SC24_ENTER_DOWN 1831 -#define QU_SC24_ENTER_DOWNLADDER 1832 -#define PIC_SCD_27 1916 -#define MV_LUK23_1_2 1974 -#define ST_HDL23_DEF 1980 -#define MV_BTA_FALL 2049 -#define QU_MID_SWITCH 2042 -#define PIC_SC29_RFLOOR 2153 -#define MV_GLV_HMRKICK 2155 -#define MV_GLV_TOSMALL_NOHMR 2161 -#define MV_DLD_PUT 2174 -#define MV_MLS_TURNRL 2178 -#define MSG_SC38_DRINK 2225 -#define PIC_SCD_38 2228 -#define QU_FFT_PIPE_OPENEYE 2299 -#define QU_FFT_PIPE_BLINK 2301 -#define QU_FFT_TUBE_STOP 2308 -#define MV_INV_PIPE_default 2318 -#define QU_LEG_HIDE0 2375 -#define MV_CTS34_BLINK 2479 -#define ANI_STOOL_34 2486 -#define ANI_BOX_34 2498 -#define PIC_INV_SCISSORS 2530 -#define QU_GRD37_BLINK1 2596 -#define MV_JTI33_POUR 2630 -#define MSG_SC33_HANDLEDOWN 2643 -#define QU_SC6_SHOWNEXTBALL 2689 -#define MV_MAN33_TAKETUBE 2718 -#define ANI_MUG_17 2737 -#define QU_SC3_EXITLIFT 2808 -#define MV_EGTR_MD2_JOY 2872 -#define QU_DRP3_DROP 2876 -#define QU_EGTR_MD2_BOLTLEGS 2879 -#define MV_MOM_TAKE5 2889 -#define PIC_SC4_BOTTLE2 2936 -#define ST_GRT1_GRIT 2964 -#define ST_HDLR_DOWN_GUM 3044 -#define SND_5_020 3161 -#define ST_RPE15_NORM 3257 -#define MV_DMS_FOUR 3322 -#define MSG_SC27_HANDLERTOBACK 3372 -#define QU_MAN_DEF_SHOES1_R 3392 -#define MV_GRFM_AFTER 3473 -#define MV_GRFU_OPENEYES 3474 -#define SND_11_008 3692 -#define SND_11_019 3703 -#define QU_SC13_SND1 3746 -#define SND_13_006 3751 -#define SND_14_005 3782 -#define QU_SC14_SND2 3784 -#define SND_16_003 3818 -#define QU_SC16_SND4 3824 -#define SND_16_014 3834 -#define SND_16_025 3845 -#define SND_16_036 3856 -#define SND_17_002 3861 -#define QU_SC17_SND5 3869 -#define SND_17_013 3877 -#define SND_17_024 3888 -#define SND_22_008 3991 -#define SND_CMN_038 4031 -#define QU_SC24_SND1 4036 -#define SND_24_006 4041 -#define SND_26_004 4080 -#define QU_SC26_SND3 4084 -#define SND_26_015 4096 -#define SND_28_002 4144 -#define QU_SC28_SND5 4152 -#define SND_28_013 4160 -#define MSG_SC28_TURNON_1 4278 -#define QU_SC32_TEST1 4297 -#define QU_CTS_DEFAULT 4302 -#define SND_29_001 4330 -#define SND_29_012 4346 -#define SND_32_009 4405 -#define QU_SC35_SND1 4499 -#define SND_35_006 4504 -#define SND_35_017 4515 -#define SND_3_011 3110 -#define MV_RHT_OPEN 2365 -#define MV_RNG_OPEN 4612 -#define PIC_MNU_LOAD_L 4628 -#define PIC_MSV_3_L 4662 -#define MV_BRD28_TALK 4680 -#define MV_BRDCMN_FLYAWAY 4736 -#define ST_SHD_CMN0 4861 +#define SC_10 653 +#define SC_11 654 +#define SC_12 655 +#define SC_13 1137 +#define SC_14 1138 +#define SC_15 1139 +#define SC_16 1140 +#define SC_17 1141 +#define SC_18 1142 +#define SC_19 1143 #define SC_2 302 -#define QU_EGTR_SLIMSHOW 4883 -#define PIC_CSR_GOFAR_R 4896 -#define PIC_CSR_GOU 4899 -#define PIC_CSR_GOD 4900 -#define MV_KBK_GOR 4964 -#define rMV_KBK_GOR 4972 -#define SND_4_032 4989 -#define SND_3_022 4991 -#define SC_INTRO1 3896 -#define ST_FNHND1_NORM 5030 -#define SND_FIN_032 5107 -#define QU_IN2_DO 5144 -#define PIC_SCD_INTR 5163 #define SC_20 1144 -#define MSG_SC11_SITSWINGER 5198 -#define MSG_SC20_UPDATELOCKABLE 5217 -#define ST_HZE_CUT2 5318 -#define PIC_MAP_A06 5268 -#define PIC_MAP_P08 5284 -#define ST_BTN32_ON 5350 -#define PIC_MLD_BGR 4645 -#define PIC_MAP_S05 5227 -#define PIC_MAP_S16 5238 -#define PIC_MAP_S27 5249 -#define PIC_MAP_S38 5262 -#define PIC_MAP_H33 5387 -#define PIC_MAP_H22 5376 -#define PIC_MAP_H11 5367 -#define PIC_SC4_LADDER 1438 -#define PIC_SC8_RTRUBA2 2978 -#define SC_32 2066 -#define SND_INTR_016 5161 -#define SND_INTR_005 5150 -#define SND_FIN_022 5094 -#define SND_FIN_011 5083 -#define QU_FN2_CYCLE 5067 -#define ST_FHND3_SHOT 5061 -#define ST_FNHND6_AFTER 5059 -#define ST_BHD_GOR 4940 -#define ANI_BIGHEAD 4938 -#define PIC_CSR_ARCADE2_D 4903 -#define SND_26_016 4878 -#define PIC_INV_APPLE_H 4599 -#define QU_SC29_BRDOUT2 4744 -#define MV_GLV_LOOKBOTTLE 4688 -#define MSG_SC11_MANCRY 4691 -#define ST_SCK26_NORM 4555 -#define QU_SC37_SND4 4544 -#define SND_37_005 4540 -#define SND_36_006 4530 -#define QU_SC36_SND3 4527 -#define SND_34_019 4479 -#define SND_34_008 4468 -#define QU_SC34_SND1 4461 -#define SND_33_009 4446 -#define SND_29_024 4358 -#define SND_28_014 4323 -#define MSG_SC34_FROMCACTUS 4313 -#define ST_VNT34_NORM 4309 -#define ST_TTA_GOD 4289 -#define MV_MAN25_TOTRUBA_R 4216 -#define SND_38_026 4193 -#define SND_38_015 4182 -#define QU_SC38_SND5 4170 -#define SND_38_004 4164 -#define SND_27_037 4138 -#define SND_27_026 4127 -#define SND_27_015 4116 -#define QU_SC27_SND5 4106 -#define SND_27_004 4100 -#define SND_25_017 4070 -#define SND_25_006 4059 -#define SND_23_008 4026 -#define QU_SC23_SND1 4019 -#define SND_19_012 3925 -#define SND_18_002 3897 -#define SND_14_017 3814 -#define QU_SC15_SND4 3806 -#define SND_15_005 3802 -#define SND_13_029 3774 -#define SND_13_018 3763 -#define SND_12_019 3739 -#define SND_12_008 3728 -#define QU_SC12_SND1 3721 -#define SND_6_031 3570 -#define SND_6_020 3559 -#define SND_5_021 3162 -#define SND_1_014 3527 -#define QU_GRFM_AFTER 3481 -#define MV_WMN28_GREET 3440 -#define SND_CMN_028 3410 -#define MV_MAN_SITDOWN 3378 -#define MV_VNT26_TURNR 1928 -#define SND_3_001 3100 -#define MV_GRL_FALL 3115 -#define QU_KZW14_JUMP 3271 -#define QU_KZW14_SHOW 3270 -#define QU_SC14_WINARCADE 3247 -#define MV_MAN14_KICKLAST 3218 -#define SND_4_022 3137 -#define SND_4_011 3126 -#define SND_2_013 3095 -#define SND_2_002 3084 -#define SND_CMN_006 3076 -#define SND_1_003 3067 -#define QU_STR_SHOW_L 3056 -#define MV_NTL_MOVE 3028 -#define MSG_SC10_LADDERTOBACK 3002 -#define QU_MOM4_OPENEYE 2959 -#define ST_MOM_LIFT2 2950 -#define MV_MOM_OPENEYE 2947 -#define ST_PMS_PLUS 2941 -#define MSG_SC6_STARTDROPS 2897 -#define MV_MAN_GOLADDER2 2844 -#define QU_SC30_EXITLIFT 2824 -#define ST_LBN_7H 2803 -#define MV_LBN_6H 2800 -#define LIFTBTN_2 2782 -#define ST_PTI25_NORM 2675 -#define ANI_POTTIE_25 2673 -#define QU_SC35_EATHOZE 2540 -#define MSG_SC22_HIDESTOOL 2503 -#define MSG_SPINHANDLE 2398 -#define MV_MAN34_STANDBOX 2386 -#define MSG_SC30_UPDATEPATH 2358 -#define QU_LEG_MOVE1 2349 -#define ST_LEG_DOWN3 2337 -#define MV_LEG_POTS_HIDE 2336 -#define MV_MAN32_STANDUP 2313 -#define MV_DLD_TAKE 2249 -#define PIC_SC28_DTRUBA 2074 -#define MV_BTA_NORM 2027 -#define MV_MID_0_1 2025 -#define QU_SC26_CLOSE4 1942 -#define rMV_MAN25_STOPROW 1890 -#define ST_MAN25_ONBOARD 1879 -#define MV_LUK26_0_1 1868 -#define MSG_SC25_ENTERMAN 1861 -#define LadderUp 1850 -#define ST_WTR24_FLOWLOWER 1843 -#define QU_WTR24_FLOW 1840 -#define ANI_WATER24 1834 -#define ST_HDL22_LIES 1762 -#define MV_MAN22_TAKETABUR 1749 -#define PIC_SC21_LTRUBA 1553 -#define MV_KSL_SWINGMAN 1502 -#define MV_KSL_INGIRL 1493 -#define ST_GRL18_WALKTO 1489 -#define ST_KSL_GIRL 1465 -#define ST_KSL_NORM 1461 -#define ST_BOY_EMPTY 1330 -#define ANI_GIRL 1328 -#define QU_SC19_ENTER_DOWN 1303 -#define MV_INV_FIRECAN_default 1313 -#define ANI_INV_FIRECAN 1312 -#define QU_SC18_ENTER_LEFT 1304 -#define QU_GRD2_LOOKRIGHT 1290 -#define MV_MAN15_TAKEBOOT 1272 -#define QU_SWR_SIT 1149 -#define ST_KCH_0 1096 -#define QU_SLN_POT_PLAY 1045 -#define MV_OTM_0_2 437 -#define ST_INV_POT_default 988 -#define MSG_SC9_SETSCROLL 964 -#define ANI_BALL9 933 -#define ANI_GLOTATEL 924 -#define QU_SC9_ENTER_DOWN 908 -#define MV_INV_OLDBOOT_default 397 -#define ST_INV_OLDCOIN_default 391 -#define MV_INV_BOX_default 633 -#define MV_SLN_BOOT_MORG 831 -#define MV_VMT_DEF 765 -#define MV_BTT_DRINK 749 -#define PIC_SCD_5 731 -#define MV_CST_TURNUP 718 -#define ANI_BEARDED 691 -#define MV_HND_TAKE1 605 -#define ST_KZW_JUMPOUT 587 -#define QU_SC4_MANLOOKDOWN 548 -#define QU_EGTR_SORROWTOFAT 531 -#define QU_SC1_EGBRKACH 512 -#define PIC_dsf 410 -#define ST_EGTR_FAT 344 -#define ANI_EGGEATER 334 -#define MV_DYAS_OPENBOX 307 -#define MV_MANDYAS_GIVESAPPL 360 -#define MV_OTM_VNT_TRIESOFF 435 -#define MV_MANEGBR_EGG2COIN 441 -#define ST_KZW_EMPTY 498 -#define QU_PNK_CLICK 550 -#define MV_KZW_TOEDGE 572 -#define QU_OTM_BOX_TURNL 645 -#define QU_OTM_VNT_BOLTHEAD 647 -#define ST_MAN_BALL 675 -#define rMV_MAN_FROMHORTRUBA 703 -#define QU_BTT_MORG 762 -#define ST_VMT_MAX 767 -#define MV_CST_0_2 800 -#define ST_INV_OLDHAMMER_default 401 -#define ANI_GUM 978 -#define MSG_SC6_SPINHANDLE 1013 -#define rMV_MAN_STARTR 330 -#define ANI_INV_GUM 1154 -#define QU_SC5_MANFLY 1168 -#define ST_HDLL_UP 1211 -#define ANI_GRANDMA 1227 -#define MV_GMA_BACKOFF 1233 -#define PIC_SC16_LTRUBA 1292 -#define ANI_MUG 1296 -#define PIC_SCD_17 1305 -#define PIC_SC17_RTRUBA 1323 -#define ANI_INV_MUG 1370 -#define PIC_SC17_TUMBA 1426 -#define MV_MAN17_PUTBOTTLE 1428 -#define MSG_SC17_SHOWBOTTLE 1432 -#define PIC_SC18_LADDER2 1472 -#define MV_KSL_2_3 1506 -#define QU_DYS_CLOSEBOX 1003 -#define QU_CDI_HIDE 1537 -#define QU_CDI_HIDEEMPTY 1545 -#define PIC_INV_EGGBOOT 1579 -#define MV_GFA_CHESH 1603 -#define QU_GFA_SWING 1614 -#define QU_GFA_STOP 1616 -#define MV_GRFU_TURN_DU 1649 -#define MV_GRFU_TURN_UD 1654 -#define MV_DYAS_0_1 1692 -#define MV_MAN22_TAKESOCK 1697 -#define ST_CND_6 1715 -#define MV_CND_6_7 1716 -#define MV_CLN_0_1 1770 -#define MV_MAN_TOTRUBAVER2_R 1848 -#define MV_MAN25_TRY 1877 -#define ST_LUK23_WHANDLE 1975 -#define MV_GRFM_NECK 1985 -#define MV_MAN27_SWABTOBROOM 1991 -#define PIC_SCD_28 2098 -#define MV_STR1_LEAVE 2114 -#define ST_ASS_NORM 2122 -#define ST_DMN38_NORM2 2205 -#define QU_MLS_TURNR 2221 -#define MV_GLV_PROPOSE_NOHMR 2279 -#define QU_FFT_TUBE_START 2303 -#define QU_LEG_HIDE1 2371 -#define PIC_SC35_MONETOPR 2408 -#define MV_PDV_BLINKLARGE 2422 -#define MV_PDV_PUZO 2423 -#define ST_GMA20_STAND 2436 -#define QU_GMA20_STD_LOOK 2451 -#define ST_CTS_GROWDOWN 2468 -#define PIC_INV_STOPPER 2531 -#define PIC_SC35_DTRUBA_R 2559 -#define QU_SC34_ENTER_UP 2569 -#define MV_GRD37_PULL 2589 -#define ST_MUG33_EMPTY 2625 -#define MV_JTI33_FLOW 2628 -#define ANI_TESTO_GREEN 2662 -#define MV_MAN9_TAKEPOT 2697 -#define MV_MUG17_FILL 2745 -#define QU_SC34_TOTRUBAVER 2853 -#define MSG_SC4_STARTCLOCK 2856 -#define MV_EGTR_MD1_BOLTLEGS 2864 -#define ANI_DROP_3 2873 -#define ST_MOM_STANDCLOSED 2890 -#define ST_PL3_NORM 2926 -#define MV_MAN13_THROWAPPLE 1444 -#define MV_VSN_FROMRIGHT 2996 -#define MV_MAN11_HITBY 3016 -#define QU_SC10_TAKEGUM 3026 -#define MV_HDLR_RISE_GUM 3045 -#define SND_5_010 3151 -#define SND_CMN_017 3164 -#define MV_STR_DENY 3208 -#define MV_DRP26_DROP 3346 -#define QU_MAN_DEF_SHOES2_R 3401 -#define ANI_DROP_24 3505 -#define SND_11_009 3693 -#define QU_SC13_SND2 3747 -#define SND_13_007 3752 -#define QU_SC14_SND3 3785 -#define SND_14_006 3788 -#define SND_16_004 3819 -#define QU_SC16_SND5 3825 -#define SND_16_015 3835 -#define SND_16_026 3846 -#define SND_16_037 3857 -#define SND_17_003 3862 -#define SND_17_014 3878 -#define SND_17_025 3889 -#define SND_22_009 3992 -#define SND_CMN_039 4032 -#define QU_SC24_SND2 4037 -#define SND_24_007 4042 -#define SND_26_005 4081 -#define QU_SC26_SND4 4085 -#define SND_28_003 4145 -#define MV_SHD01_SHD 4203 -#define MV_BOT1_NORM 4232 -#define MSG_SC28_TURNON_2 4276 -#define MSG_SC28_TURNON4 4280 -#define QU_CTS34_FALLEFT 4316 -#define SND_29_002 4331 -#define SND_29_013 4347 -#define QU_SC35_SND2 4500 -#define SND_35_007 4505 -#define SND_35_018 4516 -#define SND_3_012 3111 -#define PIC_MSV_EMPTY_D 4639 -#define PIC_MSV_4_L 4663 -#define PIC_MSV_DOTS_D 4670 -#define QU_BRD28_TALK 4682 -#define MSG_SC14_SCROLLLEFT 4768 -#define ANI_BOOT_15 4779 -#define ANI_SHD_CMN 4859 -#define ST_SHD_CMN1 4862 -#define SC_3 303 -#define ANI_KUBIK 4963 -#define QU_KBK33_GO 4978 -#define SND_4_033 4990 -#define SC_INTRO2 3907 -#define PIC_FN1_RTRUBA 5003 -#define MSG_INTR_SWITCHTO1 5145 -#define SC_10 653 #define SC_21 1546 -#define SND_25_028 5173 -#define SND_3_023 5195 -#define MSG_SC19_UPDATENUMRIDES 5203 -#define PIC_MAP_A07 5269 -#define PIC_MAP_P09 5285 -#define PIC_MAP_S06 5228 -#define PIC_MAP_S17 5239 -#define PIC_MAP_S28 5250 -#define PIC_MAP_H34 5388 -#define PIC_MAP_H23 5377 -#define PIC_MAP_H12 5368 -#define PIC_MAP_H01 5357 -#define QU_SC28_LIFT6_END 3563 -#define SND_26_017 5337 -#define SND_3_024 5333 -#define MV_MOM_TOLIFT 2893 -#define MV_MOM_JUMPBK 662 -#define MSG_LIFT_EXITLIFT 5187 -#define SC_4 304 -#define SC_33 2067 -#define SND_INTR_017 5162 -#define SND_INTR_006 5151 -#define MSG_INTR_ENDINTRO 5139 -#define QU_INTR_FINISH 5138 -#define MSG_INTR_SWITCHTO2 5134 -#define MV_IN1CLK_CYCLE 5130 -#define MV_IN1MAN_SLEEP 5111 -#define SND_FIN_012 5084 -#define ST_FNHND4_BEFORE 5050 -#define MV_FNHND3_SHOWHMR 5040 -#define PIC_MNU_SLIDER_L 4912 -#define PIC_INV_SUGAR_C 4853 -#define PIC_INV_POTTIE_C 4849 -#define PIC_INV_MUG_C 4845 -#define PIC_INV_GUM_C 4840 -#define PIC_INV_BOTTLEFULL_C 4827 -#define PIC_INV_LOPAT_H 4808 -#define PIC_INV_BOX_H 4791 -#define MSG_CMN_WINARCADE 4778 -#define SND_15_006 3808 -#define SND_29_025 4689 -#define MV_RNG_CLOSE 2605 -#define MV_INV_CARPET_default 4597 -#define MV_DRV_PUSHBUTTON_NOVENT 4577 -#define SND_37_006 4546 -#define QU_SC37_SND5 4545 -#define SND_36_007 4531 -#define QU_SC36_SND4 4528 -#define SND_34_009 4469 -#define QU_SC34_SND2 4462 -#define SND_28_015 4324 -#define MV_LEG_DENY_POT1 4284 -#define MV_MAN28_STARTWASH 4248 -#define SND_38_027 4194 -#define SND_38_016 4183 -#define SND_38_005 4165 -#define SND_27_038 4139 -#define SND_27_027 4128 -#define SND_27_016 4117 -#define SND_27_005 4101 -#define SND_25_018 4071 -#define SND_25_007 4060 -#define QU_SC25_SND4 4057 -#define SND_23_009 4027 -#define QU_SC23_SND2 4020 -#define SND_19_013 3926 -#define SND_19_002 3910 -#define SND_18_003 3898 -#define SND_14_018 3815 -#define QU_SC15_SND5 3807 -#define SND_13_019 3764 -#define SND_12_009 3729 -#define QU_SC12_SND2 3722 -#define SND_7_020 3600 -#define SND_6_032 3571 -#define SND_6_010 3547 -#define SND_1_015 3528 -#define SND_3_013 3519 -#define QU_DRP25_TOWATER 3504 -#define ANI_DROP_25 3499 -#define MV_MID_0_2 3491 -#define SND_CMN_029 3469 -#define MV_WMN_AFTER 3454 -#define ST_WMN28_NORM 3441 -#define PIC_SC27_FLOOR2 3353 -#define ST_BTH_EMPTY 3351 -#define MV_MAN22_HANDLEDOWN2 3328 -#define SND_4_001 3116 -#define SND_1_004 3068 -#define QU_TEST1 3303 -#define ANI_BOOT_16 3285 -#define MV_GRL_DRYG 3279 -#define ST_KZW14_SIDE 3266 -#define PIC_SC14_GRID 3260 -#define MV_BAL14_NORM2 3213 -#define SND_4_023 3141 -#define SND_4_012 3127 -#define SND_3_002 3101 -#define SND_2_014 3096 -#define SND_2_003 3085 -#define SND_CMN_007 3077 -#define MV_MOM_STARTBK 3010 -#define MV_CLK8_GO 2990 -#define QU_MOM4_LOOKBAG 2958 -#define MV_MOM4_OPENEYE 2957 -#define MV_MOM_LIFTUP 2951 -#define MV_MAN4_FALLBOTTLE 2848 -#define MV_MAN_STARTLADDER2 2842 -#define QU_SC30_ENTERLIFT 2823 -#define QU_SC15_EXITLIFT 2812 -#define ST_LBN_6H 2801 -#define MV_LBN_5H 2798 -#define LIFTBTN_3 2783 -#define QU_SC14_BREAKGRIT 2728 -#define QU_SC32_FLOWO 2666 -#define QU_SC21_ENTER_DOWN 2646 -#define ST_HDL_PLUGGED 2397 -#define MV_FLG_STARTR 2263 -#define QU_LEG_MOVE2 2350 -#define QU_LEG_SHOW 2346 -#define MSG_SC32_TRYSIT 2294 -#define ST_DMN38_NORM3 2251 -#define ST_MAN29_SITR 2141 -#define ST_SHR_NORM 2132 -#define MSG_SC29_DISABLEPORTER 2097 -#define MSG_SC27_STARTBET 2047 -#define QU_SC26_CLOSE5 1944 -#define QU_SC27_ENTER_LEFT 1915 -#define QU_SC25_ROWTOTRUBA 1897 -#define rMV_MAN25_ROW 1891 -#define MV_MAN25_TRYBROOM 1887 -#define ST_INV_BOARD_default 1874 -#define MV_INV_BOARD_default 1873 -#define ANI_WATER25 1856 -#define PIC_SC25_RTRUBA 1853 -#define MSG_SC21_HANDLEDOWN 1807 -#define ANI_HANDLE22 1759 -#define ST_BOX2_LEFT 1694 -#define ST_GRFU_DOWN 1650 -#define QU_GRFB_TRYSTAND 1641 -#define MV_MAN18_FROMRTRUBA 1519 -#define ST_KSL_JUMPGIRL 1494 -#define ST_KSL_JUMPBOY 1492 -#define MV_GRL18_JUMPFROM 1485 -#define ST_BOY_FLYTO 1483 -#define QU_SMG_TAKESUGAR 1434 -#define PIC_INV_SUGAR 1413 -#define QU_SC16_GIRLLAUGH 1375 -#define MV_GRL_GOIN 1335 -#define MSG_SC11_SHOWSWING 1124 -#define ST_KCH_STATIC 1122 -#define QU_SC11_ENTER_LEFT 1093 -#define QU_SC10_ENTER_RIGHT 990 -#define QU_NDV_BLOW 969 -#define ST_GLT_SIT 926 -#define PIC_SC9_WALL1 923 -#define MSG_SC5_HANDLEDOWN 916 -#define ANI_INV_DOMINO 872 -#define ST_INV_BOOT_default 883 -#define ST_INV_GLASSES_default 889 -#define ANI_INV_GLASSES 887 -#define MV_SLN_POT_MOVE 842 -#define ST_SLN_POT_TURNED 838 -#define MSG_SC7_OPENLUKE 823 -#define MV_SC7_BOX_default 792 -#define MSG_SC6_SHOWNEXTBALL 790 -#define PIC_SCD_6 732 -#define PIC_SC1_RTRUBA 698 -#define MV_MAN_PUTCOIN 688 -#define MV_HND_TAKE2 606 -#define QU_EGTR_FATOBL 532 -#define ST_MAN_LADDERDOWN 521 -#define MV_MAN_TURN_DU 484 -#define MV_MAN_TURN_UD 483 -#define MV_MAN_GOLADDER 451 -#define MV_MANEGBR_EGG2BOOT 440 -#define ANI_OTMOROZ 419 -#define ST_EGTR_SLIMSORROW 340 -#define MV_MANDYAS_GIVESHMR 359 -#define MV_OTM_GLS_MORGRIGHT 425 -#define MV_OTM_BOX_DECLINES 432 -#define MV_MAN_LOOKPLANKRV 522 -#define ST_HND_TAKEN 608 -#define QU_OTM_GLS_TURNR 639 -#define ST_MOM_SITS 659 -#define MV_MAN_SHOOTBALL 676 -#define QU_CST_TURNUP 723 -#define MV_MAN8_FIRSTJUMP 778 -#define QU_SC8_ENTER_RIGHT 780 -#define ST_CST_HANDLELESS 794 -#define QU_CST_CLOSELUKE 820 -#define ST_INV_OLDDOMINO_default 369 -#define MV_BALL9_EXPLODE 939 -#define MV_NDV_DENIES 952 -#define MV_GRD_PULL 999 -#define QU_SC2_ENTER_DOWN 1025 -#define MV_SC4_BOOT_default 1036 -#define MV_MAN_TURN_SRD 1082 -#define MV_MAN_TURN_SRU 1083 -#define rMV_MAN_TURN_SRL 1090 -#define MSG_STANDLADDER 1092 -#define MV_MAN_STARTD 478 -#define MV_MAN_STARTU 333 -#define ST_MAN11_SWING 1127 -#define MV_MAN5_FALLBUMP 1163 -#define MV_STR_PLUU 1178 -#define ST_STR_EMPTY 1180 -#define QU_STR_CHEW 1190 -#define MV_MAN_FALLPOPA 1193 -#define MV_GRD2_MORG 1282 -#define PIC_SCD_18 1306 -#define ST_HDLL_FIRECAN 1310 -#define QU_SC14_ENDARCADE 1391 -#define MV_INV_BOTTLE_default 1419 -#define MV_INV_BOTTLEFULL_default 1422 -#define ANI_HAND17 1446 -#define MV_MANEGTR_GIVESCOIN 1581 -#define ANI_GIRAFFEE 1672 -#define ST_CND_7 1717 -#define ANI_CLEANERS 1767 -#define ANI_INV_BROOM 1774 -#define MV_INV_STOOL_default 1781 -#define MV_MAN25_BOARDTOLADDER 1893 -#define QU_SC25_SHOWBOARD_R 1901 -#define QU_SC25_SHOWBOARD_LCLOSE 1908 -#define QU_SC25_BOARDTOLADDER 1911 -#define QU_SC26_AUTOCLOSE1 1949 -#define MSG_SC26_TESTVENT 1952 -#define PIC_SCD_29 2099 -#define rMV_ASS_TAIL 2128 -#define ST_GLV_SLEEP2 2166 -#define MV_DLD_ICK 2172 -#define MV_DLD_GLOT 2177 -#define MV_MLS_BLINK 2182 -#define MV_MAN38_TAKEMUG 2185 -#define ST_MUG38_NORM 2193 -#define MV_FFT_TUBE_DENY 2233 -#define PIC_SC32_KADKA 2273 -#define QU_FFT_PIPE_STOP 2298 -#define QU_FFT_TUBE_OPENEYE 2305 -#define MV_INV_TUBE_default 2315 -#define QU_LEG_HIDE2 2372 -#define QU_CTS_GROW 2416 -#define MV_GMA20_STL_LOOK 2434 -#define QU_GMA20_STD_LOOKTRUBA 2452 -#define MV_CTS_STOPDOWN 2471 -#define ST_STL34_NORM 2488 -#define ST_INV_SCISSORS_default 2534 -#define QU_PDV_SML_TRY 2554 -#define MV_GRD37_BLINK1 2592 -#define MV_MAN33_TAKEMUG 2622 -#define MV_SCR36_NORM 2648 -#define MV_TSTO_FLOW 2657 -#define MV_MAN6_THROWBALL 2692 -#define MV_MAN32_BUMP 2713 -#define MSG_LIFT_CLICKBUTTON 2780 -#define QU_SC34_ENTER_LIFTDOWN 2822 -#define QU_EGTR_MD1_OBL 2878 -#define MV_MAN3_GIVEEGG_1 2907 -#define PIC_SC6_PIPEY 2954 -#define ST_BALL9_EMPTY2 2974 -#define SND_5_011 3152 -#define SND_5_022 3163 -#define SND_CMN_018 3165 -#define QU_SC38_SHOWDOMINO2 3181 -#define MV_BTT_LOOK 3193 -#define MSG_SC14_ENDARCADE 3250 -#define PIC_SC18_LADDER3 3299 -#define MSG_SC13_OPENFAST 1266 -#define MV_MAN26_TRY 3344 -#define QU_DRP26_DROP 3352 -#define ST_VNT26_RIGHT 1930 -#define rMV_MAN_SITDOWN 3391 -#define QU_SC25_MANLOOKDOWN 3417 -#define QU_SC9_SND1 3645 -#define QU_SC11_SND1 3685 -#define QU_SC13_SND3 3748 -#define SND_13_008 3753 -#define QU_SC14_SND4 3786 -#define SND_14_007 3789 -#define SND_16_005 3820 -#define SND_16_016 3836 -#define SND_16_027 3847 -#define SND_16_038 3858 -#define SND_17_004 3863 -#define SND_17_015 3879 -#define SND_17_026 3890 -#define QU_SC22_SND1 3984 -#define QU_SC24_SND3 4038 -#define SND_24_008 4043 -#define QU_SC26_SND5 4086 -#define SND_26_006 4087 -#define SND_28_004 4146 -#define ANI_BOOT_1 4231 -#define QU_SC28_FALLGRIT 4265 -#define MSG_SC28_TURNON_3 4274 -#define SND_29_003 4332 -#define QU_SC33_SND1 4438 -#define QU_SC35_SND3 4501 -#define SND_35_008 4506 -#define SND_35_019 4517 -#define MV_RHT_DENY 2561 -#define PIC_MNU_SAVE_D 4629 -#define PIC_MSV_5_L 4664 -#define ST_BRD28_RIGHT 4681 -#define SND_29_014 4348 -#define MSG_SC29_LAUGH 4760 -#define MSG_SC14_RESTORESCROLL 4769 -#define ST_RNG_CLOSED2 4865 -#define MV_LFT_FROMU 4881 -#define MV_LFT_FROMD 4882 -#define QU_GLV28_GOR 4957 -#define QU_KBK32_GO 4977 -#define SC_11 654 #define SC_22 1547 -#define SND_25_029 5174 -#define PIC_MNU_MUSICSLIDER_D 4914 -#define rMV_MAN_LOOKUP_EYES 5207 -#define PIC_SC1_PRIMUS 837 -#define PIC_MAP_A08 5270 -#define PIC_INV_MAP_H 5325 -#define PIC_IN1_GAMETITLE 5169 -#define PIC_MAP_S07 5229 -#define PIC_MAP_S1819 5240 -#define PIC_MAP_S29 5251 -#define PIC_MAP_H35 5389 -#define PIC_MAP_H24 5378 -#define PIC_MAP_H13 5369 -#define PIC_MAP_H02 5358 -#define SND_26_018 5340 -#define SND_16_039 5336 -#define PIC_SC20_DTRUBA 3741 -#define SC_5 305 -#define SC_34 2068 -#define SND_INTR_007 5152 -#define SND_FIN_013 5085 -#define MV_FNHND5_SHOW 5053 -#define PIC_SC35_UTRUBA_R 4987 -#define MSG_SC30_TESTFLIES 4962 -#define QU_BRD16_GOL 4952 -#define QU_BRD17_TURNL 4950 -#define rMV_BRDCMN_TURN_RL 4947 -#define PIC_CSR_ARCADE1 4901 -#define PIC_INV_MUGFULL_H 4811 -#define PIC_INV_HANDLE_H 4806 -#define PIC_INV_DOMINO_H 4795 -#define PIC_INV_CARPET_H 4793 -#define MV_DRP25_TOFLOOR 3500 -#define MV_TBL_WALKL 4700 -#define SND_29_026 4690 -#define MV_MAN35_TAKECARPET 4595 -#define MV_BTN27_NORM 4580 -#define SND_37_007 4547 -#define SND_36_008 4532 -#define QU_SC36_SND5 4529 -#define QU_SC34_SND3 4463 -#define SND_28_016 4325 -#define MSG_SC34_ONCACTUS 2482 -#define MV_CTS_DEFAULT 4299 -#define QU_SC28_TIOTIA 4294 -#define MV_LEG_DENY_POT2 4285 -#define SND_38_028 4195 -#define SND_38_017 4184 -#define QU_SC38_DOMINOKICK 4181 -#define SND_38_006 4171 -#define SND_27_039 4140 -#define SND_27_028 4129 -#define SND_27_017 4118 -#define SND_27_006 4107 -#define SND_25_019 4072 -#define SND_25_008 4061 -#define QU_SC25_SND5 4058 -#define QU_SC23_SND3 4021 -#define QU_SC21_SND1 3955 -#define SND_19_014 3927 -#define SND_19_003 3911 -#define SND_18_004 3899 -#define SND_15_007 3809 -#define SND_13_009 3754 -#define QU_SC12_SND3 3723 -#define QU_SC10_SND1 3667 -#define QU_SC8_SND1 3635 -#define SND_7_021 3601 -#define SND_7_010 3590 -#define SND_6_033 3572 -#define SND_6_022 3561 -#define SND_6_011 3548 -#define SND_5_023 3532 -#define SND_3_014 3521 -#define ST_WMN28_READY 3442 -#define MV_MAN21_TAKEBROOM 3438 -#define MV_CLN_DENY_BROOM 3437 -#define MV_BRD_FALLTHREAD 3421 -#define MV_BTH_1_0 3366 -#define ST_VNT26_RIGHT2 3348 -#define ST_CDI_EYE 3310 -#define SND_5_001 3142 -#define QU_TEST2 3304 -#define MV_GRL_LAUGH_POPA 3278 -#define QU_STR_THROWGLASSES 3201 -#define SND_4_013 3128 -#define SND_3_003 3102 -#define SND_2_015 3097 -#define SND_2_004 3086 -#define SND_CMN_008 3078 -#define SND_1_005 3069 -#define MSG_SC13_TESTCLOSE 3065 -#define ST_NTL_NORM 3029 -#define ANI_STEP_8 2971 -#define MV_CST_DENY 2967 -#define ST_MOM4_SIT 2956 -#define MV_MOM4_LOOKBAG 686 -#define MV_PMS_CHANGE 2939 -#define ST_FCN17_NORM 2862 -#define QU_SC30_ENTER_LIFTDOWN 2826 -#define ST_LBN_5H 2799 -#define MV_LBN_4H 2796 -#define LIFTBTN_4 2784 -#define QU_SC34_ENTER_DEBUG 2380 -#define QU_LEG_MOVE3 2351 -#define MV_MAN30_PUT1 2340 -#define MV_MAN30_PUT1_EMPTY 2339 -#define ST_DMN38_NORM4 2253 -#define QU_GLV_TAKEDOMINO 2170 -#define ANI_SHELL_GREEN 2116 -#define MV_MAN29_JUMP 2090 -#define QU_DRV_LOOKLEFT 2032 -#define MV_DRV_FROMRIGHT 2014 -#define MV_DRV_FROMLEFT_V 2011 -#define MV_DRV_DRIVE 2004 -#define MV_DRV_TOCYCLE 1995 -#define ST_LUK26_OPEN 1973 -#define MV_LUK26_1_2 1972 -#define QU_SC25_BACKTOLADDER 1955 -#define ST_BRD25_RIGHT2 1902 -#define PIC_SC21_MONETOPR 1808 -#define MV_BOX2_FLIP 1693 -#define rMV_MANEGBR_EGG2COIN 467 -#define ST_KSL_MAN 1503 -#define MSG_SC18_SHOWGIRLJUMPTO 1499 -#define ST_BOY18_FLYFROM 1479 -#define MV_KSL_CALMDOWN 1476 -#define ST_KSL_REACT 1474 -#define ANI_KRESLO 1459 -#define MV_MAN_HMRKICK_COINLESS 1445 -#define MV_SMG_HANDSUP 1402 -#define ST_WHR13_SPIN 1385 -#define PIC_SCD_19 1319 -#define MV_GRD2_MORG1 1283 -#define QU_SC13_SHOWGUM 1216 -#define MV_MAN13_GIVEGUM 1192 -#define MV_MAN_STARTLADDERD 457 -#define QU_SC3_ENTER_LIFTDOWN 1059 -#define MV_SLN_POT_PLAY 1046 -#define ST_SC2_BOX_default 1022 -#define MV_MAN10_TAKEGUM 967 -#define MV_GLT_FLYAWAY 931 -#define MV_GLT_CLOSE 929 -#define MV_INV_APPLE_default 879 -#define MV_INV_HANDLE_default 894 -#define ANI_INV_OLDAPPLE 392 -#define MV_SLN_POT_MORG2 840 -#define QU_MOM_MORG 826 -#define MV_MAN8_BADLUCK 783 -#define PIC_SCD_7 733 -#define QU_MOM_JUMPBK 671 -#define MV_MANHDL_HANDLEDOWN 630 -#define QU_SC4_MANTOLADDER 617 -#define MSG_TAKEKOZAW 611 -#define MV_MAN_LOOKLADDER 520 -#define QU_SC1_EGBRHEADUP 511 -#define MV_PNK_WEIGHTRIGHT 502 -#define rMV_EGBR_RAISEHEAD 463 -#define ST_MAN_STANDLADDER 453 -#define MV_MANEGTR_GIVESEGGF 416 -#define PIC_SC3_LTRUBA 413 -#define ST_EGTR_FATSORROW 355 -#define ANI_DADAYASHIK 306 -#define MV_MANEGTR_TAKESCOIN 394 -#define PIC_SC4_RTRUBA 507 -#define QU_KZW_GOEDGE1 571 -#define QU_SC4_HANDPUSH 596 -#define MSG_SC6_BEARDEDTAKEBALL 683 -#define QU_CST_SPINHANDLE 722 -#define QU_SCD_ENTER 735 -#define MV_MAN8_JUMP 775 -#define MV_MAN_HANDSUP 776 -#define ANI_HOOLIGAN 808 -#define QU_HGN_OPENLUKE 824 -#define MV_INV_OLDEGG_default 365 -#define ST_PBAR_START 898 -#define QU_SC9_BALLEXPLODE 938 -#define MV_NDV_MORG 947 -#define PIC_SC07_PANEL 1002 -#define MV_MAN_TAKEHANDLE 1040 -#define ST_POT_NORM 1047 -#define MV_MAN_STOPR 328 -#define MV_KCH_MOVE2 1099 -#define QU_SC11_RESTARTMAN 1134 -#define MV_MAN11_GUM2VANTUZ 1145 -#define ST_INV_GUM_default 1156 -#define ST_INV_VANTUZ_default 1159 -#define MV_STR_SHOW 1179 -#define MSG_SC14_SHOWBALLGMAHIT 1259 -#define PIC_SC15_DTRUBA 1263 -#define PIC_SC15_UTRUBA 1264 -#define MV_MAN13_HANDLEUP 1377 -#define ST_BDG_OPEN2 1381 -#define PIC_SC1_KUCHKA 1321 -#define ANI_INV_EGGAPL 1564 -#define ST_INV_EGGBOOT_default 1572 -#define ANI_INV_EGGGLS 1573 -#define MSG_SC3_TAKEEGG 1583 -#define MV_CND_7_8 1718 -#define ST_CND_8 1719 -#define PIC_SC23_BOXCLOSED 1728 -#define PIC_SC23_BTN1 1729 -#define MV_MAN21_INSERTHANDLE 1744 -#define ST_INV_STOOL_default 1782 -#define QU_SC25_ENTERUP_FLOOR 1904 -#define ANI_INV_LOPAT 1920 -#define QU_SC26_AUTOCLOSE2 1950 -#define ANI_HANDLE23 1978 -#define MV_GRFM_PODMYSHA 1984 -#define ANI_ASS 2120 -#define MSG_SC29_SHOOTRED 2137 -#define MV_SHR_HITMAN 2149 -#define ANI_MALYSH 2165 -#define ANI_HAMMER38 2194 -#define ST_HMR38_NORM 2196 -#define MV_DMN38_NORM 2201 -#define MSG_SC38_HMRKICK 2224 -#define ST_FFT_PIPEFLOW 2241 -#define QU_FFT_PIPE_FLOWOPEN 2307 -#define PIC_SC30_RTRUBA 2355 -#define ANI_GRANDMA_20 2427 -#define MV_GMA20_FLR_BLINK 2428 -#define MV_GMA20_STL_BLINK 2431 -#define QU_SC20_ENTER_RIGHT 2453 -#define MV_CTS31_GROWMAN 2457 -#define MV_PDV_CUT_BLINK 2527 -#define MV_INV_STOPPER_default 2536 -#define QU_PDV_SML_BLINK 2553 -#define QU_PDV_LRG_BLINK 2555 -#define QU_SC36_ENTER_LEFT 2564 -#define QU_GRD37_BLINK 2595 -#define QU_GRD37_LOOKL 2597 -#define QU_RHT_BLINK 2599 -#define MV_DMN01_default 2616 -#define ANI_VENT_33 2637 -#define MV_MAN33_HANDLEDOWN 2642 -#define MSG_SC33_POUR 2645 -#define ST_TSTB_NORM 2661 -#define ST_GRT6_NORM 679 -#define ST_BTS11_ONE 2706 -#define MV_TBE33_NORM 2716 -#define ST_JET17_EMPTY 2748 -#define QU_SC34_EXITLIFT 2820 -#define QU_EGTR_MD2_OBL 2880 -#define QU_MOM_TOLIFT 2902 -#define QU_MOM_PUTBALL 2903 -#define MV_MAN3_GIVEEGG_2 2908 -#define MV_INV_EGGBLACK_default 2919 -#define QU_VSN_TURNL 2997 -#define MV_MAN6_TRYHANDLE 3009 -#define MV_GUM_NORM 976 -#define ANI_PACHKA2 3008 -#define SND_4_002 3117 -#define SND_5_012 3153 -#define SND_CMN_019 3166 -#define MSG_SC3_HIDEDOMINO 3177 -#define MV_HDL_BREAK 3341 -#define ANI_DROP_26 3345 -#define QU_MAN_DEF_STARTSHOES1_R 3389 -#define MV_SWR_DENY 3428 -#define MV_MAN_CLEANNOSE 3374 -#define SND_4_024 3466 -#define MV_GRFM_0_1 3471 -#define QU_GRFU_CLOSEEYES 3479 -#define SND_8_020 3630 -#define QU_SC9_SND2 3646 -#define QU_SC11_SND2 3686 -#define QU_SC13_SND4 3749 -#define QU_SC14_SND5 3787 -#define SND_14_008 3790 -#define SND_16_006 3826 -#define SND_16_017 3837 -#define SND_16_028 3848 -#define SND_17_005 3864 -#define SND_17_016 3880 -#define SND_17_027 3891 -#define QU_SC22_SND2 3985 -#define QU_SC24_SND4 4039 -#define SND_24_009 4044 -#define SND_26_007 4088 -#define SND_28_005 4147 -#define MV_CLN_BLINK1 4208 -#define ANI_BOOT_17 4220 -#define SND_1_016 4234 -#define MSG_SC28_CLICKLIFT 4258 -#define MSG_SC28_TURNON_4 4281 -#define QU_MAN32_LOOKBACK 4304 -#define SND_29_004 4333 -#define SND_29_015 4349 -#define QU_SC32_SND1 4397 -#define QU_SC33_SND2 4439 -#define QU_SC35_SND4 4502 -#define SND_35_009 4507 -#define MV_GRT38_NORM 4574 -#define QU_SC38_SHOWGRIT 4576 -#define PIC_MNU_AUTHORS_D 4623 -#define PIC_MSV_6_L 4665 -#define MSG_SC28_MAKEFACES 4684 -#define ST_EYE_EMPTY 4714 -#define ST_KBK_GOR 4965 -#define MSG_SC37_EXITLEFT 5006 -#define SND_FIN_002 5008 -#define ST_FN4MAN_BEFORE 5099 -#define SC_12 655 #define SC_23 1548 -#define PIC_IN1_NAKL 5132 -#define SND_INTR_018 5177 -#define MSG_SC5_BGRSOUNDON 5314 -#define QU_SC19_ENTER_RIGHT 5319 -#define PIC_MAP_A09 5271 -#define PIC_MAP_I01 5295 -#define MSG_SC33_UPDATEKUBIK 5346 -#define PIC_MAP_S08 5231 -#define PIC_MAP_H36 5390 -#define PIC_MAP_H25 5379 -#define PIC_MAP_H14 5370 -#define PIC_MAP_H03 5359 -#define MSG_SC28_LIFT6INSIDE 5354 -#define SND_26_019 5341 -#define QU_EGTR_FATASK 5334 -#define PIC_CSR_ITN_RED 5329 -#define PIC_SC33_ZONES 5298 -#define SND_INTR_019 5220 -#define QU_HND17_BACK 5216 -#define PIC_IN1_PIPETITLE 5167 -#define SC_6 649 -#define SC_35 2069 -#define SND_INTR_008 5153 -#define SND_FIN_014 5086 -#define MV_FNFNG_MOVE 5063 -#define ANI_FN3_FINGERS 5062 -#define MV_FNHND3_SHOOT 5060 -#define SND_37_008 5013 -#define PIC_SC17_LADDER2 2749 -#define QU_SC35_TRYFLY 4984 -#define MSG_SC33_TRYKUBIK 4980 -#define QU_BRD16_FLYR 4953 -#define QU_EGG6_GOR 4935 -#define ANI_FLY 4916 -#define PIC_CSR_ARCADE2 4902 -#define SC_COMMON 321 -#define PIC_INV_PIPE_C 4847 -#define PIC_INV_LEVERHANDLE_H 4807 -#define PIC_INV_BROOM_H 4792 -#define PIC_INV_BOTTLE_H 4789 -#define MSG_MNU_EXITMENU 4633 -#define ST_SCR36_LEFT 4609 -#define ST_INV_CARPET_default 4598 -#define MV_PDV_SML_DENY 4585 -#define MV_MAN26_KNOCKMUG 4559 -#define MV_MAN26_TAKESOCK 4558 -#define SND_36_009 4533 -#define QU_SC34_SND4 4464 -#define QU_SC31_SND1 4384 -#define SND_28_017 4326 -#define QU_SC34_FROMCACTUS 4312 -#define ST_VNT34_UP2 4310 -#define MV_MAN34_TURNVENT_L 4307 -#define QU_SC17_FILLBOOT 4237 -#define SND_38_029 4196 -#define SND_38_018 4185 -#define SND_38_007 4172 -#define SND_27_029 4130 -#define SND_27_018 4119 -#define SND_27_007 4108 -#define SND_25_009 4062 -#define QU_SC23_SND4 4022 -#define QU_SC21_SND2 3956 -#define SND_19_015 3928 -#define SND_19_004 3912 -#define SND_18_005 3900 -#define SND_15_008 3810 -#define QU_SC12_SND4 3724 -#define QU_SC10_SND2 3668 -#define QU_SC8_SND2 3636 -#define QU_SC7_SND1 3606 -#define SND_7_022 3602 -#define SND_7_011 3591 -#define SND_6_034 3573 -#define SND_6_012 3549 -#define SND_6_001 3538 -#define SND_5_024 3536 -#define SND_4_025 3529 -#define SND_3_015 3522 -#define rMV_MAN25_ROWHAND 3492 -#define QU_SC25_BEARDED 3425 -#define ST_MUG17_DROP 3413 -#define ST_MAN_RIGHT 325 -#define MV_VNT26_TURNU 1931 -#define MV_CLN_DENY 2290 -#define ST_KZW14_EMPTY 3263 -#define SND_4_014 3129 -#define SND_3_004 3103 -#define SND_2_016 3098 -#define SND_2_005 3087 -#define SND_CMN_009 3079 -#define SND_1_006 3070 -#define MSG_SC4_MANTOBOTTLE 2852 -#define ST_LBN_4H 2797 -#define MV_LBN_3H 2794 -#define LIFTBTN_5 2785 -#define QU_SC17_FILLMUG 2750 -#define QU_SC9_BREAKGRIT 2723 -#define PIC_SC32_KADKABACK 2669 -#define QU_SC15_ENTER_LEFT 2651 -#define MSG_SC34_LEAVEBOARD 2576 -#define MV_MAN34_BOARD_FROM 2549 -#define MV_MAN35_TAKESTOPPER 2512 -#define QU_LEG_MOVE4 2352 -#define MV_MAN30_PUT2 2342 -#define MV_MAN30_PUT2_EMPTY 2341 -#define MV_FLG_STOPR 2265 -#define QU_SC38_ENTER_UP 2227 -#define ST_MAN29_RUNR 2140 -#define PIC_SC28_RTRUBA 2073 -#define QU_DRV_FROMLEFT 2036 -#define PIC_SC27_LTRUBA 1914 -#define MV_BRM_FALL 1764 -#define ANI_BROOM 1763 -#define ST_MSH_SIT 1756 -#define ANI_TABURETTE 1745 -#define ST_INV_SOCK_default 1700 -#define QU_SC6_SHOWHANDLE 1689 -#define QU_GRFU_CHMOKUP 1670 -#define QU_GRFU_BLINKLEFT 1666 -#define rMV_MANEGBR_EGG2BOOT 466 -#define MV_CDI_0_1 1544 -#define ST_CDI_NOSUGAR 1542 -#define ST_CDI_EMPTY 1531 -#define MSG_SC18_MANREADY 1507 -#define MV_KSL_INMAN 1504 -#define MV_KSL_JUMPGIRL 1475 -#define MV_KSL_SWINGBOY 1462 -#define MV_SMG_HANDSDOWN 1405 -#define MV_SMG_THROW 1398 -#define ANI_JETTIE 1392 -#define ST_GRL_STAND 1337 -#define ANI_WHIRLIGIG_18 829 -#define PIC_INV_FIRECAN 1315 -#define PIC_SC14_DFLOOR 1241 -#define MSG_SC13_EATGUM 1219 -#define MV_MAN5_FALL 1165 -#define MV_KCH_START 1121 -#define MSG_SC1_UTRUBACLICK 1100 -#define ST_LFT_OPEN_NEW 1071 -#define PIC_INV_POT 985 -#define MSG_SC9_FLOWN 943 -#define GRID_TEST 937 -#define MV_GLT_OPEN 927 -#define ST_INV_APPLE_default 880 -#define MV_INV_OLDHANDLE_default 796 -#define ANI_INV_HANDLE 893 -#define PIC_SCD_8 756 -#define ST_BTT_SLEEPS 748 -#define ST_BTT_CHESHET 746 -#define PIC_SC7_RTRUBA 710 -#define ST_BRD_EMPTY 693 -#define PIC_SC6_LTRUBA 667 -#define MV_MANOTM_GLASSES2BOX 629 -#define MSG_GOTOLADDER 618 -#define ST_CLK_BUTTON 593 -#define ANI_CLOCK 588 -#define ST_MAN_DOWN 479 -#define MV_EGTR_FATEAT 350 -#define MV_EGTR_SLIM2SORROW 339 -#define MV_DYAS_TOUS 311 -#define MV_EGTR_FROMSLAPPING 349 -#define MSG_RAISEPLANK 547 -#define ST_KZW_BOTTLERIGHT 574 -#define QU_KZW_GOEDGE2 576 -#define MV_KZW_JUMPUS 582 -#define MV_HND_TAKEBOTTLE 607 -#define QU_OTM_BOX_SDVIG 646 -#define QU_MOM_SITDOWN 685 -#define MV_HGN_OPENLUKE 809 -#define PIC_INV_OLDHAMMER 405 -#define MV_INV_EGG_default 870 -#define QU_PLV_BREATHE 959 -#define QU_GRD_MORG1 1005 -#define ST_HDL_UP 624 -#define ST_SC4_COIN_default 1030 -#define MV_HDL6_FALL 1041 -#define ST_LFT_OPEN 1050 -#define QU_SC3_ENTER_LIFTUP 1062 -#define QU_SWR_JUMPDOWN 1123 -#define MSG_SC11_MANTOSWING 1128 -#define ST_KCH_EMPTY 1132 -#define MV_MAN5_VNT2BOX 1162 -#define ST_STR_LEFT 1175 -#define MV_STR_TURNR 1176 -#define ST_GMS_BOOT 1270 -#define QU_SC16_ENTER_DOWN 1295 -#define QU_KAR_SPIN 1307 -#define ST_MUG_EMPTY 1298 -#define ST_MUG_FULL 1360 -#define ST_INV_BOTTLE_default 1420 -#define QU_SC17_SHOWBOTTLE 1429 -#define MSG_SC4_CLICKLADDER 1439 -#define MSG_SC18_SHOWGIRLJUMP 1496 -#define MV_HND17_1_0 1558 -#define MV_INV_EGGGLS_default 1574 -#define MV_GFA_GREET 1593 -#define MV_GFA_GREETSOCK 1594 -#define QU_GFA_CHESHETSOCK 1609 -#define PIC_SC22_FLOOR 1621 -#define PIC_SC23_DTRUBA 1626 -#define MV_GRFU_CHMOKCYCLE 1658 -#define MV_GRFU_CHMOKLEFT 1660 -#define MV_GRFU_LOOKDOWN 1688 -#define QU_DYAS_OPENBOX_LIES 1691 -#define ST_CND_9 1721 -#define PIC_SC23_BTN2 1730 -#define MV_MAN21_HANDLEDOWN 1805 -#define rMV_MAN_TOTRUBAVER2 1833 -#define QU_SC26_AUTOCLOSE3 1951 -#define MV_CHI_MOTION 1962 -#define QU_CHI_MOVE 1963 -#define QU_CHI_HIDE 1965 -#define MV_LUK23_1_2i 1976 -#define ST_GRFM_NORM 1983 -#define MSG_SC27_CLICKBET 2048 -#define MV_BTA_HILITE 2051 -#define MV_ASS_SIT 2125 -#define rMV_ASS_SIT 2127 -#define MV_SHG_HITMAN 2147 -#define MV_GLV_DRINK 2162 -#define MV_DLD_DENY 2176 -#define MV_MAN38_PUTDOMIN 2187 -#define QU_SC38_SHOWBOTTLE 2199 -#define QU_GLV_TOSMALL 2208 -#define QU_MLS_HAND 2223 -#define MV_FFT_TUBE_FLOW 2234 -#define MV_FFT_PIPE_DENY 2245 -#define ST_DMN38_NORM5 2283 -#define MSG_SC32_STOPFLAG 2311 -#define QU_SC30_ENTER_RIGHT 2357 -#define QU_GMA20_STL_BLINK 2445 -#define QU_GMA20_FLR_BLINK 2448 -#define QU_GMA20_FLR_LOOK 2449 -#define ST_CTS_GROWUP 2467 -#define ANI_VENT_34 2473 -#define QU_SC34_SHOWBOX 2501 -#define ANI_BOARD_34 2506 -#define ANI_INV_SCISSORS 2532 -#define QU_PDV_LRG_TRY 2556 -#define MSG_SC34_TESTVENT 2557 -#define QU_SC36_ENTER_RIGHT 2563 -#define QU_GRD3_BLINK1 2585 -#define ANI_INV_MUGFULL 2633 -#define MV_TST31_FLOW 2653 -#define MV_STR_PLUUAPLE 2682 -#define rMV_MAN_TAKECOIN 2695 -#define ST_MUG17_FULL 2740 -#define QU_SC14_ENTERLIFT 1225 -#define MV_MAN_TOTRUBAHOR2 2839 -#define MSG_SC4_KOZAWFALL 2858 -#define MV_EGTR_MD1_OBL 2865 -#define MV_MAN3_GIVEEGG_3 2909 -#define MV_MAN3_TAKEEGG_2 2912 -#define PIC_INV_EGGBLACK 2921 -#define MV_DRP3_DROP2 2922 -#define MV_EGTR_FATDENY 2934 -#define ANI_GRIT1 2961 -#define QU_SC8_STANDUP 2975 -#define SND_4_003 3118 -#define SND_5_002 3143 -#define SND_5_013 3154 -#define PIC_SC15_LADDER 3253 -#define MV_CLN_BLINK2 3325 -#define QU_MAN_DEF_STARTSHOES2_R 3397 -#define MV_MAN17_GIVEHMR 3431 -#define MV_GFA_DENY 3435 -#define SND_8_010 3620 -#define SND_8_021 3631 -#define QU_SC9_SND3 3647 -#define QU_SC11_SND3 3687 -#define QU_SC13_SND5 3750 -#define SND_14_009 3791 -#define SND_16_007 3827 -#define SND_16_018 3838 -#define SND_16_029 3849 -#define SND_17_006 3870 -#define SND_17_017 3881 -#define SND_17_028 3892 -#define QU_SC20_SND1 3934 -#define QU_SC22_SND3 3986 -#define QU_SC24_SND5 4040 -#define SND_26_008 4089 -#define SND_28_006 4153 -#define QU_CLN_BLINK1 4209 -#define PIC_SC28_FRAME1 4262 -#define SND_29_005 4334 -#define SND_29_016 4350 -#define QU_SC32_SND2 4398 -#define QU_SC33_SND3 4440 -#define QU_SC35_SND5 4503 -#define SND_1_017 4548 -#define QU_SC34_SHOWBOX_FLOOR 4566 -#define QU_MID_CLEANVENT 4583 -#define PIC_MLD_OK_D 4646 -#define PIC_MSV_7_L 4666 -#define SND_29_027 4757 -#define MV_SHD_CMN 4860 -#define MSG_SC35_STOPFLOW 4864 -#define PIC_CSR_ITN_INV 4894 -#define QU_BRD28_GOL 4960 -#define MSG_SC28_TRYVTORPERS 4961 -#define MV_KBK_FROMTRUBA 4970 -#define SND_32_040 4998 -#define SND_FIN_003 5009 -#define MV_FNHND1_SCRUB 5029 -#define MV_FN4MAN_ENTER 5098 -#define SC_13 1137 #define SC_24 1549 -#define PIC_MSV_DOT_L 5189 -#define PIC_SC23_UTRUBA 1627 -#define PIC_SC24_LADDERD 1826 -#define MV_HND17_0_1 5215 -#define MV_MAN23_TRYHANDLE 5308 -#define PIC_MAP_I02 5296 -#define PIC_MAP_S09 5230 -#define PIC_MAP_I03 5395 -#define PIC_MAP_H37 5391 -#define PIC_MAP_H26 5380 -#define PIC_MAP_H15 5371 -#define PIC_MAP_H04 5360 -#define QU_SC22_ENTER_DOWNTOUP 5327 -#define MV_MAP_NORM 5322 -#define PIC_MEX_CANCEL 5302 -#define MSG_SC22_CRANEOUT_GMA 5218 -#define MSG_SC34_RETRYVENT 5210 -#define SND_CMN_070 5199 -#define SC_7 650 -#define SC_36 2070 -#define SND_INTR_009 5154 -#define MV_IN1CLK_HIDE 5131 -#define SND_FIN_015 5087 -#define MV_FNHND3_SHOW 5037 -#define MSG_FIN_STARTFINAL 5025 -#define MV_MANFIN_TAKECOIN 5020 -#define QU_TTA9_GOL 4937 -#define PIC_CSR_ARCADE6_D 4908 -#define PIC_CSR_ARCADE3 4904 -#define MSG_BRD_TURN 4877 -#define PIC_INV_COIN_C 4831 -#define PIC_INV_BOTTLE 1424 -#define PIC_INV_BOARD 1245 -#define ANI_INV_CARPET 4596 -#define QU_SC34_SND5 4465 -#define QU_SC31_SND2 4385 -#define SND_28_018 4327 -#define ST_BOX34_MAIN2 4306 -#define ST_TTA_DOWN 4288 -#define QU_SC25_MANTOTRUBA_R 4218 -#define ST_BAL14_TOGMA 3199 -#define SND_38_019 4186 -#define SND_38_008 4173 -#define SND_27_019 4120 -#define SND_27_008 4109 -#define QU_SC21_SND3 3957 -#define SND_19_005 3913 -#define SND_18_006 3906 -#define SND_15_009 3811 -#define QU_SC12_SND5 3725 -#define QU_SC10_SND3 3669 -#define QU_SC8_SND3 3637 -#define QU_SC7_SND2 3607 -#define SND_7_023 3603 -#define SND_7_012 3592 -#define SND_7_001 3581 -#define SND_6_035 3574 -#define QU_SC6_FALLHANDLE 2995 -#define SND_6_013 3550 -#define SND_6_002 3539 -#define SND_5_025 3537 -#define SND_3_016 3523 -#define MV_MAN_STANDUP 1166 -#define QU_MAN_DEF_STOPSHOES1 3381 -#define QU_MAN_DEF_SITDOWN 3377 -#define MV_BTH_2_1 3364 -#define QU_SC27_SHOWVENT 2060 -#define MV_HDLL_RAISE 3329 -#define MV_KZW14_HIDE 3269 -#define rMV_STR_DENY 3209 -#define MV_MAN38_PUTBOTTLE_FULL 3170 -#define SND_4_015 3130 -#define SND_3_005 3104 -#define SND_2_017 3099 -#define SND_2_006 3088 -#define SND_1_007 3071 -#define QU_SC8_FALLSTEP 2977 -#define ST_MOM_EMPTY 2952 -#define MSG_SC4_COINOUT 2895 -#define rMV_MAN_TAKEBOOT 2883 -#define QU_SC6_ENTERLIFT 1054 -#define ST_LBN_3H 2795 -#define MV_LBN_2H 2792 -#define LIFTBTN_6 2786 -#define MSG_LIFT_TESTDOOR 1064 -#define QU_SC3_ENTERLIFT 2779 -#define ST_LBN_9N 2777 -#define ST_GRT14_GRIT 2727 -#define MV_GRT14_FALL 2725 -#define QU_SC6_FALLGRIT 2696 -#define MSG_SC34_ONBOARD 2550 -#define QU_SC34_FROMSTOOL 2491 -#define MV_MAN20_TAKESTOOL 2462 -#define ANI_INV_POTTIE 2390 -#define PIC_SC34_UTRUBA1 2377 -#define ST_MAN32_SIT 2277 -#define ST_FLG_RIGHT 2264 -#define ST_FLG_NORM 2259 -#define rMV_MAN29_PUSHASS 2146 -#define MSG_SC29_SHOOTGREEN 2119 -#define MV_SHG_NORM 2117 -#define MSG_SC27_STARTWIPE 2057 -#define QU_MID_SWAB 2041 -#define QU_DRV_GIVEVENT 2040 -#define QU_DRV_FROMRIGHT2 2039 -#define MV_MID_SWITCHBACK 2018 -#define ANI_MAID 2015 -#define MSG_SC26_SHOWVENT 1946 -#define ST_MAN25_ROW 1881 -#define PIC_SC26_UTRUBA 1863 -#define QU_MSH_MOVE 1812 -#define QU_MSH_CRANEOUT 1811 -#define ST_HDL22_EMPTY 1761 -#define MSG_SC23_SPINWHEEL1 1740 -#define QU_GRFB_TAIL 1642 -#define ST_GRFB_HANG 1638 -#define PIC_SC23_FLOOR 1631 -#define MV_CDI_DRYG 1534 -#define QU_GRD_LOOKRIGHT 998 -#define ST_GRL18_WALKFROM 1487 -#define ANI_BRIDGE 1378 -#define MSG_SC16_MUGCLICK 1366 -#define MV_BOY_GOOUT 1334 -#define ST_INV_FIRECAN_default 1314 -#define ST_HDLR_DOWN 1199 -#define ST_SWR_SWING 1115 -#define ANI_KACHELI 1094 -#define PIC_SCD_9 907 -#define PIC_INV_EGG 859 -#define PIC_INV_HAMMER 864 -#define ST_INV_OLDEGG_default 366 -#define PIC_INV_GLASSES 865 -#define ANI_INV_OLDHAMMER 399 -#define ST_INV_OLDBOOT_default 398 -#define ST_INV_OLDAPPLE_default 395 -#define MV_SLN_POT_MOVEBACK 844 -#define QU_HGN_PLUU 815 -#define SC_DBGMENU 726 -#define ANI_HAND 601 -#define MV_MAN_LOOKPLANK 554 -#define MSG_LOWERPLANK 540 -#define MV_MAN_TURN_RD 489 -#define MV_MAN_TURN_RU 485 -#define rMV_MAN_GOR 329 -#define MV_INV_OLDHAMMER_default 400 -#define MV_EGTR_FATOBL 372 -#define MV_EGTR_GIVESMONEY 353 -#define MV_OTM_2_4 438 -#define TrubaLeft 474 -#define MV_KZW_JUMP 558 -#define MV_KZW_TURN 562 -#define MV_KZW_GOR 564 -#define rMV_KZW_GOR 566 -#define PIC_SC4_BOTTLE 568 -#define MV_KZW_JUMPEDGE 581 -#define MV_HDL_MOVEDOWN 623 -#define QU_SC1_ENTER_UP 704 -#define QU_CST_SPINHEADUP 725 -#define QU_BTT_EAT 759 -#define MV_MAN8_DRYGUP 768 -#define PIC_SC12_RTRUBA 855 -#define MV_INV_HAMMER_default 885 -#define PIC_SC2_DTRUBA 841 -#define PIC_SC9_LTRUBA 900 -#define MV_VSN_CYCLE 905 -#define ANI_NADUVATEL 944 -#define MV_GRD_MORG 997 -#define MSG_SC8_ARCADENOW 1044 -#define PIC_SC11_LTRUBA 1119 -#define MSG_SC5_MAKEOTMFEEDBACK 1169 -#define QU_STR_TURNL 1184 -#define MSG_SC16_HIDEMAN 1357 -#define ST_JTI_EMPTY2 1395 -#define QU_GFA_START 1612 -#define ST_GRFU_UP 1648 -#define MV_GRFU_CHMOKUP 1659 -#define MV_GRFG_SHOW 1673 -#define ST_GRFG_EMPTY 1674 -#define ST_GRFG_BALD 1675 -#define MV_CND_8_9 1720 -#define PIC_SC23_BTN3 1731 -#define QU_CLN_ZHMUR 1790 -#define MV_MAN22_FROMSTOOL 1794 -#define MV_MAN21_HANDLEUP 1806 -#define MV_MAN25_TRUBATOBOARD 1892 -#define QU_SC25_MANTOTRUBA 1905 -#define rMV_MAN25_ONBOARD 1966 -#define MSG_SC26_HIDECHI 1967 -#define ST_LUK23_WHANDLE2 1977 -#define QU_GRFM_ASS 1986 -#define MV_MAN27_FLOW 1990 -#define MV_VNT27_LIES 2059 -#define QU_SC25_BACKTOTRUBA 2061 -#define QU_ASS_TAIL 2133 -#define ANI_GLAVAR 2154 -#define MV_MLS_POINT 2183 -#define QU_GLV_LOOKMAN 2212 -#define ANI_FIREFIGHTER 2229 -#define MV_FFT_PIPE_STOPFLOW 2246 -#define MSG_SC32_STARTFLAGLEFT 2310 -#define ST_RHT_CLOSED 2364 -#define ST_POTTIE_default 2392 -#define ANI_HDL32 2394 -#define PIC_SC35_LTRUBA 2406 -#define MV_HZE_FLOW 2425 -#define ST_GMA20_STOOL 2432 -#define ST_STL20_NORM 2465 -#define ST_BRD34_LEFT 2508 -#define ST_BRD34_RIGHT 2509 -#define ST_LUK34_OPEN 2544 -#define MV_PDV_SML_TRY 2552 -#define PIC_SC36_RTRUBA 2560 -#define MV_GRD3_BLINK 2580 -#define MV_GRD3_LOOKL 2583 -#define MV_GRD37_BLINK 2591 -#define MV_GRD37_LOOKL 2593 -#define ANI_GRANDMA_22 2609 -#define MV_VNT33_TURNR 2641 -#define QU_SC35_SHOWHOZECUT 2679 -#define QU_SC9_TEST1 2701 -#define ANI_TUBE_33 2715 -#define MSG_SC29_SHOWLASTRED 2731 -#define PIC_SC3_BORDER 2729 -#define MV_EGTR_MD2_OBL 2870 -#define MV_MAN3_TAKEEGG_3 2911 -#define MV_MAN3_GIVEEGG_4 2913 -#define MV_MAN_TOTRUBAHOR3 2982 -#define MV_MAN_FALLPOPA2 2983 -#define PIC_SC9_URTRUBA 2984 -#define QU_SC9_MANFALL 2986 -#define MV_BTN6_HILITE 2992 -#define MV_NDV_DENY_NOGUM 3022 -#define PIC_CMN_LOAD 3035 -#define SND_4_004 3119 -#define SND_5_003 3144 -#define SND_5_014 3155 -#define ANI_DROP_7 3185 -#define MV_DRP7_DROP 3186 -#define ANI_GRIT2 3189 -#define ST_GRIT2_STUCCO 3191 -#define MSG_SC15_LADDERTOBACK 3259 -#define ST_BTL_EMPTY 3306 -#define MV_DMS_0_1 3318 -#define QU_CLN_BLINK2 3326 -#define MV_MAN11_GIVEGUM_2 3430 -#define MV_MAN22_TRYBOOT 3433 -#define QU_MAN_DEF_SNEEZE 3464 -#define MV_GRFU_KISSOPEN 3477 -#define QU_SC6_SND1 3576 -#define SND_8_011 3621 -#define SND_8_022 3632 -#define QU_SC9_SND4 3648 -#define SND_9_010 3654 -#define QU_SC11_SND4 3688 -#define SND_16_008 3828 -#define SND_16_019 3839 -#define SND_17_007 3871 -#define SND_17_018 3882 -#define SND_17_029 3893 -#define QU_SC20_SND2 3935 -#define QU_SC22_SND4 3987 -#define SND_26_009 4090 -#define SND_28_007 4154 -#define ST_SHD01_0 4204 -#define QU_SC17_SHOWBOOT 4225 -#define ST_BRM_STAND 4226 -#define ST_LFT28_OPEN 4241 -#define QU_SC28_LIFT1_SHOWAFTER 4260 -#define MSG_SC28_TURNON_6 4272 -#define SND_29_006 4340 -#define SND_29_017 4351 -#define QU_SC30_SND1 4364 -#define MV_MAN30_ITCHBROOM 4374 -#define SND_30_010 4375 -#define QU_SC32_SND3 4399 -#define SND_32_030 4426 -#define QU_SC33_SND4 4441 -#define MV_MAN33_PUTMUGFULL 4453 -#define MV_GLV_PUTDOMINO 2158 -#define MV_MAN36_PUTCARPET 4604 -#define PIC_MNU_DEBUG_D 4631 -#define PIC_MSV_8_L 4667 -#define MV_WTR24_FLOWLOWER 1844 -#define PIC_SC11_WND1 4704 -#define ANI_EYE_30 4712 -#define SND_29_028 4758 -#define MSG_SC22_CHECKGMABOOT 4782 -#define PIC_TEST1 4783 -#define QU_LUK26_HIT 4890 -#define MV_KBK_TOTRUBA 4971 -#define SND_19_016 4995 -#define SND_FIN_004 5010 -#define QU_FN4_DOFINAL 5108 -#define ST_IN1MAN_FROM 5123 -#define SC_14 1138 #define SC_25 1550 -#define SC_TITLES 5166 -#define PIC_SC24_LADDERUP 1827 -#define PIC_SC23_LADDER 1628 -#define PIC_SC1_OSK 1018 -#define PIC_MAP_H38 5392 -#define PIC_MAP_H27 5381 -#define PIC_MAP_H16 5372 -#define PIC_MAP_H05 5361 -#define QU_SC22_ENTER_UPTODOWN 5326 -#define MV_MOM_SITDOWN 657 -#define SC_8 651 -#define SC_37 2071 -#define QU_INTR_GETUPMAN 5136 -#define SND_FIN_016 5088 -#define MV_FNHND4_SCRUB 5049 -#define rMV_EGI_GOR 4932 -#define MV_EGI_GOR 4930 -#define PIC_CSR_ARCADE7_D 4910 -#define PIC_CSR_ARCADE4 4905 -#define PIC_INV_EGGBLACK_C 4834 -#define PIC_INV_BOOT_C 4825 -#define SND_31_010 4752 -#define SND_30_011 4376 -#define PIC_MSV_0_D 4643 -#define PIC_MSV_FULL_D 4641 -#define QU_SC31_SND3 4386 -#define SND_28_019 4328 -#define MV_TTA_GOL 4293 -#define ST_STR_GLASSES 3114 -#define MSG_SC9_FROMLADDER 4207 -#define SND_38_009 4174 -#define SND_27_009 4110 -#define QU_SC21_SND4 3958 -#define SND_19_006 3919 -#define QU_SC10_SND4 3670 -#define QU_SC8_SND4 3638 -#define QU_SC7_SND3 3608 -#define SND_7_024 3604 -#define SND_7_013 3593 -#define SND_7_002 3582 -#define SND_6_036 3575 -#define SND_6_025 3564 -#define SND_6_014 3551 -#define SND_6_003 3540 -#define SND_3_017 3533 -#define SND_4_027 3530 -#define SND_2_018 3512 -#define ST_MID_SPADE 3489 -#define MV_MAN_STOPSHOES_1 3376 -#define MV_BTH_GODOWN 3350 -#define QU_CDI_EYE 3314 -#define MV_MAN16_TAKEBOOT 3289 -#define QU_KZW14_HIDE 3274 -#define QU_SC5_SND1 3240 -#define MV_MAN13_THROWGLASSES 3197 -#define SND_4_016 3131 -#define SND_3_006 3105 -#define SND_1_008 3072 -#define QU_STR_HIDE_L 3060 -#define rMV_STR_TURNR 3051 -#define ST_MID11_SWAB 3030 -#define ST_MOM_CYCLEBK 3011 -#define ST_CLK8_NORM 2991 -#define MV_MOM_OPENEMPTY 2946 -#define QU_SC4_MANFROMBOTTLE 2851 -#define QU_SC38_EXITLIFT 2837 -#define ST_LBN_2H 2793 -#define MV_LBN_1H 2790 -#define LIFTBTN_7 2787 -#define ST_LBN_8N 2774 -#define QU_SC11_PUTBOOT1 2709 -#define QU_SC32_FLOWB 2667 -#define QU_SC33_ENTER_LEFT 2620 -#define PIC_SC34_SHADOW 2538 -#define ANI_STOPPER 2515 -#define QU_SC34_ENTER_DOWN 2379 -#define PIC_SC34_UTRUBA2 2378 -#define MSG_SC30_LEAVESCENE 2373 -#define QU_LEG_SHOW1 2347 -#define ST_LEG_UP 2324 -#define MV_MAN38_PUTBOTTLE 2285 -#define MV_ASS_HITGREEN 2138 -#define QU_SC29_MANTO_L 2103 -#define MV_MAN29_RUN 2095 -#define MV_MAN29_FROMPORTER 2094 -#define MV_MAN29_STANDUP 2092 -#define QU_DRV_PUSHBUTTON 2056 -#define ST_MID_SWAB 2017 -#define MV_DRV_FROMLEFT 2012 -#define MV_DRV_GIVEVENT 2006 -#define MV_DRV_TORIGHT 2001 -#define MV_INV_VENT_default 1969 -#define MV_BRD25_RIGHT 1899 -#define QU_WTR24_FLOWLOWER 1953 -#define ST_WTR25_FLOW 1858 -#define ST_LUK23_OPEN 1816 -#define MSG_SC23_SPINWHEEL2 1741 -#define MV_CDI_SHOW 1530 -#define MV_KSL_JUMPMAN 1509 -#define MV_GRL18_JUMPTO 1488 -#define ST_BOY18_WALK 1480 -#define ST_KSL_BOY 1463 -#define MV_SMG_SPINHEAD 1400 -#define rMV_MAN_STANDUP 1291 -#define QU_GRD2_LOOKLEFT 1289 -#define QU_GRD2_BLINK 1287 -#define PIC_SC15_WALL 1286 -#define MV_MAN14_KICKAIR 1256 -#define MSG_SC14_SHOWBALLFLY 1253 -#define MV_MAN14_FALL 1236 -#define MV_SWR_JUMPDOWN 1116 -#define MV_MAN_GOR 327 -#define MSG_SC4_COINPUT 1032 -#define ST_HDL6_default 1011 -#define MV_INV_POT_default 987 -#define ANI_INV_POT 986 -#define MV_BALL9_default 934 -#define MSG_SC5_HANDLEUP 915 -#define SC_LDR 635 -#define MV_INV_DOMINO_default 873 -#define ST_INV_HANDLE_default 895 -#define QU_SLN_POT_MORG 849 -#define MSG_SC7_HIDEBOX 817 -#define MV_BTT_23 747 -#define MV_BTT_12 745 -#define MV_BTT_01 744 -#define PIC_SC5_UTRUBA 701 -#define QU_EGTR_FATOBLRV 534 -#define MV_MAN_TOTRUBAVER 517 -#define ST_MAN_EMPTY 476 -#define MV_OTM_GLS_TURNL 424 -#define ST_EGBR_HEADRAISED 379 -#define ST_DYAS_SITS 308 -#define MV_INV_OLDDOMINO_default 368 -#define PIC_SC2_LADDER 412 -#define MV_MANEGTR_GIVESEGGFAT 417 -#define ST_OTM_VNT_LEFT 434 -#define PIC_TEST2 509 -#define MSG_KOZAWRESTART 546 -#define ST_PNK_WEIGHTLEFT 503 -#define GRID_SC4_LADDER 565 -#define QU_SC4_CLICKBUTTON 610 -#define MSG_UPDATEBOTTLE 613 -#define ANI_HANDLE 622 -#define MV_MOM_PUTBALL 666 -#define QU_BTT_SLEEP 763 -#define MSG_SC8_RESUMEFLIGHT 784 -#define MV_MAN8_TOJUMP 782 -#define ST_LUK_OPEN 806 -#define QU_CST_MORG 818 -#define PIC_INV_OLDDOMINO 371 -#define MV_VSN_TURNRIGHT 955 -#define QU_SC9_ENTER_LEFT 962 -#define MSG_SC9_PLVCLICK 965 -#define MSG_SC6_INSTHANDLE 1012 -#define MV_MAN_LIFTUP 1051 -#define QU_SC6_ENTER_LIFTUP 1069 -#define MV_MAN_STOPD 482 -#define MV_MAN_STOPU 477 -#define rMV_MAN_STOPR 331 -#define PIC_INV_VANTUZ 1161 -#define ANI_STOROZH 1172 -#define ANI_HANDLE_R 1196 -#define ST_GMA_EMPTY 1235 -#define PIC_SC15_RTRUBA 1262 -#define ANI_GRANDMA_ASS 1265 -#define ST_GRD2_STAND 1281 -#define MV_MAN16_DRINK 1354 -#define MSG_HIDEMAN 1356 -#define MV_HND17_TOCYCLE 1450 -#define QU_SC19_ENTER_WHIRLIGIG 1470 -#define MV_INV_EGGDOM_default 1562 -#define ST_GFA_SIT 1590 -#define ST_GRFU_CHMOK 1656 -#define MV_GRFU_TOKISS 1661 -#define MV_GRFG_BLINKBALD 1678 -#define MV_CND_0_1 1703 -#define PIC_SC23_BTN4 1732 -#define ST_CLN_BROOM 1771 -#define QU_SC22_FALLLEVER 1787 -#define PIC_SC24_FLOOR 1825 -#define MV_INV_LOPAT_default 1921 -#define ST_INV_LOPAT_default 1922 -#define MV_MAN25_TAKESPADE 1926 -#define PIC_SC29_LFLOOR 2142 -#define ST_SHG_EMPTY 2148 -#define MV_GLV_DRINK_NOHMR 2163 -#define ST_DLD_SIT2 2173 -#define MV_DLD_BLINK 2175 -#define ST_MLS_RIGHT 2180 -#define QU_SC38_SHOWDOMINO 2203 -#define MV_FFT_PIPE_FLOW 2242 -#define MV_FFT_PIPE_OPENEYE 2243 -#define QU_FFT_PIPE_START 2296 -#define MSG_SC32_STARTFLAGRIGHT 2309 -#define ST_INV_PIPE_default 2319 -#define MV_MAN36_GOIN 2366 -#define ST_GMA20_FLOOR 2429 -#define MV_GMA20_STD_LOOKTRUBA 2438 -#define PIC_SC20_RTRUBA 2439 -#define PIC_SC31_DTRUBA 2441 -#define PIC_SC31_UTRUBA 2442 -#define MV_MAN20_BOOTTOSTOOL 2443 -#define MV_GMA_0_1 2444 -#define QU_SC35_MANRETIRE 2539 -#define MV_GRD3_BLINK1 2581 -#define QU_GRD3_BLINK 2584 -#define QU_GRD3_LOOKL 2586 -#define ANI_RING 2604 -#define QU_SC22_FROMSTOOL_GMA 2612 -#define MV_MUG33_FILL 2624 -#define ST_JTI33_EMPTY 2629 -#define ST_VNT33_RIGHT 2639 -#define ANI_SCISSORS_36 2647 -#define MV_MAN36_TAKESCISSORS 2650 -#define PIC_SC32_VESSELS 2665 -#define MV_HZE_UNCUT 2677 -#define QU_SC3_RELEASEEGG 2680 -#define MSG_SC3_RELEASEEGG 2681 -#define MV_GRT6_BREAK 678 -#define MV_MAN17_PUTMUG 2741 -#define QU_SC17_SHOWMUG 2742 -#define QU_SC35_ENTER_LIFTDOWN 2818 -#define MV_EGTR_MD2_BOLTLEGS 2868 -#define MSG_SC6_JUMPBK 2900 -#define MV_MAN3_TAKEEGG_4 2910 -#define ST_STP8_EMPTY 2981 -#define ANI_BUTTON_6 2988 -#define MV_PCH2_NORM 3020 -#define QU_SC8_ENTER_UP 3036 -#define SND_2_007 3089 -#define SND_4_005 3120 -#define SND_5_004 3145 -#define SND_5_015 3156 -#define ST_DRP7_EMPTY 3187 -#define QU_BTT_CLOCK_SPOON 3196 -#define MV_MAN13_PUTHAMMER 3206 -#define MSG_SC18_CLICKBOARD 3297 -#define MV_DMS_THREE 3321 -#define MV_MAN22_TRYTAKESOCK 3330 -#define MSG_SC23_ONSTOOL 3334 -#define QU_SC23_FROMSTOOL 3338 -#define MSG_SC23_FROMSTOOL 3339 -#define ST_DRP26_NORM 3347 -#define QU_MAN_DEF_STOPSHOES1_DEF 3393 -#define QU_MAN_DEF_STOPSHOES2 3396 -#define PIC_SC26_LADDER 3403 -#define ST_MAN_LADDERDOWN_R 3419 -#define QU_WMN_SHOWAFTER 3457 -#define MV_DRP24_TOFLOOR 3508 -#define QU_DRP24_TOWATER 3509 -#define QU_SC6_SND2 3577 -#define SND_8_001 3611 -#define SND_8_012 3622 -#define SND_8_023 3633 -#define QU_SC9_SND5 3649 -#define SND_9_011 3655 -#define QU_SC11_SND5 3689 -#define SND_16_009 3829 -#define SND_17_008 3872 -#define SND_17_019 3883 -#define QU_SC20_SND3 3936 -#define SND_20_010 3943 -#define QU_SC22_SND5 3988 -#define SND_22_030 4013 -#define SND_28_008 4155 -#define ST_SHD01_1 4205 -#define MV_MAN17_PUTBOOT 4223 -#define MV_LFT28_CLOSE 4242 -#define MV_CTS34_FALLRIGHT 4315 -#define ST_VNT34_RIGHT3 4318 -#define SND_29_007 4341 -#define SND_29_018 4352 -#define QU_SC30_SND2 4365 -#define QU_SC32_SND4 4400 -#define SND_32_020 4416 -#define SND_32_031 4427 -#define QU_SC33_SND5 4442 -#define PIC_MNU_CONTINUE_L 4626 -#define PIC_MSV_9_L 4668 -#define MV_LFT_TRY 4671 -#define ANI_BEARDED_28 4679 -#define PIC_SC11_WND2 4705 -#define MV_EYE30_SHOW 4713 -#define QU_EYE30_BLINK 4721 -#define MSG_SC15_STOPCHANTING 4753 -#define SND_29_029 4759 -#define SND_11_030 4885 -#define MV_GMA20_STD_DENY 4887 -#define SND_CMN_060 4921 -#define MV_BRDCMN_STOPR 4944 -#define rMV_KBK_TOTRUBA 4974 -#define MV_KBK_TURN_RL 4975 -#define SND_FIN_005 5011 -#define ST_FNFNG_BEFORE 5064 -#define MV_IN1MAN_0_1 5122 -#define SC_15 1139 #define SC_26 1551 -#define PIC_SC8_LADDERD 1106 -#define MV_MAN22_TRYBOX 5303 -#define SND_5_026 5316 -#define SND_CMN_071 5317 -#define PIC_SC11_HINT 5170 -#define PIC_MAP_H17 5373 -#define PIC_MAP_H28 5382 -#define PIC_MAP_H06 5362 -#define SND_CMN_072 5352 -#define MV_EGTR_FATASK 5332 -#define PIC_CSR_ITN_GREEN 5330 -#define SND_11_031 5171 -#define SC_9 652 +#define SC_27 1552 +#define SC_28 2062 +#define SC_29 2063 +#define SC_3 303 +#define SC_30 2064 +#define SC_31 2065 +#define SC_32 2066 +#define SC_33 2067 +#define SC_34 2068 +#define SC_35 2069 +#define SC_36 2070 +#define SC_37 2071 #define SC_38 2072 -#define SND_FIN_017 5089 -#define PIC_CSR_ARCADE5 4906 -#define PIC_INV_POT_C 4848 -#define PIC_INV_SUGAR_H 4818 -#define PIC_INV_POTTIE_H 4814 -#define PIC_INV_MUG_H 4809 -#define PIC_INV_GUM_H 4803 -#define PIC_INV_BOTTLEFULL_H 4790 -#define PIC_TEST3 4784 -#define ST_TBE36_NORM 4751 -#define QU_SC28_LIFT0_START 4676 -#define MV_PDV_CUT_DENY 4586 -#define SND_34_030 4490 -#define QU_SC31_SND4 4387 -#define PIC_SC28_FRAME4 4264 -#define QU_SC28_LIFT1_START 4254 -#define ANI_MAN_28 4247 -#define SND_22_031 4002 -#define SND_21_021 3975 -#define SND_21_010 3964 -#define QU_SC21_SND5 3959 -#define SND_19_007 3920 -#define SND_18_008 3908 -#define SND_10_010 3676 -#define QU_SC10_SND5 3671 -#define QU_SC8_SND5 3639 -#define QU_SC7_SND4 3609 -#define SND_7_025 3605 -#define SND_7_014 3594 -#define SND_7_003 3583 -#define SND_6_026 3565 -#define SND_6_015 3552 -#define SND_6_004 3541 -#define SND_3_018 3534 -#define SND_4_028 3531 -#define SND_2_019 3513 -#define QU_SC25_TRYROWHAND_R 3494 -#define QU_MID_SPADE 3490 -#define MV_MAN27_SWAB2SPADE 3487 -#define ANI_BEARDED_CMN 3420 -#define MV_BTH_3_2 3362 -#define ST_VNT26_UP2 1948 -#define ST_GMS_BOOTLESS2 3316 -#define ST_BOY_TEMP 3283 -#define ANI_KOZAWKA_14 3261 -#define QU_SC5_SND2 3241 -#define QU_SC4_SND1 3235 -#define SND_4_017 3132 -#define SND_3_007 3106 -#define SND_2_008 3090 -#define SND_1_009 3073 -#define MSG_SC13_OPENBRIDGE 3064 -#define QU_STR_LTOR 3054 -#define rMV_STR_SHOW 3049 -#define MSG_SC11_HITMAN 3019 -#define MV_MOM_STOPBK 3013 -#define MSG_SC10_LADDERTOFORE 3004 -#define MV_MAN8_SITDOWN 2968 -#define ANI_MAMASHA_4 660 -#define ST_PMS_MINUS 2942 -#define MV_MAN_TOLADDER2 2841 -#define MV_LBN_0H 2834 -#define QU_SC30_ENTER_LIFTUP 2825 -#define ST_LBN_1H 2791 -#define LIFTBTN_8 2788 -#define ST_LBN_9P 2778 -#define ST_LBN_7N 2771 -#define ANI_LIFTBUTTON 2751 -#define QU_SC11_PUTBOOT2 2710 -#define ST_NBL_EMPTY 1078 -#define MV_NBL_OUT 1077 -#define ST_NBL_NORM 1076 -#define QU_SC34_LEAVEBOARD 2575 -#define ST_SPR_NORM 2517 -#define MSG_SC34_UNCLIMB 2492 -#define QU_CTS_BACK 2415 -#define MV_FLG_CYCLEL 2262 -#define QU_LEG_HIDE 2353 -#define QU_LEG_SHOW2 2348 -#define MV_LEG_POT0_MOVE1 2326 -#define MV_MAN29_STANDUP_NORM 2093 -#define MV_MAN29_TOPORTER_L 2087 -#define PIC_SC29_UTRUBA 2080 -#define QU_DRV_LOOKRIGHT 2033 -#define MV_DRV_FROMRIGHT_V 2013 -#define QU_SC26_OPEN1 1935 -#define PIC_SC25_STEP 1894 -#define rMV_MAN25_STARTROW 1889 -#define PIC_SC25_LADDERDOWN 1855 -#define ST_WTR24_FLOW 1836 -#define ST_JET24_FLOW 1839 -#define MV_MSH_CRANEOUT 1757 -#define ANI_MESHOK 1754 -#define MSG_SC23_SPINWHEEL3 1742 -#define ST_GRFB_SIT 1687 -#define PIC_SC22_LTRUBA 1584 -#define ANI_CORDIE 1529 -#define QU_SC19_MANJUMP1 1516 -#define MV_KSL_INBOY 1491 -#define ST_BOY18_WALKTO 1482 -#define MV_KSL_SWINGGIRL 1464 -#define QU_SMG_STARTFINGERS 1406 -#define MV_SMG_DENIES 1401 -#define MSG_SC16_HIDEWIRE 1349 -#define MV_GRL_LAUGH 1343 -#define MV_BOY_GOIN 1329 -#define MV_BAL14_FALL 1258 -#define ST_INV_BALL_default 1244 -#define MSG_SC13_UNEATGUM 1218 -#define QU_SC13_CLOSEBRIDGE 1214 -#define MV_SWR_1_2 1146 -#define ANI_SWINGER 1113 -#define MV_MAN_STOPLADDER 454 -#define MV_MAN9_SHOOT 922 -#define MV_PLV_BREATHE 920 -#define ST_BLK_OPEN 913 -#define PIC_INV_DOMINO 860 -#define ANI_INV_EGG 869 -#define ANI_INV_OLDDOMINO 367 -#define PIC_INV_OLDGLASSES 408 -#define QU_SLN_BOOT_KICK 846 -#define ANI_SLONIK 827 -#define MSG_SC7_SHOWBOX 816 -#define MV_MAN8_DRYGLADDER 787 -#define PIC_SC8_UTRUBA 753 -#define MV_HND_POINT 602 -#define ST_BTN_UP 600 -#define QU_EGTR_FATBOLTLEGS 533 -#define QU_EGTR_SLIMOBL 527 -#define QU_EGTR_SLIMTRAIN 525 -#define QU_EGTR_SLIMTOSORROW 524 -#define rMV_EGBR_KACHAET 461 -#define MV_MANEGTR_TAKESEGG 415 -#define MV_MANDYAS_GIVESCOIN 361 -#define MV_OTM_VNT_BOLTHEAD 433 -#define MV_MANEGBR_EGG2GLASSES 442 -#define QU_SC1_ENTER 320 -#define ST_KZW_PLANK 499 -#define MV_KZW_WALKPLANK 500 -#define MV_KZW_JUMPROTATE 561 -#define MV_KZW_STANDUP 563 -#define QU_OTM_GLS_MORGLEFT 638 -#define QU_OTM_BOX_MORGL 642 -#define QU_OTM_BOX_TURNR 644 -#define ST_MAN8_HANDSUP 773 -#define ST_MAN8_STAND 774 -#define MV_MAN7_BOX2HANDLE 801 -#define MV_VSN_DRYG 957 -#define PIC_SC10_DTRUBA 974 -#define PIC_SC10_LADDER 995 -#define MSG_SC1_SHOWOSK 1019 -#define MV_MAN_TURN_SDL 1084 -#define MV_MAN_TURN_SUL 1087 -#define QU_SWR_SWING 1118 -#define QU_SC13_ENTER_UP 1183 -#define MSG_SC13_SHOWGUM 1215 -#define ST_MAN14_KICK 1238 -#define QU_GMA_BLINK 1252 -#define MV_GMS_0_1 1271 -#define MSG_SC16_SHOWMAN 1358 -#define MSG_SC16_TESTMUG 1359 -#define MV_WHR19_SPIN 1317 -#define QU_SC14_STARTARCADE 1390 -#define ST_HND17_ATTRACT 1451 -#define QU_HND17_ATTRACT 1455 -#define PIC_SC18_RTRUBA 1520 -#define QU_SC21_ENTER_LEFT 1556 -#define ST_INV_EGGGLS_default 1575 -#define MV_GFA_BREATHESOCK 1591 -#define MV_GFA_SWINGSOCK 1597 -#define MV_GFA_TOSWING 1599 -#define QU_SC22_ENTER_DOWN 1620 -#define ST_GRFU_LEFT 1647 -#define QU_SC23_FROMCALENDAREXIT 1735 -#define MV_MAN21_BROOMTOCOIN 1772 -#define PIC_INV_LEVERHANDLE 1784 -#define MSG_SC22_HANDLEDOWN 1796 -#define QU_SC24_ENTER_UP 1830 -#define QU_SC25_TRYWATER 1906 -#define ANI_GIRAFFE_MIDDLE 1981 -#define MV_MAN27_THROWBET 1989 -#define ANI_VENT27 2058 -#define MV_PTR_MOVE 2083 -#define MSG_SC29_ENABLERIDEBACK 2105 -#define MV_STR1_SHOOT 2109 -#define ST_STR1_STAND 2110 -#define ST_ASS_EMPTY 2124 -#define QU_SC29_ESCAPE 2129 -#define ANI_SHELL_RED 2130 -#define MV_GLV_TOSMALL 2160 -#define MV_GLV_LOOKMAN 2167 -#define MV_BTL38_NORM 2189 -#define ANI_DOMINO38 2200 -#define QU_GLV_DRINK_NOHMR 2211 -#define QU_GLV_LOOKMAN_NOHMR 2213 -#define MSG_SC38_POINT 2226 -#define ST_FFT_PIPE 2240 -#define MV_FFT_LOOKFLAG 2247 -#define ST_CTS_EMPTY 2269 -#define MV_LEG_0_1 2343 -#define ANI_ROTOHRUST 2360 -#define MV_MAN32_STARTSPIN 2401 -#define ST_MAN32_SPIN 2402 -#define QU_CTS_GROWMAN 2417 -#define MV_GMA20_STL_NOSE 2433 -#define MV_CTS_CYCLEUP 2469 -#define MV_PDV_CUT_BREATHE 2526 -#define ST_INV_STOPPER_default 2537 -#define ST_GRD3_STAND 2579 -#define ANI_GUARD_37 2588 -#define PIC_INV_MUGFULL 2632 -#define MV_INV_MUGFULL_default 2634 -#define ST_TSTO_NORM 2658 -#define MSG_SC29_SHOWLASTGREEN 2730 -#define MV_MAN17_DRINK 2743 -#define QU_SC4_MANTOBOTTLE 2850 -#define MV_EGTR_MD2_DENY 2871 -#define ST_MOM_LIFT 2894 -#define QU_MOM_STANDUP 2899 -#define QU_VSN_FROML 2999 -#define MV_SWR_SPOLZING_NOVNT 3005 -#define ST_PCH_NORM 980 -#define SND_4_006 3121 -#define SND_5_005 3146 -#define SND_5_016 3157 -#define MV_MAN5_VNT2GLS 3184 -#define MV_MAN6_LOOK 3210 -#define rMV_MAN22_TAKETABUR 3337 -#define MSG_SC27_HANDLERTOFRONT 3371 -#define MV_MAN_STOPSHOES_2 3388 -#define MV_GFA_DENY_NOSOCK 3436 -#define QU_MAN_DEF_CLEAN_R 3463 -#define ST_GRFM_AFTER 3472 -#define QU_GRFU_OPENEYES 3478 -#define MSG_SC26_SHOWCHI 3495 -#define QU_SC6_SND3 3578 -#define SND_8_002 3612 -#define SND_8_013 3623 -#define SND_8_024 3634 -#define SND_9_001 3640 -#define SND_9_012 3656 -#define SND_11_020 3704 -#define SND_17_009 3873 -#define QU_SC20_SND4 3937 -#define SND_20_011 3944 -#define SND_28_009 4156 -#define ST_BRM_LIES2 4227 -#define ST_BOT1_NORM 4233 -#define ANI_LIFT_28 4238 -#define MSG_SC34_SHOWVENT 2481 -#define SND_29_008 4342 -#define SND_29_019 4353 -#define SND_30_001 4359 -#define QU_SC30_SND3 4366 -#define QU_SC32_SND5 4401 -#define SND_32_010 4406 -#define SND_32_021 4417 -#define SND_32_032 4428 -#define QU_SC33_SHOWMUGFULL 4454 -#define ST_BOX34_FLOOR 4565 -#define SC_MAINMENU 4620 -#define PIC_MNU_EXIT_L 4622 -#define PIC_MLD_CANCEL_D 4648 -#define PIC_MSV_1_D 4651 -#define PIC_SC28_DARK0 4675 -#define QU_EYE30_SHOW 4719 -#define MV_LEG31_HIDE 4724 -#define MV_BRDCMN_GOR 4735 -#define SND_CMN_050 4745 -#define MV_BOT15_NORM 4780 -#define PIC_CSR_ITN 4893 -#define SND_CMN_061 4922 -#define rMV_KBK_TURN_RL 4976 +#define SC_4 304 +#define SC_5 305 +#define SC_6 649 +#define SC_7 650 +#define SC_8 651 +#define SC_9 652 +#define SC_COMMON 321 +#define SC_DBGMENU 726 #define SC_FINAL1 4999 -#define SND_FIN_006 5012 -#define ST_FNHND6_AFTER2 5070 -#define SND_FIN_028 5103 -#define MV_IN1MAN_GODOWN 5124 -#define SC_16 1140 -#define SC_27 1552 -#define PIC_MSV_SPACE_D 5190 -#define PIC_SC23_LADDERU 3411 -#define PIC_SC34_DTRUBA 2376 -#define QU_CTS34_FALLRIGHT 4317 -#define PIC_MAP_S31_1 5253 -#define PIC_MAP_H18 5394 -#define PIC_MAP_H29 5383 -#define PIC_MAP_H07 5363 -#define SND_CMN_073 5353 -#define PIC_MOV_OK 5344 -#define SC_MAP 5222 -#define QU_INTR_DUMMY 5168 -#define ST_IN1HAND_AFTER 5116 -#define ANI_IN1MAN 5110 -#define ANI_FN4MAN 5097 -#define SND_FIN_018 5090 -#define SND_FIN_007 5079 -#define ST_FNHND6_AFTER3 5076 -#define QU_FN3_DOFINAL 5072 -#define ST_FNHND5_BEFORE 5054 -#define ST_FCN_NORM 5017 -#define ST_FCN_EMTY 5016 -#define QU_BRD16_TURNR 4949 -#define MSG_SC9_STARTTIOTIA 4942 -#define ANI_EGGIE 4929 -#define SND_CMN_062 4927 -#define PIC_CSR_ARCADE6 4907 -#define SND_8_025 4870 -#define PIC_INV_STOOL_C 4852 -#define PIC_INV_EGGGLS_C 4838 -#define PIC_INV_EGGAPL_C 4833 -#define PIC_INV_APPLE 862 -#define QU_MAN_DEF_LOOKUP 4776 -#define ANI_TUBE_36 4749 -#define QU_LEG31_HIDE 4728 -#define MSG_SC28_TURNOFF_0 4678 -#define QU_DRV_PUSHBUTTON_NOVENT 4578 -#define SND_34_031 4491 -#define SND_34_020 4480 -#define SND_33_010 4447 -#define QU_SC31_SND5 4388 -#define SND_31_001 4377 -#define QU_SC28_LIFT6_START2 4295 -#define MV_MAN28_STOPWASH 4252 -#define MV_MAN28_WASH 4251 -#define QU_SC28_LIFT2_START 4246 -#define QU_SC25_TRYHAND 4219 -#define MSG_SC25_ENTERTRUBA 4214 -#define SND_21_022 3976 -#define SND_21_011 3965 -#define SND_19_008 3921 -#define SND_18_009 3909 -#define SND_13_030 3775 -#define SND_12_020 3740 -#define SND_10_011 3677 -#define QU_SC7_SND5 3610 -#define SND_7_015 3595 -#define SND_7_004 3584 -#define SND_6_027 3566 -#define SND_6_016 3553 -#define SND_6_005 3542 -#define SND_4_029 3535 -#define QU_SC25_TRYSPADE 3498 -#define MV_CHI_NORM 3484 -#define ST_WMN_AFTER 3455 -#define QU_SC28_ENTERWMN 3451 -#define MV_BTH_GOUP_5 3356 -#define ANI_BITAHANDLER 3349 -#define MV_CDI_LOOK 3312 -#define ST_BT16_NORM 3287 -#define ST_WR16_NORM 3284 -#define QU_GRL_FALL 3280 -#define QU_SC5_SND3 3242 -#define QU_SC4_SND2 3236 -#define QU_SC3_SND1 3230 -#define MV_MAN14_KICKGMA 3211 -#define QU_STR_THROWGLASSES_L 3203 -#define MV_STR_0_1 3198 -#define SND_4_018 3133 -#define SND_4_007 3122 -#define SND_3_008 3107 -#define SND_2_009 3091 -#define QU_STR_NOSE_L 3057 -#define SND_DBGMENU_001 2929 -#define QU_SC6_DROPS 2898 -#define ANI_FIRECAN_17 2860 -#define ST_MAN_GOLADDER2 2843 -#define ST_LBN_0H 2835 -#define MV_LBN_0 2831 -#define LIFTBTN_9 2789 -#define ST_LBN_8P 2775 -#define ST_LBN_6N 2768 -#define ST_KDK_NORM 2672 -#define PIC_SC37_MASK 2608 -#define MV_MAN34_BOARD_BUMP2 2571 -#define PIC_SC35_OUTLET 2518 -#define QU_SC34_SHOWSTOOL 2496 -#define MV_MAN20_PUTSTOOL 2461 -#define ANI_PUZODUV 2418 -#define MV_LEG_POT2_MOVE1 2335 -#define MV_LEG_POT1_MOVE2 2331 -#define MV_LEG_POT0_MOVE2 2327 -#define ST_LEG_DOWN 2325 -#define MV_ASS_HITRED 2139 -#define MSG_SC29_STOPRIDE 2107 -#define QU_SC29_MANFROM_L 2101 -#define PIC_SC28_FLOOR 2075 -#define ST_BTA_FALL 2054 -#define ST_DRV_SITNOVENT 1999 -#define ST_DRV_VENT 1996 -#define rMV_BRD25_RIGHT 1903 -#define QU_SC26_OPEN2 1937 -#define MV_MAN26_TURNVENT_L 1933 -#define ST_LUK23U_OPEN 1820 -#define ANI_LUK23_U 1817 -#define ANI_LUK23_D 1813 -#define PIC_SC22_MONETOPR 1809 -#define QU_SC22_FALLSACK 1791 -#define MV_MAN22_FALL 1751 -#define MV_MAN22_PUTTABUR 1748 -#define MSG_SC23_SPINWHEEL4 1743 -#define QU_GRFG_BLINKHAIR 1686 -#define QU_GRFG_SHOWHAIR 1685 -#define QU_GRFU_TURN_UL 1662 -#define rMV_MANEGBR_EGG2GLASSES 469 -#define QU_SC19_MANJUMP2 1517 -#define MSG_SC18_SHOWBOYJUMPTO 1497 -#define MV_MAN17_PUTSUGAR 1414 -#define PIC_SC17_BOX 1409 -#define ANI_WHIRLGIG_13 1383 -#define MV_BOY_DRINK 1333 -#define QU_WHR19_SPIN 1316 -#define MV_WHR18_SPIN 1300 -#define MV_MAN13_PUTFIRECAN 1311 -#define ANI_INV_BALL 1242 -#define MV_GMA_JUMPBK 1231 -#define QU_SC14_ENTER_RIGHT 1223 -#define MV_MAN13_HANDLEDOWN 1202 -#define MV_MAN13_THROWGUM 1194 -#define MV_SWR_SPOLZING 1148 -#define MSG_SC5_MAKEMANFLIGHT 1136 -#define QU_SC5_ENTER_UP 1135 -#define MV_MAN_HMRKICK 1028 -#define MV_SC2_BOX_default 1021 -#define MV_HDL6_default 1010 -#define MSG_SC10_CLICKGUM 992 -#define MSG_SC9_SHOWBALL 936 -#define ANI_PBAR 896 -#define ST_INV_HAMMER_default 886 -#define MV_INV_COIN_default 876 -#define ANI_INV_OLDGLASSES 402 -#define QU_SLN_POT_TURNBACK 852 -#define MV_SLN_POT_MORG 836 -#define MSG_TAKEBOTTLE 614 -#define MV_KZW_JUMPOUT 586 -#define MV_SPR_LOWER 543 -#define QU_SC3_ENTER 473 -#define QU_SC2_ENTER 472 -#define MV_DYAS_GIVESEGG 314 -#define ST_EGTR_SLAPPIN 346 -#define MV_EGTR_SLIMOBL 337 -#define MV_EGTR_TOSLAP 345 -#define MV_MANDYAS_GIVESBOOT 358 -#define MV_MANDYAS_GIVESDOM 375 -#define ST_MAN_INTRUBAHOR 446 -#define PIC_SC1_LTRUBA 470 -#define MV_MAN_FROMLADDERD 494 -#define QU_SC3_ENTER_RIGHT 705 -#define QU_BTT_CHESHET 757 -#define MV_BRD_DROPBALL 694 -#define ANI_LUKE 803 -#define PIC_INV_OLDHANDLE 798 -#define ST_INV_DOMINO_default 874 -#define MV_NDV_EAT 945 -#define QU_SC9_ENTER_RIGHT 963 -#define ANI_GUARD1 996 -#define ST_SC4_BOOT_default 1037 -#define ST_HDL6_LIES 1042 -#define MV_MAN_LIFTDOWN 1052 -#define MV_MAN_TURN_SLD 1079 -#define MV_MAN_TURN_SLU 1080 -#define PIC_SC8_LADDER 754 -#define MV_INV_GUM_default 1155 -#define PIC_SC13_UTRUBA 1170 -#define MV_STR_HIDE 1181 -#define MV_GMA_THROW 1232 -#define MV_GMS_DRYG 1269 -#define QU_SC17_ENTER_RIGHT 1325 -#define ANI_WIRE16 1344 -#define ST_INV_MUG_default 1372 -#define MSG_SC16_SHOWMUGFULL 1396 -#define QU_HND_TAKE0 1440 -#define MV_HND17_ASK 1447 -#define MV_MAN_TOLADDERD 1524 -#define ANI_INV_EGGDOM 1561 -#define ST_INV_EGGDOM_default 1563 -#define PIC_INV_EGGAPL 1578 -#define PIC_INV_EGGGLS 1580 -#define ANI_GRANDFA 1588 -#define QU_GFA_BREATHESOCK 1611 -#define MV_GRFU_BLINKDOWN 1652 -#define ANI_CALENDWHEEL 1702 -#define MV_CND_1_2 1706 -#define MSG_SC23_CLICKBTN1 1736 -#define MV_INV_LEVERHANDLE_default 1778 -#define PIC_INV_STOOL 1785 -#define QU_SC22_TOSTOOL 1801 -#define MV_INV_SWAB_default 1918 -#define MV_MAN26_OPENLUK 1934 -#define QU_GRFM_NECK 1988 -#define ST_DRV_RIGHT 2010 -#define PIC_SC27_FLOOR 2053 -#define MV_STR2_SHOOT 2112 -#define ST_STR2_STAND 2113 -#define MV_MAN38_PUTDOMINO 2186 -#define ANI_BOTTLE38 2188 -#define MV_DMN38_NORM2 2204 -#define QU_DLD_GLOT 2217 -#define MV_FFT_TUBE_OPENEYE 2235 -#define QU_GLV_PROPOSE 2280 -#define ST_MLS_LEFT2 2291 -#define MV_FFT_PIPE_FLOWOPEN 2300 -#define QU_FFT_TUBE_FLOWOPEN 2306 -#define ST_INV_TUBE_default 2316 -#define ANI_INV_PIPE 2317 -#define QU_SC30_ENTER_LEFT 2356 -#define ST_RHT_OPEN 2362 -#define MV_LEG_POT0_OUT 2374 -#define MV_MAN32_STOPSPIN 2404 -#define MV_MAN35_JUMPOUT 2411 -#define MV_GMA_1_2 2455 -#define ST_CTS31_EMPTY 2458 -#define QU_SC31_ENTER_DOWN 2459 -#define MSG_SC34_SHOWBOX 2497 -#define ST_PDV_CUT 2522 -#define QU_PDV_CUT_TRY 2529 -#define MV_INV_SCISSORS_default 2533 -#define ST_RNG_OPEN 2606 -#define ST_RNG_CLOSED 2607 -#define ST_GMA22_EMPTY 2611 -#define ST_VNT33_DOWN 2640 -#define MV_VNT33_TURND 2638 -#define ANI_TESTO_31 2652 -#define MV_TEST 2683 -#define MV_MAN11_PUTBOOT1 2702 -#define MV_BTS11_DOUBLE 2705 -#define QU_SC32_ENTER_UP 2714 -#define ANI_JET_17 2746 -#define QU_SC35_ENTERLIFT 2815 -#define QU_SC35_EXITLIFT 2816 -#define QU_SC32_ENTERLIFT 2827 -#define MV_EGTR_MD1_DENY 2866 -#define MV_EGTR_0_1 2918 -#define ANI_INV_EGGBLACK 357 -#define MV_EGTR_SLIMDENY 2933 -#define MSG_SC15_PULL 2940 -#define MSG_SC37_PULL 2945 -#define MV_MAN1_EGG2DOM 443 -#define ST_GRT1_NORM 2963 -#define MV_SWR_STAND 948 -#define QU_NTL_MOVE 3027 -#define MV_HDLR_RISE 3043 -#define SND_5_006 3147 -#define SND_5_017 3158 -#define MV_GLV_PUTDOMINO_NOHMR 3180 -#define PIC_SC17_PIPE 3292 -#define ST_MLS_RIGHT2 3323 -#define MV_MAN_SNEEZE 3386 -#define QU_SC6_SND4 3579 -#define SND_8_003 3613 -#define SND_8_014 3624 -#define SND_9_002 3641 -#define SND_9_013 3657 -#define SND_11_010 3694 -#define SND_11_021 3705 -#define SND_20_001 3929 -#define QU_SC20_SND5 3938 -#define SND_20_012 3945 -#define SND_22_010 3993 -#define SND_CMN_040 4033 -#define SND_22_032 1765 -#define MV_MAN25_STOPROW 1883 -#define PIC_SC28_DARK1 4266 -#define SND_29_009 4343 -#define SND_30_002 4360 -#define QU_SC30_SND4 4367 -#define SND_30_013 4378 -#define SND_32_011 4407 -#define SND_32_022 4418 -#define SND_32_033 4429 -#define SND_3_019 4549 -#define ANI_TEST 4552 -#define PIC_MSV_OK_D 4635 -#define PIC_MSV_CANCEL_D 4637 -#define PIC_MSV_2_D 4652 -#define QU_TBL_GOL 4708 -#define MV_EYE30_LOOK 4716 -#define ST_LEG31_NORM 4725 -#define SND_CMN_051 4746 -#define PIC_TEST4 4785 -#define PIC_CSR_GOL 4897 #define SC_FINAL2 5000 -#define SND_FIN_029 5104 -#define ST_IN1GLS_NORM 5121 -#define ST_IN2BOOT_NORM 5142 -#define SC_17 1141 -#define SC_28 2062 -#define MSG_SC32_TRUBATOFRONT 5180 -#define PIC_SC2_LADDER2 5205 -#define QU_SC21_SND6 5214 -#define PIC_MAP_P10 5286 -#define ST_BTN32_OFF 5349 -#define PIC_HLP_BGR 3562 -#define PIC_MAP_S31_2 5254 -#define PIC_MAP_S32_1 5255 -#define PIC_MAP_H08 5364 -#define PIC_MOV_CANCEL 5345 -#define PIC_SC36_MASK 5221 -#define QU_MSH_CRANEOUT_GMA 5219 -#define SND_FIN_019 5091 -#define SND_FIN_008 5080 -#define QU_FN3_SHOWHMR 5073 -#define MSG_SC35_TRYFLY 4985 -#define QU_BRD16_GOR 4951 -#define ST_EGI_GOR 4931 -#define SND_CMN_063 4928 -#define PIC_CSR_ARCADE7 4909 -#define PIC_INV_GUM2_C 4858 -#define PIC_INV_VANTUZ_C 4856 -#define PIC_INV_TUBE_C 4855 -#define PIC_INV_SOCK_C 4851 -#define PIC_INV_PIPE_H 4812 -#define PIC_INV_MUG_H2 4810 -#define PIC_INV_BOTTLEFULL 1425 -#define PIC_SCD_RESTART 4766 -#define MSG_SC35_CHECKPIPESOUND 4761 -#define rMV_BRDCMN_GOR 4739 -#define ST_TBL_L 4701 -#define ANI_TENNBALL 4699 -#define MV_EGTR_MD2_SHOW 4695 -#define MV_BOT34_NORM 4561 -#define SND_34_032 4492 -#define SND_34_021 4481 -#define SND_34_010 4470 -#define SND_33_011 4448 -#define SND_31_002 4380 -#define ST_TTA_GOL 4292 -#define MV_TTA_TURN_DL 4291 -#define MSG_SC28_STARTWORK1 4255 -#define ST_MAN28_RIGHT 4249 -#define QU_SC28_LIFT3_START 4245 -#define SND_21_023 3977 -#define SND_21_012 3966 -#define SND_21_001 3950 -#define SND_19_009 3922 -#define SND_13_031 3776 -#define SND_13_020 3765 -#define SND_12_010 3730 -#define SND_10_012 3678 -#define SND_10_001 3662 -#define SND_7_016 3596 -#define SND_7_005 3585 -#define SND_6_028 3567 -#define SND_6_017 3556 -#define SND_6_006 3543 -#define SND_CMN_030 3470 -#define QU_SC28_WMN_END 3453 -#define MV_WMN28_IN_1 3443 -#define MV_BTH_4_3 3360 -#define MV_CDI_HIDEEYE 3313 -#define MV_MAN16_PUTBOOT 3288 -#define MV_BT16_FILL 3286 -#define QU_GRL_DRYG 3282 -#define MSG_SC14_STARTARCADE 3252 -#define QU_SC5_SND4 3243 -#define QU_SC4_SND3 3237 -#define QU_SC3_SND2 3231 -#define MV_STR_THROWGLASSES 3200 -#define MV_BTL38_FULL 3171 -#define SND_4_019 3134 -#define SND_4_008 3123 -#define SND_3_009 3108 -#define MV_HDLL_LOWER 3061 -#define MV_MID11_LOOK 3031 -#define QU_SC10_ENTER_DOWN 3003 -#define MV_BOT4_LEFT 2881 -#define MV_NDV_BLOW2 2855 -#define QU_SC38_ENTERLIFT 2836 -#define QU_SC10_ENTERLIFT 1067 -#define ST_LBN_5N 2765 -#define MSG_LIFT_GO 1065 -#define ST_LBN_7P 2772 -#define MV_LBN_1 2752 -#define ST_GRT9_GRIT 2722 -#define MV_PDV_GROW 2419 -#define PIC_SCD_30 2359 -#define ST_DMN38_6 2288 -#define MV_DMN38_NORM3 2250 -#define ST_PTR_NORM 2084 -#define QU_DRV_LOOKLEFT2 2034 -#define ST_BTA_NORM 2028 -#define MV_MID_LOOK 2023 -#define MV_MID_BROOM 2021 -#define MV_DRV_TORIGHT_V 2009 -#define ST_DRV_LEFT 2008 -#define ST_DRV_DRIVE 1997 -#define QU_SC26_OPEN3 1939 -#define ANI_GIRAFFE_TOP 1645 -#define ST_MSH_EMPTY 1758 -#define MV_MAN23_PUSH1 1724 -#define MV_GRFU_KISS 1682 -#define QU_GRFU_TURN_LU 1663 -#define MV_GRFB_0_1 1637 -#define PIC_SC21_UTRUBA 1554 -#define ST_CDI_EMPTY2 1543 -#define QU_SC19_MANJUMP3 1518 -#define ANI_BOY18 1477 -#define MV_KSL_JUMPBOY 1473 -#define MSG_SC17_FILLBOTTLE 1436 -#define QU_SC16_SHOWMUG 1361 -#define QU_SC13_SPIN 1386 -#define ANI_GUARD2 1279 -#define QU_GMA_JUMPBK 1251 -#define MV_INV_GUM2_default 1205 -#define MV_SWR_2_3 1152 -#define MV_MAN_GOD 481 -#define MV_MAN_STARTLADDER 452 -#define MV_TEST_JUMPFW 1074 -#define MSG_SC2_PUTMANUP 1026 -#define MSG_SC6_BTNPUSH 1017 -#define QU_NDV_MORG 971 -#define ANI_INV_COIN 875 -#define PIC_INV_HANDLE 867 -#define ST_INV_OLDGLASSES_default 404 -#define ANI_INV_OLDHANDLE 795 -#define ANI_INV_OLDEGG 364 -#define PIC_INV_SEL 868 -#define QU_SLN_BOOT_MORG 847 -#define MV_SLN_BOOT_LOOK 833 -#define PIC_SCD_SEL 734 -#define GRID_SC6_MAMASHA 684 -#define MV_MAN_JUMPONPLANK 551 -#define QU_SC4_ENTER 539 -#define QU_EGTR_SLIMBOLTLEGS 523 -#define ANI_PLANK 501 -#define MV_MAN_GOU 460 -#define ST_MAN_GOR 326 -#define rMV_EGBR_LOWERHEAD 462 -#define ST_MAN_GOLADDERD 456 -#define MV_MAN_GOLADDERDOWN 455 -#define ST_OTM_GLS_RIGHT 423 -#define MV_EGBR_BRK_GLASSES 387 -#define ST_DYAS_SITSOPEN 309 -#define ST_DYAS_SITSTOUS 312 -#define MV_DYAS_OPENBOX_LIES 323 -#define rMV_MAN_TOTRUBAHOR 447 -#define PIC_SC4_LTRUBA 506 -#define QU_SC4_GOCLOCK 595 -#define MV_MOM_SHAKE 663 -#define QU_SC6_ENTER_LEFT 708 -#define QU_BTT_DRINK 758 -#define ST_HGN_LOOK 811 -#define QU_SC9_EATBALL 942 -#define ST_VSN_LEFT 954 -#define PIC_SC10_RTRUBA 973 -#define MSG_SC2_HIDELADDER 1023 -#define QU_STR_PLUU 1189 -#define MV_HDLL_0_1 1210 -#define QU_SC16_ENTER_LEFT 1294 -#define MSG_SC16_STARTLAUGH 1374 -#define MV_MUG_0_1 1297 -#define ST_BOTTLE_FULL 1431 -#define QU_HND_TAKE1 1441 -#define QU_SC21_ENTER_UP 1629 -#define MV_GRFU_TURN_UL 1653 -#define MV_GRFU_STARTCHMOK 1657 -#define MSG_SC23_CLICKBTN2 1737 -#define MV_MAN22_HANDLEDOWN 1795 -#define PIC_SC21_DTRUBA 1823 -#define QU_SC25_LADDERUP 1925 -#define MV_CHI_SHOW 1958 -#define PIC_SC27_HITZONE 2055 -#define ANI_SHOOTER1 2108 -#define QU_DLD_ICK 2219 -#define MV_FFT_TUBE_STOP 2238 -#define MV_FFT_PIPE_BLINK 2248 -#define ANI_CACTUS 2267 -#define MV_LEG_1_2 2344 -#define PIC_SC30_LTRUBA 2354 -#define MV_LEG_POT1_OUT 2369 -#define PIC_SC31_RTRUBA 2440 -#define ANI_CACTUS_31 2456 -#define QU_SC20_SHOWSTOOL 2466 -#define ST_CTS31_GROWN2 2472 -#define MV_STL34_PUTBOX 2487 -#define MSG_SC35_STARTFLOW 2523 -#define ANI_LUK_34 2541 -#define ST_GRD37_STAND 2590 -#define QU_GRD37_LOOKR 2598 -#define PIC_SC37_WALL1 2600 -#define MV_MAN33_PUTMUG 2621 -#define ST_MUG33_FULL 2626 -#define rMV_MAN_HMRKICK 2694 -#define MV_MAN11_PUTBOOT2 2703 -#define QU_SC11_SHOWBOOT 2708 -#define ANI_DOMINO_3 2732 -#define ST_MUG17_EMPTY 2739 -#define QU_SC32_ENTER_LIFTUP 2829 -#define MSG_SC6_TESTNUMBALLS 2904 -#define MV_MAN3_GIVEBLACK_1 2914 -#define MSG_SC8_STANDUP 2976 -#define ST_BTN6_ON 2994 -#define QU_VSN_TURNR 2998 -#define MV_SWR_SPOLZING_BALD 3006 -#define MSG_SC13_CLOSEBRIDGE 3046 -#define SND_5_007 3148 -#define SND_5_018 3159 -#define MV_RPE15_NORM 3256 -#define QU_SC38_SHOWHMR 2197 -#define MV_CLN_TUZH 3324 -#define MV_MAN22_STANDTABUR_R 3331 -#define QU_SC23_SHOWSTOOL 3335 -#define MSG_SC26_CLICKVENT 1947 -#define QU_MAN_DEF_STOPSHOES2_R 3402 -#define MV_SWR_DENY_BALD 3429 -#define MV_MAN22_TRYBOOT_NOSOCK 3434 -#define QU_SC6_SND5 3580 -#define SND_8_004 3614 -#define SND_8_015 3625 -#define SND_9_003 3642 -#define SND_9_014 3658 -#define SND_11_011 3695 -#define SND_11_022 3706 -#define SND_20_002 3930 -#define SND_20_013 3946 -#define SND_22_011 3994 -#define SND_22_022 4005 -#define SND_CMN_041 4034 -#define SND_22_033 1766 -#define MV_MAN1_FALL 4228 -#define PIC_SC28_FRAME6 4263 -#define PIC_SC28_DARK2 4267 -#define MSG_SC28_TURNOFF_1 4279 -#define SND_30_003 4361 -#define QU_SC30_SND5 4368 -#define SND_30_014 4379 -#define SND_32_001 4392 -#define SND_32_012 4408 -#define SND_32_023 4419 -#define SND_32_034 4430 -#define SND_35_020 4518 -#define MV_MAN34_STANDBOX_FLOOR 4569 -#define MV_CPT36_NORM 4601 -#define MV_RHT_CLOSE 2363 -#define MV_MAN34_PUTSTOOL_BOX 4613 -#define PIC_MNU_LOAD_D 4627 -#define PIC_MSV_EMPTY_L 4640 -#define PIC_MSV_3_D 4653 -#define PIC_MSV_DOTS_L 4669 -#define MV_TBL_WALKR 4706 -#define MV_EYE30_BLINK 4717 -#define QU_EYE30_LOOK 4720 -#define SND_CMN_052 4747 -#define PIC_TEST5 4786 -#define QU_BALL_WALKL 4920 -#define QU_BRD16_TRY 4955 #define SC_FINAL3 5001 -#define ANI_FN2_HAND1 5028 -#define MV_IN2BOOT_FALL 5141 -#define SC_18 1142 -#define SC_29 2063 -#define SND_25_030 5175 -#define MSG_LIFT_CLOSEDOOR 5194 -#define MV_MAN23_TRYBROOM 5307 -#define PIC_MAP_P11 5287 -#define QU_SC23_ENTER_DOWNTOUP 5328 -#define PIC_MAP_H19 5393 -#define PIC_MAP_S30 5252 -#define PIC_MAP_S32_2 5256 +#define SC_FINAL4 2460 +#define SC_INTRO1 3896 +#define SC_INTRO2 3907 +#define SC_INV 858 +#define SC_LDR 635 +#define SC_MAINMENU 4620 +#define SC_MAP 5222 +#define SC_TEST 903 +#define SC_TITLES 5166 +#define ST_MAN_EMPTY 476 +#define TrubaDown 697 +#define TrubaLeft 474 +#define TrubaRight 696 +#define TrubaUp 680 + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_INPUT_H */ -- cgit v1.2.3 From eeec3a79cb656d76617d923bbf463aa30460ba67 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 30 Jul 2013 12:36:33 +0300 Subject: FULLPIPE: Renamed gameobj.h to constants.h --- engines/fullpipe/constants.h | 122 +++++++++++++++++++++++++++++++++++++++ engines/fullpipe/gameobj.h | 122 --------------------------------------- engines/fullpipe/init.cpp | 2 +- engines/fullpipe/scene.cpp | 2 +- engines/fullpipe/scenes.cpp | 2 +- engines/fullpipe/stateloader.cpp | 2 +- engines/fullpipe/statics.cpp | 2 +- 7 files changed, 127 insertions(+), 127 deletions(-) create mode 100644 engines/fullpipe/constants.h delete mode 100644 engines/fullpipe/gameobj.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h new file mode 100644 index 0000000000..b609d7b1c6 --- /dev/null +++ b/engines/fullpipe/constants.h @@ -0,0 +1,122 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_CONSTANTS_H +#define FULLPIPE_CONSTANTS_H + +namespace Fullpipe { + +#define ANI_IN1MAN 5110 +#define ANI_INV_MAP 5321 +#define ANI_MAN 322 +#define MV_MAN_TURN_LU 486 +#define PIC_CMN_EVAL 3468 +#define PIC_CSR_ARCADE1 4901 +#define PIC_CSR_ARCADE2 4902 +#define PIC_CSR_ARCADE2_D 4903 +#define PIC_CSR_ARCADE3 4904 +#define PIC_CSR_ARCADE4 4905 +#define PIC_CSR_ARCADE5 4906 +#define PIC_CSR_ARCADE6 4907 +#define PIC_CSR_ARCADE6_D 4908 +#define PIC_CSR_ARCADE7 4909 +#define PIC_CSR_ARCADE7_D 4910 +#define PIC_CSR_ARCADE8 4911 +#define PIC_CSR_DEFAULT 4891 +#define PIC_CSR_DEFAULT_INV 4892 +#define PIC_CSR_GOD 4900 +#define PIC_CSR_GOFAR_L 4895 +#define PIC_CSR_GOFAR_R 4896 +#define PIC_CSR_GOL 4897 +#define PIC_CSR_GOR 4898 +#define PIC_CSR_GOU 4899 +#define PIC_CSR_HELPERBGR 5331 +#define PIC_CSR_ITN 4893 +#define PIC_CSR_ITN_GREEN 5330 +#define PIC_CSR_ITN_INV 4894 +#define PIC_CSR_ITN_RED 5329 +#define PIC_CSR_LIFT 5176 +#define PIC_CSR_MAP 5339 +#define PIC_INV_MENU 991 +#define PIC_MAP_A13 5275 +#define PIC_MAP_S01 5223 +#define SC_1 301 +#define SC_10 653 +#define SC_11 654 +#define SC_12 655 +#define SC_13 1137 +#define SC_14 1138 +#define SC_15 1139 +#define SC_16 1140 +#define SC_17 1141 +#define SC_18 1142 +#define SC_19 1143 +#define SC_2 302 +#define SC_20 1144 +#define SC_21 1546 +#define SC_22 1547 +#define SC_23 1548 +#define SC_24 1549 +#define SC_25 1550 +#define SC_26 1551 +#define SC_27 1552 +#define SC_28 2062 +#define SC_29 2063 +#define SC_3 303 +#define SC_30 2064 +#define SC_31 2065 +#define SC_32 2066 +#define SC_33 2067 +#define SC_34 2068 +#define SC_35 2069 +#define SC_36 2070 +#define SC_37 2071 +#define SC_38 2072 +#define SC_4 304 +#define SC_5 305 +#define SC_6 649 +#define SC_7 650 +#define SC_8 651 +#define SC_9 652 +#define SC_COMMON 321 +#define SC_DBGMENU 726 +#define SC_FINAL1 4999 +#define SC_FINAL2 5000 +#define SC_FINAL3 5001 +#define SC_FINAL4 2460 +#define SC_INTRO1 3896 +#define SC_INTRO2 3907 +#define SC_INV 858 +#define SC_LDR 635 +#define SC_MAINMENU 4620 +#define SC_MAP 5222 +#define SC_TEST 903 +#define SC_TITLES 5166 +#define ST_MAN_EMPTY 476 +#define TrubaDown 697 +#define TrubaLeft 474 +#define TrubaRight 696 +#define TrubaUp 680 + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_CONSTANTS_H */ diff --git a/engines/fullpipe/gameobj.h b/engines/fullpipe/gameobj.h deleted file mode 100644 index 7b24dd79ef..0000000000 --- a/engines/fullpipe/gameobj.h +++ /dev/null @@ -1,122 +0,0 @@ -/* 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. - * - */ - -#ifndef FULLPIPE_GAMEOBJ_H -#define FULLPIPE_GAMEOBJ_H - -namespace Fullpipe { - -#define ANI_IN1MAN 5110 -#define ANI_INV_MAP 5321 -#define ANI_MAN 322 -#define MV_MAN_TURN_LU 486 -#define PIC_CMN_EVAL 3468 -#define PIC_CSR_ARCADE1 4901 -#define PIC_CSR_ARCADE2 4902 -#define PIC_CSR_ARCADE2_D 4903 -#define PIC_CSR_ARCADE3 4904 -#define PIC_CSR_ARCADE4 4905 -#define PIC_CSR_ARCADE5 4906 -#define PIC_CSR_ARCADE6 4907 -#define PIC_CSR_ARCADE6_D 4908 -#define PIC_CSR_ARCADE7 4909 -#define PIC_CSR_ARCADE7_D 4910 -#define PIC_CSR_ARCADE8 4911 -#define PIC_CSR_DEFAULT 4891 -#define PIC_CSR_DEFAULT_INV 4892 -#define PIC_CSR_GOD 4900 -#define PIC_CSR_GOFAR_L 4895 -#define PIC_CSR_GOFAR_R 4896 -#define PIC_CSR_GOL 4897 -#define PIC_CSR_GOR 4898 -#define PIC_CSR_GOU 4899 -#define PIC_CSR_HELPERBGR 5331 -#define PIC_CSR_ITN 4893 -#define PIC_CSR_ITN_GREEN 5330 -#define PIC_CSR_ITN_INV 4894 -#define PIC_CSR_ITN_RED 5329 -#define PIC_CSR_LIFT 5176 -#define PIC_CSR_MAP 5339 -#define PIC_INV_MENU 991 -#define PIC_MAP_A13 5275 -#define PIC_MAP_S01 5223 -#define SC_1 301 -#define SC_10 653 -#define SC_11 654 -#define SC_12 655 -#define SC_13 1137 -#define SC_14 1138 -#define SC_15 1139 -#define SC_16 1140 -#define SC_17 1141 -#define SC_18 1142 -#define SC_19 1143 -#define SC_2 302 -#define SC_20 1144 -#define SC_21 1546 -#define SC_22 1547 -#define SC_23 1548 -#define SC_24 1549 -#define SC_25 1550 -#define SC_26 1551 -#define SC_27 1552 -#define SC_28 2062 -#define SC_29 2063 -#define SC_3 303 -#define SC_30 2064 -#define SC_31 2065 -#define SC_32 2066 -#define SC_33 2067 -#define SC_34 2068 -#define SC_35 2069 -#define SC_36 2070 -#define SC_37 2071 -#define SC_38 2072 -#define SC_4 304 -#define SC_5 305 -#define SC_6 649 -#define SC_7 650 -#define SC_8 651 -#define SC_9 652 -#define SC_COMMON 321 -#define SC_DBGMENU 726 -#define SC_FINAL1 4999 -#define SC_FINAL2 5000 -#define SC_FINAL3 5001 -#define SC_FINAL4 2460 -#define SC_INTRO1 3896 -#define SC_INTRO2 3907 -#define SC_INV 858 -#define SC_LDR 635 -#define SC_MAINMENU 4620 -#define SC_MAP 5222 -#define SC_TEST 903 -#define SC_TITLES 5166 -#define ST_MAN_EMPTY 476 -#define TrubaDown 697 -#define TrubaLeft 474 -#define TrubaRight 696 -#define TrubaUp 680 - -} // End of namespace Fullpipe - -#endif /* FULLPIPE_INPUT_H */ diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp index b1c9d6d0de..4e3520997a 100644 --- a/engines/fullpipe/init.cpp +++ b/engines/fullpipe/init.cpp @@ -27,7 +27,7 @@ #include "fullpipe/objectnames.h" #include "fullpipe/input.h" -#include "fullpipe/gameobj.h" +#include "fullpipe/constants.h" namespace Fullpipe { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 9f4901d83a..bb0d632186 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -27,7 +27,7 @@ #include "fullpipe/statics.h" #include "fullpipe/messages.h" -#include "fullpipe/gameobj.h" +#include "fullpipe/constants.h" #include "common/algorithm.h" diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 8a7d7805b5..68be347402 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -34,7 +34,7 @@ #include "fullpipe/messages.h" #include "fullpipe/behavior.h" -#include "fullpipe/gameobj.h" +#include "fullpipe/constants.h" namespace Fullpipe { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index d4c4948f21..cf63df1d96 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -31,7 +31,7 @@ #include "fullpipe/scene.h" #include "fullpipe/statics.h" -#include "fullpipe/gameobj.h" +#include "fullpipe/constants.h" namespace Fullpipe { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 2fa53e2d96..6c3ba3ff17 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -27,7 +27,7 @@ #include "fullpipe/statics.h" #include "fullpipe/messages.h" -#include "fullpipe/gameobj.h" +#include "fullpipe/constants.h" #include "fullpipe/objectnames.h" namespace Fullpipe { -- cgit v1.2.3 From 274f7d173741e8189c5ed5fa9583aec102a38f37 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 30 Jul 2013 14:29:15 +0300 Subject: FULLPIPE: Implement stubs for ModalObject --- engines/fullpipe/fullpipe.cpp | 74 ++++++++++++++++++++++--------------------- engines/fullpipe/fullpipe.h | 11 ++++++- engines/fullpipe/gfx.cpp | 4 +-- engines/fullpipe/modal.h | 38 ++++++++++++++++++++++ 4 files changed, 88 insertions(+), 39 deletions(-) create mode 100644 engines/fullpipe/modal.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 27ccb29dcc..a8f9428809 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -31,6 +31,7 @@ #include "fullpipe/gameloader.h" #include "fullpipe/messages.h" #include "fullpipe/behavior.h" +#include "fullpipe/modal.h" namespace Fullpipe { @@ -52,6 +53,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _scrollSpeed = 0; _currSoundListCount = 0; + _updateTicks = 0; + _currArchive = 0; _soundEnabled = true; @@ -60,7 +63,10 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _inputController = 0; _inputDisabled = false; - _needQuit = false; + _modalObject = 0; + + _gameContinue = true; + _needRestart = false; _flgPlayIntro = true; _musicAllowed = -1; @@ -115,7 +121,8 @@ Common::Error FullpipeEngine::run() { _isSaveAllowed = false; - loadGam("fullpipe.gam"); + if (!loadGam("fullpipe.gam")) + return Common::kNoGameDataFoundError; EntranceInfo ent; @@ -132,43 +139,30 @@ Common::Error FullpipeEngine::run() { _currentScene->draw(); - while (!g_fullpipe->_needQuit) { + _gameContinue = true; + + while (_gameContinue) { updateEvents(); + + updateScreen(); + + if (_needRestart) { + if (_modalObject) { + delete _modalObject; + _modalObject = 0; + } + + freeGameLoader(); + _currentScene = 0; + _updateTicks = 0; + + loadGam("fullpipe.gam"); + _needRestart = false; + } + _system->delayMillis(10); _system->updateScreen(); - switch (g_fullpipe->_keyState) { - case Common::KEYCODE_q: - g_fullpipe->_needQuit = true; - break; - case Common::KEYCODE_UP: - _sceneRect.moveTo(_sceneRect.left, _sceneRect.top + 10); - _currentScene->draw(); - g_fullpipe->_keyState = Common::KEYCODE_INVALID; - break; - case Common::KEYCODE_DOWN: - _sceneRect.moveTo(_sceneRect.left, _sceneRect.top - 10); - _currentScene->draw(); - g_fullpipe->_keyState = Common::KEYCODE_INVALID; - break; - case Common::KEYCODE_LEFT: - _sceneRect.moveTo(_sceneRect.left + 10, _sceneRect.top); - _currentScene->draw(); - g_fullpipe->_keyState = Common::KEYCODE_INVALID; - break; - case Common::KEYCODE_RIGHT: - _sceneRect.moveTo(_sceneRect.left - 10, _sceneRect.top); - _currentScene->draw(); - g_fullpipe->_keyState = Common::KEYCODE_INVALID; - break; - case Common::KEYCODE_z: - _sceneRect.moveTo(0, 0); - _currentScene->draw(); - g_fullpipe->_keyState = Common::KEYCODE_INVALID; - break; - default: - break; - } } @@ -192,7 +186,7 @@ void FullpipeEngine::updateEvents() { _mouseY = event.mouse.y; break; case Common::EVENT_QUIT: - _needQuit = true; + _gameContinue = false; break; default: break; @@ -200,6 +194,14 @@ void FullpipeEngine::updateEvents() { } } +void FullpipeEngine::freeGameLoader() { + warning("STUB: FullpipeEngine::freeGameLoader()"); +} + +void FullpipeEngine::updateScreen() { + warning("STUB: FullpipeEngine::updateScreen()"); +} + int FullpipeEngine::getObjectEnumState(const char *name, const char *state) { CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 760bd4e9cc..aa3b4d8df5 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -44,6 +44,7 @@ enum FullpipeGameFeatures { }; class BehaviorManager; +class CBaseModalObject; class CGameLoader; class CGameVar; class CInputController; @@ -138,8 +139,12 @@ public: void initMap(); void updateMapPiece(int mapId, int update); + void updateScreen(); - bool _needQuit; + void freeGameLoader(); + + bool _gameContinue; + bool _needRestart; bool _flgPlayIntro; int _musicAllowed; @@ -160,6 +165,10 @@ public: Scene *_inventoryScene; CInventory2 *_inventory; + int32 _updateTicks; + + CBaseModalObject *_modalObject; + int (*_updateScreenCallback)(void *); int (*_updateCursorCallback)(); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 88b86630b9..997c0b620b 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -406,7 +406,7 @@ void Picture::drawRotated(int x, int y, int angle) { } void Picture::displayPicture() { - if (g_fullpipe->_needQuit) + if (!g_fullpipe->_gameContinue) return; getData(); @@ -424,7 +424,7 @@ void Picture::displayPicture() { g_fullpipe->_system->delayMillis(10); g_fullpipe->_system->updateScreen(); - while (!g_fullpipe->_needQuit) { + while (g_fullpipe->_gameContinue) { g_fullpipe->updateEvents(); g_fullpipe->_system->delayMillis(10); g_fullpipe->_system->updateScreen(); diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h new file mode 100644 index 0000000000..86b166e317 --- /dev/null +++ b/engines/fullpipe/modal.h @@ -0,0 +1,38 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_MODAL_H +#define FULLPIPE_MODAL_H + +namespace Fullpipe { + +class CBaseModalObject { + int _parentObj; + + public: + CBaseModalObject() : _parentObj(0) {} +}; + + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_MODAL_H */ -- cgit v1.2.3 From 1c75ebcca93bd1eb260166e17adacdcfac721099 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 30 Jul 2013 14:45:39 +0300 Subject: FULLPIPE: main loop stub --- engines/fullpipe/fullpipe.cpp | 7 +++++++ engines/fullpipe/fullpipe.h | 1 + 2 files changed, 8 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index a8f9428809..07a6651ad0 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -165,6 +165,9 @@ Common::Error FullpipeEngine::run() { } + freeGameLoader(); + + cleanup(); return Common::kNoError; } @@ -198,6 +201,10 @@ void FullpipeEngine::freeGameLoader() { warning("STUB: FullpipeEngine::freeGameLoader()"); } +void FullpipeEngine::cleanup() { + warning("STUB: FullpipeEngine::cleanup()"); +} + void FullpipeEngine::updateScreen() { warning("STUB: FullpipeEngine::updateScreen()"); } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index aa3b4d8df5..37dc8273aa 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -142,6 +142,7 @@ public: void updateScreen(); void freeGameLoader(); + void cleanup(); bool _gameContinue; bool _needRestart; -- cgit v1.2.3 From 856eb1b0fa92068fd7b61a8c9a6350af596f3f00 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 31 Jul 2013 20:06:13 +0300 Subject: FULLPIPE: Implemented FullpipeEngine::updateScreen() --- engines/fullpipe/fullpipe.cpp | 46 ++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/fullpipe.h | 9 +++++++- engines/fullpipe/gameloader.cpp | 25 ++++++++++++++++++++++ engines/fullpipe/gameloader.h | 3 +++ engines/fullpipe/input.cpp | 4 ++++ engines/fullpipe/input.h | 2 ++ engines/fullpipe/inventory.cpp | 6 +++++- engines/fullpipe/inventory.h | 1 + engines/fullpipe/messages.cpp | 21 +++++++++++++++++++ engines/fullpipe/messages.h | 5 ++++- engines/fullpipe/modal.h | 12 +++++++++-- engines/fullpipe/module.mk | 1 + engines/fullpipe/scene.cpp | 5 +++++ engines/fullpipe/scene.h | 2 ++ engines/fullpipe/statics.cpp | 4 ++++ engines/fullpipe/statics.h | 2 ++ 16 files changed, 142 insertions(+), 6 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 07a6651ad0..e762331acc 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -32,6 +32,7 @@ #include "fullpipe/messages.h" #include "fullpipe/behavior.h" #include "fullpipe/modal.h" +#include "fullpipe/input.h" namespace Fullpipe { @@ -68,6 +69,9 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _gameContinue = true; _needRestart = false; _flgPlayIntro = true; + _flgSavegameMenuRequested = false; + + _isProcessingMessages = false; _musicAllowed = -1; @@ -87,6 +91,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _msgY = 0; _msgObjectId2 = 0; _msgId = 0; + _mouseVirtX = 0; + _mouseVirtY = 0; _behaviorManager = 0; @@ -206,7 +212,45 @@ void FullpipeEngine::cleanup() { } void FullpipeEngine::updateScreen() { - warning("STUB: FullpipeEngine::updateScreen()"); + _mouseVirtX = _mouseX + _sceneRect.left; + _mouseVirtY = _mouseY + _sceneRect.top; + + //if (inputArFlag) + // updateGame_inputArFlag(); + + if (_modalObject || _flgSavegameMenuRequested && (_gameLoader->updateSystems(42), _modalObject != 0)) { + if (_flgSavegameMenuRequested) { + if (_modalObject->init(42)) { + _modalObject->update(); + } else { + _modalObject->saveload(); + CBaseModalObject *tmp = _modalObject->_parentObj; + + if (_modalObject) + delete _modalObject; + + _modalObject = tmp; + } + } + } else if (_currentScene) { + _currentScene->draw(); + + if (_inventoryScene) + _inventory->draw(); + + if (_updateScreenCallback) + _updateScreenCallback(); + + //if (inputArFlag && _currentScene) { + // vrtTextOut(*(_DWORD *)g_vrtHandle, smallNftData, "DEMO", 4, 380, 580); + // vrtTextOut(*(_DWORD *)g_vrtHandle, smallNftData, "Alt+F4 - exit", 14, 695, 580); + //} + } else { + //vrtRectangle(*(_DWORD *)g_vrtHandle, 0, 0, 0, 800, 600); + } + _inputController->drawCursor(_mouseX, _mouseY); + + ++_updateTicks; } int FullpipeEngine::getObjectEnumState(const char *name, const char *state) { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 37dc8273aa..15bb28ff0e 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -108,6 +108,7 @@ public: bool _savesEnabled; bool _updateFlag; bool _flgCanOpenMap; + bool _flgSavegameMenuRequested; Common::Rect _sceneRect; int _sceneWidth; @@ -133,6 +134,12 @@ public: int _msgObjectId2; int _msgId; + Common::List _exCommandList; + bool _isProcessingMessages; + + int _mouseVirtX; + int _mouseVirtY; + BehaviorManager *_behaviorManager; MovTable *_movTable; @@ -170,7 +177,7 @@ public: CBaseModalObject *_modalObject; - int (*_updateScreenCallback)(void *); + int (*_updateScreenCallback)(); int (*_updateCursorCallback)(); int _cursorId; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 1d53cd3e15..939da177f4 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -225,6 +225,12 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { return true; } +bool CGameLoader::preloadScene(int sceneId, int entranceId) { + warning("STUB: preloadScene(%d, %d), ", sceneId, entranceId); + + return true; +} + int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) { if (_sc2array.size() > 0 && _gameProject->_sceneTagList->size() > 0) { for (uint i = 0; i < _sc2array.size(); i++) { @@ -248,6 +254,25 @@ void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAn warning("STUB: CGameLoader::applyPicAniInfo()"); } +void CGameLoader::updateSystems(int counterdiff) { + if (g_fullpipe->_currentScene) { + g_fullpipe->_currentScene->update(counterdiff); + + _exCommand._messageKind = 17; + _updateCounter++; + _exCommand._messageNum = 33; + _exCommand._excFlags = 0; + postMessage(&_exCommand); + } + + processMessages(); + + if (_preloadId1) { + processMessages(); + preloadScene(_preloadId1, _preloadId2); + } +} + CGameVar *FullpipeEngine::getGameLoaderGameVar() { if (_gameLoader) return _gameLoader->_gameVar; diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 36c99f20dc..4ba48297af 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -41,6 +41,9 @@ class CGameLoader : public CObject { virtual bool load(MfcArchive &file); bool loadScene(int sceneId); bool gotoScene(int sceneId, int entranceId); + bool preloadScene(int sceneId, int entranceId); + + void updateSystems(int counterdiff); int getSceneTagBySceneId(int sceneId, SceneTag **st); void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount); diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index bb6d8baae5..78c6e50a49 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -78,6 +78,10 @@ void CInputController::setCursorMode(bool enabled) { _inputFlags &= ~1; } +void CInputController::drawCursor(int x, int y) { + warning("STUB: CInputController::drawCursor(%d, %d)", x, y); +} + CursorInfo::CursorInfo() { pictureId = 0; picture = 0; diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h index 72742b04b6..06013ab0c1 100644 --- a/engines/fullpipe/input.h +++ b/engines/fullpipe/input.h @@ -63,6 +63,8 @@ class CInputController { void setInputDisabled(bool state); void addCursor(CursorInfo *cursor); void setCursorMode(bool mode); + + void drawCursor(int x, int y); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 8df06e617e..c88d6f9cdc 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -97,7 +97,7 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia } void CInventory2::addItem(int itemId, int value) { - warning("STUB: CInventory2::addItem"); + warning("STUB: CInventory2::addItem(%d, %d)", itemId, value); } void CInventory2::rebuildItemRects() { @@ -106,4 +106,8 @@ void CInventory2::rebuildItemRects() { warning("STUB: CInventory2::rebuildItemRects()"); } +void CInventory2::draw() { + warning("STUB: CInventory2::draw()"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 36170b86bf..a61df385a5 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -101,6 +101,7 @@ class CInventory2 : public CInventory { Scene *getScene() { return _scene; } + void draw(); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 69b29dcef8..ee9210f066 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -79,6 +79,10 @@ bool ExCommand::load(MfcArchive &file) { return true; } +void ExCommand::handleMessage() { + warning("STUB: ExCommand::handleMessage()"); +} + Message::Message() { _messageKind = 0; _parentId = 0; @@ -416,4 +420,21 @@ void clearMessageHandlers() { } } +void postMessage(ExCommand *ex) { + g_fullpipe->_exCommandList.push_back(ex); +} + +void processMessages() { + if (!g_fullpipe->_isProcessingMessages) { + g_fullpipe->_isProcessingMessages = true; + + while (g_fullpipe->_exCommandList.size()) { + ExCommand *ex = g_fullpipe->_exCommandList.front(); + ex->handleMessage(); + g_fullpipe->_exCommandList.pop_front(); + } + g_fullpipe->_isProcessingMessages = false; + } +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index c8fe264da3..0ae11ff244 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -69,6 +69,8 @@ class ExCommand : public Message { virtual ~ExCommand() {} virtual bool load(MfcArchive &file); + + void handleMessage(); }; class CObjstateCommand : public CObject { @@ -138,7 +140,8 @@ int getMessageHandlersCount(); bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id); bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id); void clearMessageHandlers(); - +void postMessage(ExCommand *ex); +void processMessages(); } // End of namespace Fullpipe diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index 86b166e317..fb2279825e 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -26,12 +26,20 @@ namespace Fullpipe { class CBaseModalObject { - int _parentObj; + public: + + CBaseModalObject *_parentObj; public: CBaseModalObject() : _parentObj(0) {} -}; + virtual ~CBaseModalObject() {} + virtual bool handleMessage(ExCommand *message); + virtual bool init(int counterdiff); + virtual bool update(); + + void saveload(); +}; } // End of namespace Fullpipe diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 1771036749..602478cbb7 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -10,6 +10,7 @@ MODULE_OBJS = \ input.o \ inventory.o \ messages.o \ + modal.o \ motion.o \ ngiarchive.o \ scene.o \ diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index bb0d632186..146cd6e305 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -406,6 +406,11 @@ void Scene::updateScrolling() { warning("STUB Scene::updateScrolling()"); } +void Scene::update(int counterdiff) { + for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) + ((StaticANIObject *)*s)->update(counterdiff); +} + void Scene::drawContent(int minPri, int maxPri, bool drawBg) { if (!_picObjList.size() && !_bigPictureArray1Count) return; diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index b3dbdcc605..2a6fafd037 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -54,6 +54,8 @@ class Scene : public Background { void drawContent(int minPri, int maxPri, bool drawBG); void updateScrolling(); + void update(int counterdiff); + StaticANIObject *getAniMan(); StaticANIObject *getStaticANIObject1ById(int obj, int a3); StaticANIObject *getStaticANIObject1ByName(char *name, int a3); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 6c3ba3ff17..5d0ba0d7a6 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -352,6 +352,10 @@ Common::Point *StaticANIObject::getCurrDimensions(Common::Point &p) { return &p; } +void StaticANIObject::update(int counterdiff) { + warning("STUB: StaticANIObject::update(%d)", counterdiff); +} + Statics::Statics() { _staticsId = 0; _picture = 0; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index bfd7e70f99..ccac7dea11 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -195,6 +195,8 @@ class StaticANIObject : public GameObject { void initMovements(); void loadMovementsPixelData(); + void update(int counterdiff); + Statics *addReverseStatics(Statics *ani); void draw(); void draw2(); -- cgit v1.2.3 From 6e64897e725e06fe00a39629fdfd7dec35a9574f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 31 Jul 2013 20:08:37 +0300 Subject: FULLPIPE: Rename some CGameLoader members --- engines/fullpipe/gameloader.cpp | 8 ++++---- engines/fullpipe/gameloader.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 939da177f4..c627550275 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -62,8 +62,8 @@ CGameLoader::CGameLoader() { _preloadCallback = 0; _readSavegameCallback = 0; _gameVar = 0; - _preloadId1 = 0; - _preloadId2 = 0; + _preloadSceneId = 0; + _preloadEntranceId = 0; _updateCounter = 0; g_fullpipe->_msgX = 0; @@ -267,9 +267,9 @@ void CGameLoader::updateSystems(int counterdiff) { processMessages(); - if (_preloadId1) { + if (_preloadSceneId) { processMessages(); - preloadScene(_preloadId1, _preloadId2); + preloadScene(_preloadSceneId, _preloadEntranceId); } } diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 4ba48297af..e1a0bac95e 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -63,8 +63,8 @@ class CGameLoader : public CObject { char *_gameName; ExCommand _exCommand; int _updateCounter; - int _preloadId1; - int _preloadId2; + int _preloadSceneId; + int _preloadEntranceId; }; CInventory2 *getGameLoaderInventory(); -- cgit v1.2.3 From 633a0fcd86e47b16d77be32a822f3e57120b9796 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 31 Jul 2013 20:21:02 +0300 Subject: FULLPIPE: Fix scene loading --- engines/fullpipe/gameloader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index c627550275..7ae591911b 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -135,7 +135,7 @@ bool CGameLoader::loadScene(int sceneId) { if (idx < 0) return false; - if (st->_scene) + if (!st->_scene) st->loadScene(); if (st->_scene) { @@ -184,7 +184,7 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { sg->setSubVarAsInt("Entrance", entranceId); if (!g_fullpipe->sceneSwitcher(_sc2array[sc2idx]._entranceData[entranceIdx])) - return 0; + return false; g_fullpipe->_msgObjectId2 = 0; g_fullpipe->_msgY = -1; -- cgit v1.2.3 From 9232315880633e66f99e874623446664ca262719 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 2 Aug 2013 01:37:50 +0300 Subject: FULLPIPE: Fix CGameVar::addSubVar() --- engines/fullpipe/stateloader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index cf63df1d96..c49dafc947 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -318,12 +318,12 @@ bool CGameVar::addSubVar(CGameVar *subvar) { var->_nextVarObj = subvar; subvar->_prevVarObj = var; - subvar->_parentVarObj = var; + subvar->_parentVarObj = this; return true; } else { - var->_subVars = subvar; - subvar->_parentVarObj = var; + _subVars = subvar; + subvar->_parentVarObj = this; return true; } -- cgit v1.2.3 From c78803db2d38afed1cd0a55aff5b599c7441172c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 2 Aug 2013 02:04:03 +0300 Subject: FULLPIPE: Unstubbed ExCommand::handleMessage() --- engines/fullpipe/behavior.cpp | 2 +- engines/fullpipe/messages.cpp | 38 ++++++++++++++++++++++++++++++++++++-- engines/fullpipe/messages.h | 5 ++++- 3 files changed, 41 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index e9d4be8207..e7d1bc9858 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -33,7 +33,7 @@ BehaviorManager::BehaviorManager() { } void BehaviorManager::initBehavior(Scene *scene, CGameVar *var) { - warning("STUB: initBehavior()"); + warning("STUB: BehaviorManager::initBehavior()"); } } // End of namespace Fullpipe diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index ee9210f066..e7b317116c 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -79,8 +79,23 @@ bool ExCommand::load(MfcArchive &file) { return true; } -void ExCommand::handleMessage() { - warning("STUB: ExCommand::handleMessage()"); +bool ExCommand::handleMessage() { + int cnt = 0; + for (MessageHandler *m = g_fullpipe->_messageHandlers; m; m = m->nextItem) + cnt += m->callback(this); + + if (_messageKind == 17 || (_excFlags & 1)) { + if (_parId) { + MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_parId); + if (m) + m->update(); + } + } + + if (_excFlags & 2) + delete this; + + return (cnt > 0); } Message::Message() { @@ -213,6 +228,25 @@ bool MessageQueue::chain(StaticANIObject *ani) { return true; } +void MessageQueue::update() { + if (_counter > 0) + _counter--; + + if (_exCommands.size()) { + sendNextCommand(); + } else if (_counter == 0 ) { + _isFinished = 1; + finish(); + } +} + +void MessageQueue::sendNextCommand() { + warning("STUB: MessageQueue::sendNextCommand()"); +} + +void MessageQueue::finish() { + warning("STUB: MessageQueue::finish()"); +} MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { for (CPtrList::iterator s = begin(); s != end(); ++s) { diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 0ae11ff244..9a2f0134c9 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -70,7 +70,7 @@ class ExCommand : public Message { virtual bool load(MfcArchive &file); - void handleMessage(); + bool handleMessage(); }; class CObjstateCommand : public CObject { @@ -111,6 +111,9 @@ class MessageQueue : public CObject { void setFlags(int flags) { _flags = flags; } bool chain(StaticANIObject *ani); + void update(); + void sendNextCommand(); + void finish(); }; class GlobalMessageQueueList : public CPtrList { -- cgit v1.2.3 From da7ef001730b3fdefbf5bdae9a229484c332d4a9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 3 Aug 2013 00:26:34 +0300 Subject: FULLPIPE: Implement MessageQueue::sendNextCommand() --- engines/fullpipe/messages.cpp | 29 ++++++++++++++++++++++++++++- engines/fullpipe/messages.h | 3 +++ 2 files changed, 31 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index e7b317116c..9260da6438 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -98,6 +98,12 @@ bool ExCommand::handleMessage() { return (cnt > 0); } +void ExCommand::sendMessage() { + g_fullpipe->_exCommandList.push_back(this); + + processMessages(); +} + Message::Message() { _messageKind = 0; _parentId = 0; @@ -240,8 +246,29 @@ void MessageQueue::update() { } } +void MessageQueue::messageQueueCallback1(int par) { + warning("STUB: MessageQueue::messageQueueCallback1()"); +} + void MessageQueue::sendNextCommand() { - warning("STUB: MessageQueue::sendNextCommand()"); + if (_exCommands.size()) { + if (!(_flags & 4) && (_flags & 1)) { + messageQueueCallback1(16); + } + ExCommand *ex = (ExCommand *)_exCommands.front(); + _exCommands.remove_at(0); + + ex->handleMessage(); + _counter++; + ex->_parId = _id; + ex->_excFlags |= (ex->_field_24 == 0 ? 1 : 0) | (ex->_field_3C != 0 ? 2 : 0); + + _flags |= 4; + ex->sendMessage(); + } else if (_counter <= 0) { + _isFinished = 1; + finish(); + } } void MessageQueue::finish() { diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 9a2f0134c9..da91fd2189 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -71,6 +71,7 @@ class ExCommand : public Message { virtual bool load(MfcArchive &file); bool handleMessage(); + void sendMessage(); }; class CObjstateCommand : public CObject { @@ -114,6 +115,8 @@ class MessageQueue : public CObject { void update(); void sendNextCommand(); void finish(); + + void messageQueueCallback1(int par); }; class GlobalMessageQueueList : public CPtrList { -- cgit v1.2.3 From ce0af03a4a0bf7e52c9f2b8e53f107e66b6a8c6d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 3 Aug 2013 12:29:02 +0300 Subject: FULLPIPE: Implement Movement::initStatics() --- engines/fullpipe/statics.cpp | 34 +++++++++++++++++++++++++++++++++- engines/fullpipe/statics.h | 3 +++ 2 files changed, 36 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 5d0ba0d7a6..5b889d7818 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -562,7 +562,31 @@ Common::Point *Movement::getDimensionsOfPhase(Common::Point *p, int phaseIndex) } void Movement::initStatics(StaticANIObject *ani) { - warning("STUB: Movement::initStatics"); + if (!_currMovement) + return; + + _staticsObj2 = ani->addReverseStatics(_currMovement->_staticsObj2); + _staticsObj1 = ani->addReverseStatics(_currMovement->_staticsObj1); + + _mx = _currMovement->_mx; + _my = _currMovement->_my; + + _currMovement->setDynamicPhaseIndex(_currMovement->_updateFlag1 != 0 ? 1 : 0); + + Common::Point point; + + int x1 = _currMovement->_staticsObj1->getDimensions(&point)->x - _mx; + + _mx = x1 - _currMovement->_currDynamicPhase->getDimensions(&point)->x; + + _currMovement->setDynamicPhaseIndex(_currMovement->_currDynamicPhaseIndex); + + _m2x = _currMovement->_m2x; + _m2y = _currMovement->_m2y; + _currMovement->gotoLastFrame(); + + x1 = _currMovement->_staticsObj2->getDimensions(&point)->x; + _m2x = _currMovement->_currDynamicPhase->getDimensions(&point)->x - _m2x - x1; } void Movement::updateCurrDynamicPhase() { @@ -574,6 +598,10 @@ void Movement::updateCurrDynamicPhase() { } } +void Movement::setDynamicPhaseIndex(int index) { + warning("STUB: Movement::setDynamicPhaseIndex(%d)", index); +} + void Movement::loadPixelData() { Movement *mov = this; for (Movement *i = _currMovement; i; i = i->_currMovement) @@ -612,6 +640,10 @@ void Movement::gotoNextFrame(int callback1, int callback2) { warning("STUB: Movement::gotoNextFrame()"); } +void Movement::gotoLastFrame() { + warning("STUB: Movement::gotoLastFrame()"); +} + Common::Point *Movement::getCenter(Common::Point *p) { Common::Rect rect; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index ccac7dea11..e3711e6501 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -143,8 +143,11 @@ class Movement : public GameObject { void initStatics(StaticANIObject *ani); void updateCurrDynamicPhase(); + void setDynamicPhaseIndex(int index); + void removeFirstPhase(); void gotoNextFrame(int callback1, int callback2); + void gotoLastFrame(); void loadPixelData(); -- cgit v1.2.3 From 766c5552fe7162246afc46070c1bb27aa2ef2963 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 4 Aug 2013 03:46:50 +0300 Subject: FULLPIPE: Implement Movement::gotoLastFrame() and Movement::setDynamicPhaseIndex() --- engines/fullpipe/statics.cpp | 18 ++++++++++++++++-- engines/fullpipe/statics.h | 1 + 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 5b889d7818..20ce75f365 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -599,7 +599,11 @@ void Movement::updateCurrDynamicPhase() { } void Movement::setDynamicPhaseIndex(int index) { - warning("STUB: Movement::setDynamicPhaseIndex(%d)", index); + while (_currDynamicPhaseIndex < index) + gotoNextFrame(0, 0); + + while (_currDynamicPhaseIndex > index) + gotoPrevFrame(0, 0); } void Movement::loadPixelData() { @@ -640,8 +644,18 @@ void Movement::gotoNextFrame(int callback1, int callback2) { warning("STUB: Movement::gotoNextFrame()"); } +void Movement::gotoPrevFrame(int callback1, int callback2) { + warning("STUB: Movement::gotoPrevFrame()"); +} + void Movement::gotoLastFrame() { - warning("STUB: Movement::gotoLastFrame()"); + if (_currMovement) { + while ((uint)_currDynamicPhaseIndex != _currMovement->_dynamicPhases.size()) + gotoNextFrame(0, 0); + } else { + while ((uint)_currDynamicPhaseIndex != _dynamicPhases.size()) + gotoNextFrame(0, 0); + } } Common::Point *Movement::getCenter(Common::Point *p) { diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index e3711e6501..5366f71acd 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -147,6 +147,7 @@ class Movement : public GameObject { void removeFirstPhase(); void gotoNextFrame(int callback1, int callback2); + void gotoPrevFrame(int callback1, int callback2); void gotoLastFrame(); void loadPixelData(); -- cgit v1.2.3 From 35fbf39448f2450db4d03760a0a1e227a68c9cb0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 5 Aug 2013 00:17:53 +0300 Subject: FULLPIPE: Implement Movement::gotoNextFrame() --- engines/fullpipe/statics.cpp | 103 ++++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/statics.h | 1 + 2 files changed, 103 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 20ce75f365..0bb61fb803 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -641,7 +641,108 @@ void Movement::removeFirstPhase() { } void Movement::gotoNextFrame(int callback1, int callback2) { - warning("STUB: Movement::gotoNextFrame()"); + if (!callback2) { + if (_currMovement) { + if ((uint)_currDynamicPhaseIndex == _currMovement->_dynamicPhases.size() - 1 + && !(((DynamicPhase *)(_currMovement->_dynamicPhases.back()))->_countdown)) + return; + } else if ((uint)_currDynamicPhaseIndex == _dynamicPhases.size() - 1 + && !(((DynamicPhase *)(_dynamicPhases.back()))->_countdown)) + return; + } + + if (_currDynamicPhase->_countdown) { + _currDynamicPhase->_countdown--; + return; + } + + Common::Point point; + + getCurrDynamicPhaseXY(point); + _ox -= point.x; + _oy -= point.y; + + int deltax = 0; + + if (_currMovement) + deltax = _currMovement->getDimensionsOfPhase(&point, _currDynamicPhaseIndex)->x; + + int oldDynIndex = _currDynamicPhaseIndex; + + if (callback2) + ; //callback2(&_currDynamicPhaseIndex); + else + _currDynamicPhaseIndex++; + + if (_currMovement) { + if (_currMovement->_dynamicPhases.size() <= (uint)_currDynamicPhaseIndex) + _currDynamicPhaseIndex = _currMovement->_dynamicPhases.size() - 1; + if (_currDynamicPhaseIndex < 0) + _currDynamicPhaseIndex = 0; + if (_currMovement->_framePosOffsets) { + if (callback1) { + point = *_currMovement->_framePosOffsets[_currDynamicPhaseIndex]; + //callback1(_currDynamicPhaseIndex, &point, _ox, _oy); + + _ox += deltax - point.x; + _oy += point.y; + + _ox -= _currMovement->getDimensionsOfPhase(&point, _currDynamicPhaseIndex)->x; + } else if (oldDynIndex >= _currDynamicPhaseIndex) { + while (oldDynIndex > _currDynamicPhaseIndex) { + _ox += deltax; + deltax = _currMovement->getDimensionsOfPhase(&point, oldDynIndex)->x; + + _ox += _currMovement->_framePosOffsets[oldDynIndex]->x; + _oy -= _currMovement->_framePosOffsets[oldDynIndex]->y; + oldDynIndex--; + + _ox -= _currMovement->getDimensionsOfPhase(&point, oldDynIndex)->x; + } + } else { + for (int i = oldDynIndex + 1; i <= _currDynamicPhaseIndex; i++) { + _ox += deltax; + deltax = _currMovement->getDimensionsOfPhase(&point, i)->x; + _ox -= _currMovement->_framePosOffsets[i]->x; + _oy += _currMovement->_framePosOffsets[i]->y; + _ox -= _currMovement->getDimensionsOfPhase(&point, i)->x; + } + } + } + } else { + if (_dynamicPhases.size() <= (uint)_currDynamicPhaseIndex) + _currDynamicPhaseIndex = _dynamicPhases.size() - 1; + if (_currDynamicPhaseIndex < 0) + _currDynamicPhaseIndex = 0; + + if (_framePosOffsets) { + if (callback1) { + point.x = _framePosOffsets[_currDynamicPhaseIndex]->x; + point.y = _framePosOffsets[_currDynamicPhaseIndex]->y; + + //callback1(_currDynamicPhaseIndex, &point, _ox, _oy); + _ox += point.x; + _oy += point.y; + } else if (oldDynIndex >= _currDynamicPhaseIndex) { + for (int i = oldDynIndex; i > _currDynamicPhaseIndex; i--) { + _ox -= _framePosOffsets[i]->x; + _oy -= _framePosOffsets[i]->y; + } + } else { + for (int i = oldDynIndex + 1; i <= _currDynamicPhaseIndex; i++) { + _ox += _framePosOffsets[i]->x; + _oy += _framePosOffsets[i]->y; + } + } + } + } + + updateCurrDynamicPhase(); + getCurrDynamicPhaseXY(point); + _ox += point.x; + _oy += point.y; + + _currDynamicPhase->_countdown = _currDynamicPhase->_initialCountdown; } void Movement::gotoPrevFrame(int callback1, int callback2) { diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 5366f71acd..c80956cf74 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -46,6 +46,7 @@ class CStepArray : public CObject { class StaticPhase : public Picture { friend class DynamicPhase; + friend class Movement; int16 _initialCountdown; int16 _countdown; -- cgit v1.2.3 From ab190d2f0b4c102d277b16adf66269d9a6380b81 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 5 Aug 2013 21:25:41 +0300 Subject: FULLPIPE: Fix Movement::gotoLastFrame() --- engines/fullpipe/statics.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 0bb61fb803..d54b1d1c89 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -641,14 +641,18 @@ void Movement::removeFirstPhase() { } void Movement::gotoNextFrame(int callback1, int callback2) { + debug(0, "Movement::gotoNextFrame(%d, %d)", callback1, callback2); + if (!callback2) { if (_currMovement) { if ((uint)_currDynamicPhaseIndex == _currMovement->_dynamicPhases.size() - 1 - && !(((DynamicPhase *)(_currMovement->_dynamicPhases.back()))->_countdown)) + && !(((DynamicPhase *)(_currMovement->_dynamicPhases.back()))->_countdown)) { return; + } } else if ((uint)_currDynamicPhaseIndex == _dynamicPhases.size() - 1 - && !(((DynamicPhase *)(_dynamicPhases.back()))->_countdown)) + && !(((DynamicPhase *)(_dynamicPhases.back()))->_countdown)) { return; + } } if (_currDynamicPhase->_countdown) { @@ -751,10 +755,10 @@ void Movement::gotoPrevFrame(int callback1, int callback2) { void Movement::gotoLastFrame() { if (_currMovement) { - while ((uint)_currDynamicPhaseIndex != _currMovement->_dynamicPhases.size()) + while ((uint)_currDynamicPhaseIndex != _currMovement->_dynamicPhases.size() - 1) gotoNextFrame(0, 0); } else { - while ((uint)_currDynamicPhaseIndex != _dynamicPhases.size()) + while ((uint)_currDynamicPhaseIndex != _dynamicPhases.size() - 1) gotoNextFrame(0, 0); } } -- cgit v1.2.3 From 7257d8804b8b05d8078055b9e705ea0cbe7e465f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 6 Aug 2013 01:50:16 +0300 Subject: FULLPIPE: Implement CGameLoader::applyPicAniInfos() --- engines/fullpipe/gameloader.cpp | 47 +++++++++++++++++++++++++++++++++++++++- engines/fullpipe/gfx.cpp | 42 +++++++++++++++++++++++++++++++++++ engines/fullpipe/gfx.h | 7 ++++++ engines/fullpipe/objects.h | 2 +- engines/fullpipe/stateloader.cpp | 2 +- engines/fullpipe/statics.cpp | 43 +++++++++++++++++++++++++++++++++++- engines/fullpipe/statics.h | 6 +++++ 7 files changed, 145 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 7ae591911b..46cd557396 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -251,7 +251,52 @@ int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) { } void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount) { - warning("STUB: CGameLoader::applyPicAniInfo()"); + if (picAniInfoCount <= 0) + return; + + PictureObject *pict; + StaticANIObject *ani; + + for (int i = 0; i < picAniInfoCount; i++) { + if (picAniInfo[i]->type & 2) { + pict = sc->getPictureObjectById(picAniInfo[i]->objectId, picAniInfo[i]->field_8); + if (pict) { + pict->setPicAniInfo(picAniInfo[i]); + continue; + } + pict = sc->getPictureObjectById(picAniInfo[i]->objectId, 0); + if (pict) { + PictureObject *pictNew = new PictureObject(pict); + + sc->_picObjList.push_back(pictNew); + pictNew->setPicAniInfo(picAniInfo[i]); + continue; + } + } else { + if (!(picAniInfo[i]->type & 1)) + continue; + + Scene *scNew = g_fullpipe->accessScene(picAniInfo[i]->sceneId); + if (!scNew) + continue; + + ani = sc->getStaticANIObject1ById(picAniInfo[i]->objectId, picAniInfo[i]->field_8); + if (ani) { + ani->setPicAniInfo(picAniInfo[i]); + continue; + } + + ani = scNew->getStaticANIObject1ById(picAniInfo[i]->objectId, 0); + if (ani) { + StaticANIObject *aniNew = new StaticANIObject(ani); + + sc->addStaticANIObject(aniNew, 1); + + aniNew->setPicAniInfo(picAniInfo[i]); + continue; + } + } + } } void CGameLoader::updateSystems(int counterdiff) { diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 997c0b620b..c677d0e378 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -119,6 +119,13 @@ PictureObject::PictureObject() { _picture = 0; } +PictureObject::PictureObject(PictureObject *src) : GameObject(src) { + _picture = src->_picture; + _ox2 = _ox; + _oy2 = _oy; + _pictureObject2List = src->_pictureObject2List; +} + bool PictureObject::load(MfcArchive &file, bool bigPicture) { debug(5, "PictureObject::load()"); GameObject::load(file); @@ -164,6 +171,26 @@ void PictureObject::draw() { _picture->draw(_ox, _oy, 0, 0); } +bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) { + if (!(picAniInfo->type & 2) || (picAniInfo->type & 1)) { + error("Picture::setPicAniInfo(): Wrong type: %d", picAniInfo->type); + + return false; + } + + if (picAniInfo->type & 2) { + setOXY(picAniInfo->ox, picAniInfo->oy); + _priority = picAniInfo->priority; + _field_4 = picAniInfo->field_8; + setFlags(picAniInfo->flags); + _field_8 = picAniInfo->field_24; + + return true; + } + + return false; +} + GameObject::GameObject() { _field_4 = 0; _flags = 0; @@ -175,6 +202,21 @@ GameObject::GameObject() { _field_8 = 0; } +GameObject::GameObject(GameObject *src) { + _field_4 = 1; + _flags = 0; + _id = src->_id; + + _objectName = (char *)calloc(strlen(src->_objectName) + 1, 1); + strncpy(_objectName, src->_objectName, strlen(src->_objectName)); + + _ox = src->_ox; + _oy = src->_oy; + _priority = src->_priority; + _field_20 = 1; + _field_8 = src->_field_8; +} + bool GameObject::load(MfcArchive &file) { debug(5, "GameObject::load()"); _field_4 = 0; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 1dbdd28b44..2ee34e1a1a 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -29,6 +29,7 @@ namespace Fullpipe { class DynamicPhase; class Movement; +struct PicAniInfo; struct Bitmap { int _x; @@ -121,6 +122,8 @@ class GameObject : public CObject { public: GameObject(); + GameObject(GameObject *src); + virtual bool load(MfcArchive &file); void setOXY(int x, int y); void renumPictures(CPtrList *lst); @@ -138,9 +141,13 @@ class PictureObject : public GameObject { public: PictureObject(); + PictureObject(PictureObject *src); + bool load(MfcArchive &file, bool bigPicture); Common::Point *getDimensions(Common::Point *p); void draw(); + + bool setPicAniInfo(PicAniInfo *picAniInfo); }; class Background : public CObject { diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index ba65181cf8..133320f326 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -86,7 +86,7 @@ struct PicAniInfo { int16 objectId; int16 field_6; int32 field_8; - int16 field_C; + int16 sceneId; int16 field_E; int32 ox; int32 oy; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index c49dafc947..cd931b136c 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -420,7 +420,7 @@ bool PicAniInfo::load(MfcArchive &file) { objectId = file.readUint16LE(); field_6 = file.readUint16LE(); field_8 = file.readUint32LE(); - field_C = file.readUint16LE(); + sceneId = file.readUint16LE(); field_E = file.readUint16LE(); ox = file.readUint32LE(); oy = file.readUint32LE(); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index d54b1d1c89..72a10807f5 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -79,6 +79,10 @@ StaticANIObject::StaticANIObject() { _someDynamicPhaseIndex = -1; } +StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { + warning("STUB: StaticANIObject(src)"); +} + bool StaticANIObject::load(MfcArchive &file) { debug(5, "StaticANIObject::load()"); @@ -269,7 +273,7 @@ void StaticANIObject::draw() { angle = _field_30 ^ 0x4000; } - if (!_movement || _flags & 0x20) { + if (!_movement || (_flags & 0x20)) { _statics->getSomeXY(point); _statics->_x = _ox - point.x; _statics->_y = _oy - point.y; @@ -356,6 +360,43 @@ void StaticANIObject::update(int counterdiff) { warning("STUB: StaticANIObject::update(%d)", counterdiff); } +bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { + if (!(picAniInfo->type & 3)) { + warning("StaticANIObject::setPicAniInfo(): Wrong type: %d", picAniInfo->type); + + return false; + } + + if (picAniInfo->type & 3) { + setOXY(picAniInfo->ox, picAniInfo->oy); + _priority = picAniInfo->priority; + _field_4 = picAniInfo->field_8; + setFlags(picAniInfo->flags); + _field_8 = picAniInfo->field_24; + } + + if (picAniInfo->type & 1) { + _messageQueueId = picAniInfo->type >> 16; + + if (picAniInfo->staticsId) + _statics = getStaticsById(picAniInfo->staticsId); + else + _statics = 0; + + if (picAniInfo->movementId) { + _movement = getMovementById(picAniInfo->movementId); + if (_movement) + _movement->setDynamicPhaseIndex(picAniInfo->dynamicPhaseIndex); + } else { + _movement = 0; + } + + setSomeDynamicPhaseIndex(picAniInfo->someDynamicPhaseIndex); + } + + return true; +} + Statics::Statics() { _staticsId = 0; _picture = 0; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index c80956cf74..e21f06666d 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -184,6 +184,8 @@ class StaticANIObject : public GameObject { public: StaticANIObject(); + StaticANIObject(StaticANIObject *src); + virtual bool load(MfcArchive &file); void setOXY(int x, int y); @@ -200,6 +202,10 @@ class StaticANIObject : public GameObject { void initMovements(); void loadMovementsPixelData(); + bool setPicAniInfo(PicAniInfo *picAniInfo); + + void setSomeDynamicPhaseIndex(int val) { _someDynamicPhaseIndex = val; } + void update(int counterdiff); Statics *addReverseStatics(Statics *ani); -- cgit v1.2.3 From 6d92638e7f1eba7d348488cee693ad4c0ab4ce0a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 6 Aug 2013 01:58:01 +0300 Subject: FULLPIPE: Fixed scene object sorting --- engines/fullpipe/scene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 146cd6e305..80130f9a3a 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -370,7 +370,7 @@ void Scene::initObjectCursors(const char *name) { } bool Scene::compareObjPriority(const void *p1, const void *p2) { - if (((StaticANIObject *)p1)->_priority < ((StaticANIObject *)p2)->_priority) + if (((StaticANIObject *)p1)->_priority > ((StaticANIObject *)p2)->_priority) return true; return false; -- cgit v1.2.3 From 8a84a1133fcc21a4115826755bfa1a534b735815 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 6 Aug 2013 21:31:48 +0300 Subject: FULLPIPE: Implement copy constructor for StaticANIObject --- engines/fullpipe/statics.cpp | 81 +++++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/statics.h | 4 +++ 2 files changed, 84 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 72a10807f5..6939005b22 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -80,7 +80,36 @@ StaticANIObject::StaticANIObject() { } StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { - warning("STUB: StaticANIObject(src)"); + _shadowsOn = src->_shadowsOn; + _field_30 = src->_field_30; + _field_34 = 1; + _initialCounter = 0; + + _messageQueueId = 0; + _animExFlag = 0; + _counter = 0; + _someDynamicPhaseIndex = -1; + _sceneId = src->_sceneId; + _callback1 = src->_callback1; + _callback2 = src->_callback2; + + for (uint i = 0; i < src->_staticsList.size(); i++) + _staticsList.push_back(new Statics((Statics *)src->_staticsList[i], 0)); + + _movement = 0; + _statics = 0; + + for (uint i = 0; i < src->_movements.size(); i++) { + Movement *mov; + if (((Movement *)src->_movements[i])->_currMovement) { + mov = new Movement(getMovementById(src->getMovementIdById(((Movement *)src->_movements[i])->_id)), this); + mov->_id = ((Movement *)src->_movements[i])->_id; + } else { + mov = new Movement(((Movement *)src->_movements[i]), 0, -1, this); + } + + _movements.push_back(mov); + } } bool StaticANIObject::load(MfcArchive &file) { @@ -192,6 +221,20 @@ Movement *StaticANIObject::getMovementById(int itemId) { return 0; } +int StaticANIObject::getMovementIdById(int itemId) { + for (uint i = 0; i < _movements.size(); i++) { + Movement *mov = (Movement *)_movements[i]; + if (mov->_currMovement) { + if (mov->_id == itemId) + return mov->_id; + if (mov->_currMovement->_id == itemId) + return mov->_id; + } + } + + return 0; +} + Movement *StaticANIObject::getMovementByName(char *name) { for (uint i = 0; i < _movements.size(); i++) if (!strcmp(((Movement *)_movements[i])->_objectName, name)) @@ -487,6 +530,42 @@ Movement::Movement() { _counterMax = 83; } +Movement::Movement(Movement *src, StaticANIObject *ani) { + _lastFrameSpecialFlag = 0; + _flipFlag = src->_flipFlag; + _updateFlag1 = src->_updateFlag1; + _staticsObj1 = 0; + _staticsObj2 = 0; + _mx = 0; + _my = 0; + _m2x = 0; + _m2y = 0; + + _field_78 = 0; + _framePosOffsets = 0; + _field_84 = 0; + _currDynamicPhase = 0; + _field_8C = 0; + _currDynamicPhaseIndex = src->_currDynamicPhaseIndex; + _field_94 = 0; + + _currMovement = src; + _ox = src->_ox; + _oy = src->_oy; + + initStatics(ani); + + _counterMax = src->_counterMax; + _counter = src->_counter; + _field_50 = src->_field_50; + + updateCurrDynamicPhase(); +} + +Movement::Movement(Movement *src, int *flag1, int flag2, StaticANIObject *ani) { + warning("STUB: Movement(src, %p, %d, ani)", (void *)flag1, flag2); +} + bool Movement::load(MfcArchive &file) { warning("STUB: Movement::load"); return true; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index e21f06666d..9e800c2b67 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -134,6 +134,9 @@ class Movement : public GameObject { public: Movement(); + Movement(Movement *src, StaticANIObject *ani); + Movement(Movement *src, int *flag1, int flag2, StaticANIObject *ani); + virtual bool load(MfcArchive &file); bool load(MfcArchive &file, StaticANIObject *ani); @@ -191,6 +194,7 @@ class StaticANIObject : public GameObject { void setOXY(int x, int y); Statics *getStaticsById(int id); Movement *getMovementById(int id); + int getMovementIdById(int itemId); Movement *getMovementByName(char *name); Common::Point *getCurrDimensions(Common::Point &p); -- cgit v1.2.3 From 133a77887f51ba2a01c3a6839606f121326637f9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 7 Aug 2013 00:43:08 +0300 Subject: FULLPIPE: Started work on intro --- engines/fullpipe/constants.h | 1 + engines/fullpipe/fullpipe.cpp | 5 +++++ engines/fullpipe/fullpipe.h | 4 ++++ engines/fullpipe/messages.cpp | 8 ++++---- engines/fullpipe/messages.h | 6 ++---- engines/fullpipe/modal.h | 13 +++++++++++++ engines/fullpipe/scene.h | 2 ++ engines/fullpipe/scenes.cpp | 27 +++++++++++++++++--------- engines/fullpipe/scenes.h | 44 +++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 93 insertions(+), 17 deletions(-) create mode 100644 engines/fullpipe/scenes.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index b609d7b1c6..f578d0c708 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -56,6 +56,7 @@ namespace Fullpipe { #define PIC_CSR_ITN_RED 5329 #define PIC_CSR_LIFT 5176 #define PIC_CSR_MAP 5339 +#define PIC_IN1_PIPETITLE 5167 #define PIC_INV_MENU 991 #define PIC_MAP_A13 5275 #define PIC_MAP_S01 5223 diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index e762331acc..9585f07836 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -33,10 +33,12 @@ #include "fullpipe/behavior.h" #include "fullpipe/modal.h" #include "fullpipe/input.h" +#include "fullpipe/scenes.h" namespace Fullpipe { FullpipeEngine *g_fullpipe = 0; +Vars *g_vars = 0; FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) { // Setup mixer @@ -61,6 +63,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _soundEnabled = true; _flgSoundList = true; + _sfxVolume = 0; + _inputController = 0; _inputDisabled = false; @@ -99,6 +103,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _cursorId = 0; g_fullpipe = this; + g_vars = new Vars; } FullpipeEngine::~FullpipeEngine() { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 15bb28ff0e..c76236e43f 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -60,6 +60,7 @@ class NGIArchive; class Scene; class SoundList; class StaticANIObject; +class Vars; int global_messageHandler1(ExCommand *cmd); int global_messageHandler2(ExCommand *cmd); @@ -126,6 +127,8 @@ public: bool _soundEnabled; bool _flgSoundList; + int _sfxVolume; + GlobalMessageQueueList *_globalMessageQueueList; MessageHandler *_messageHandlers; @@ -201,6 +204,7 @@ public: }; extern FullpipeEngine *g_fullpipe; +extern Vars *g_vars; } // End of namespace Fullpipe diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 9260da6438..0b1fec9bc6 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -62,7 +62,7 @@ bool ExCommand::load(MfcArchive &file) { _sceneClickY = file.readUint32LE(); _field_20 = file.readUint32LE(); _field_24 = file.readUint32LE(); - _param28 = file.readUint32LE(); + _keyCode = file.readUint32LE(); _field_2C = file.readUint32LE(); _field_30 = file.readUint32LE(); _field_34 = file.readUint32LE(); @@ -114,7 +114,7 @@ Message::Message() { _sceneClickY = 0; _field_20 = 0; _field_24 = 0; - _param28 = 0; + _keyCode = 0; _field_2C = 0; _field_30 = 0; _field_34 = 0; @@ -130,7 +130,7 @@ Message::Message(Message *src) { _sceneClickY = src->_sceneClickY; _field_20 = src->_field_20; _field_24 = src->_field_24; - _param28 = src->_param28; + _keyCode = src->_keyCode; _field_2C = src->_field_2C; _field_30 = src->_field_30; _field_34 = src->_field_34; @@ -146,7 +146,7 @@ Message::Message(int16 parentId, int messageKind, int x, int y, int a6, int a7, _sceneClickY = sceneClickY; _field_24 = a7; _field_20 = a10; - _param28 = 0; + _keyCode = 0; _field_2C = 0; _field_30 = 0; _field_34 = 0; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index da91fd2189..b59b5947ee 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -42,7 +42,7 @@ class Message : public CObject { int _sceneClickY; int _field_20; int _field_24; - int _param28; + int _keyCode; int _field_2C; int _field_30; int _field_34; @@ -54,15 +54,13 @@ class Message : public CObject { }; class ExCommand : public Message { - friend class CGameLoader; - friend class MessageQueue; + public: int _messageNum; int _field_3C; int _excFlags; int _parId; - public: ExCommand(); ExCommand(ExCommand *src); ExCommand(int16 parentId, int messageKind, int messageNum, int x, int y, int a7, int a8, int sceneClickX, int sceneClickY, int a11); diff --git a/engines/fullpipe/modal.h b/engines/fullpipe/modal.h index fb2279825e..73236e8e5b 100644 --- a/engines/fullpipe/modal.h +++ b/engines/fullpipe/modal.h @@ -41,6 +41,19 @@ class CBaseModalObject { void saveload(); }; +class CModalIntro : public CBaseModalObject { + int _field_8; + int _introFlags; + int _countDown; + int _needRedraw; + int _sfxVolume; + + public: + CModalIntro(); + + virtual bool handleMessage(ExCommand *message); +}; + } // End of namespace Fullpipe #endif /* FULLPIPE_MODAL_H */ diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 2a6fafd037..defa3851e8 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -27,6 +27,8 @@ namespace Fullpipe { +class MessageQueue; + class Scene : public Background { friend class FullpipeEngine; friend class SceneTag; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 68be347402..5af9d98b01 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -35,6 +35,8 @@ #include "fullpipe/behavior.h" #include "fullpipe/constants.h" +#include "fullpipe/scenes.h" +#include "fullpipe/modal.h" namespace Fullpipe { @@ -42,6 +44,15 @@ int sceneIntro_updateCursor(); void sceneIntro_initScene(Scene *sc); int sceneHandlerIntro(ExCommand *cmd); +Vars::Vars() { + sceneIntro_aniin1man = 0; + sceneIntro_needSleep = true; + sceneIntro_needGetup = false; + sceneIntro_skipIntro = true; + sceneIntro_playing = false; + sceneIntro_needBlackout = false; +} + bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { CGameVar *sceneVar; Common::Point sceneDim; @@ -657,20 +668,18 @@ int sceneIntro_updateCursor() { void sceneIntro_initScene(Scene *sc) { g_fullpipe->_gameLoader->loadScene(SC_INTRO2); - warning("STUB: sceneIntro_initScene()"); + g_vars->sceneIntro_aniin1man = sc->getStaticANIObject1ById(ANI_IN1MAN, -1); + g_vars->sceneIntro_needSleep = true; + g_vars->sceneIntro_needGetup = false; + g_vars->sceneIntro_playing = true; + g_vars->sceneIntro_needBlackout = false; #if 0 - sceneIntro_aniin1man = sc->_getStaticANIObject1ById(ANI_IN1MAN, -1); - sceneIntro_needSleep = 1; - sceneIntro_needGetup = 0; - sceneIntro_dword_477938 = 1; - sceneIntro_dword_477934 = 0; - if (g_fullpipe->_recordEvents || g_fullpipe->_inputArFlag) - sceneIntro_skipIntro = 0; + g_vars->sceneIntro_skipIntro = false; +#endif g_fullpipe->_modalObject = new CModalIntro; -#endif } int sceneHandlerIntro(ExCommand *cmd) { diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h new file mode 100644 index 0000000000..9466e14b96 --- /dev/null +++ b/engines/fullpipe/scenes.h @@ -0,0 +1,44 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_SCENES_H +#define FULLPIPE_SCENES_H + +namespace Fullpipe { + +class StaticANIObject; + +class Vars { + public: + Vars(); + + StaticANIObject *sceneIntro_aniin1man; + bool sceneIntro_needSleep; + bool sceneIntro_needGetup; + bool sceneIntro_skipIntro; + bool sceneIntro_playing; + bool sceneIntro_needBlackout; +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_SCENES_H */ -- cgit v1.2.3 From ea91b8f7998cc4a06f4f5d8732a1b9b0309d95d2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 7 Aug 2013 20:52:23 +0300 Subject: FULLPIPE: Initial code for SC_1 --- engines/fullpipe/constants.h | 5 +++ engines/fullpipe/fullpipe.cpp | 12 +++++- engines/fullpipe/fullpipe.h | 2 + engines/fullpipe/gfx.cpp | 11 +++++- engines/fullpipe/init.cpp | 2 +- engines/fullpipe/objectnames.h | 2 +- engines/fullpipe/scene.cpp | 2 +- engines/fullpipe/scenes.cpp | 85 +++++++++++++++++++++++++++++++++++------- engines/fullpipe/scenes.h | 4 ++ engines/fullpipe/utils.h | 1 + 10 files changed, 107 insertions(+), 19 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index f578d0c708..53a0831f1b 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -25,6 +25,7 @@ namespace Fullpipe { +#define ANI_BOOT_1 4231 #define ANI_IN1MAN 5110 #define ANI_INV_MAP 5321 #define ANI_MAN 322 @@ -60,6 +61,9 @@ namespace Fullpipe { #define PIC_INV_MENU 991 #define PIC_MAP_A13 5275 #define PIC_MAP_S01 5223 +#define PIC_SC1_KUCHKA 1321 +#define PIC_SC1_OSK 1018 +#define PIC_SC1_OSK2 2932 #define SC_1 301 #define SC_10 653 #define SC_11 654 @@ -112,6 +116,7 @@ namespace Fullpipe { #define SC_MAP 5222 #define SC_TEST 903 #define SC_TITLES 5166 +#define ST_LBN_2N 2756 #define ST_MAN_EMPTY 476 #define TrubaDown 697 #define TrubaLeft 474 diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 9585f07836..2a5ceb1671 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -55,6 +55,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _pictureScale = 8; _scrollSpeed = 0; _currSoundListCount = 0; + _globalPalette = 0; _updateTicks = 0; @@ -72,7 +73,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _gameContinue = true; _needRestart = false; - _flgPlayIntro = true; + _flgPlayIntro = false; _flgSavegameMenuRequested = false; _isProcessingMessages = false; @@ -275,6 +276,15 @@ int FullpipeEngine::getObjectEnumState(const char *name, const char *state) { return 0; } +int FullpipeEngine::getObjectState(const char *objname) { + CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); + + if (var) + return var->getSubVarAsInt(objname); + + return 0; +} + void FullpipeEngine::setObjectState(const char *name, int state) { CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES"); diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index c76236e43f..85538e7cb2 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -118,6 +118,7 @@ public: Scene *_scene2; StaticANIObject *_aniMan; StaticANIObject *_aniMan2; + byte *_globalPalette; CInputController *_inputController; bool _inputDisabled; @@ -185,6 +186,7 @@ public: int _cursorId; + int getObjectState(const char *objname); void setObjectState(const char *name, int state); int getObjectEnumState(const char *name, const char *state); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index c677d0e378..8996337e2f 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -427,6 +427,15 @@ void Picture::draw(int x, int y, int style, int angle) { warning("Picture:draw: alpha = %0x", _alpha); } + byte *pal = _paletteData; + + if (!pal) { + pal = g_fullpipe->_globalPalette; + + if (!pal) + error("Picture::draw(): Both global and local palettes are empty"); + } + switch (style) { case 1: //flip @@ -439,7 +448,7 @@ void Picture::draw(int x, int y, int style, int angle) { if (angle) drawRotated(x1, y1, angle); else - _bitmap->putDib(x1, y1, (int32 *)_paletteData); + _bitmap->putDib(x1, y1, (int32 *)pal); } } diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp index 4e3520997a..f4a62aabb3 100644 --- a/engines/fullpipe/init.cpp +++ b/engines/fullpipe/init.cpp @@ -35,7 +35,7 @@ void FullpipeEngine::initObjectStates() { setLevelStates(); setObjectState(sO_Dude, getObjectEnumState(sO_Dude, sO_NotCarryingEgg)); - setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_NotCrackedEggs)); + setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_DidNotCrackEgg)); setObjectState(sO_GuvTheDrawer, getObjectEnumState(sO_GuvTheDrawer, sO_Awaken)); setObjectState(sO_EggGulper, getObjectEnumState(sO_EggGulper, sO_First)); setObjectState(sO_EggGulperGaveCoin, getObjectEnumState(sO_EggGulperGaveCoin, sO_No)); diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h index 39c4e5dd76..3eaaf7046f 100644 --- a/engines/fullpipe/objectnames.h +++ b/engines/fullpipe/objectnames.h @@ -128,7 +128,7 @@ #define sO_NotTaken "\xcd\xe5 \xe2\xe7\xff\xf2" // "Не взят" #define sO_NotHanging "\xcd\xe5 \xe2\xe8\xf1\xe8\xf2" // "Не висит" #define sO_NotGrown "\xcd\xe5 \xe2\xfb\xf0\xee\xf1" // "Не вырос" -#define sO_NotCrackedEggs "\xcd\xe5 \xea\xee\xeb\xee\xeb \xff\xe9\xf6\xee" // "Не колол яйцо" +#define sO_DidNotCrackEgg "\xcd\xe5 \xea\xee\xeb\xee\xeb \xff\xe9\xf6\xee" // "Не колол яйцо" #define sO_NotFallen "\xcd\xe5 \xef\xe0\xe4\xe0\xeb" // "Не падал" #define sO_NotAvailable "\xcd\xe5\xe4\xee\xf1\xf2\xf3\xef\xed\xe0" // "Недоступна" #define sO_CannotTake "\xcd\xe5\xeb\xfc\xe7\xff \xe2\xe7\xff\xf2\xfc" // "Нельзя взять" diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 80130f9a3a..13a25b78e5 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -416,7 +416,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { return; if (_palette) { - warning("Scene palette is ignored"); + g_fullpipe->_globalPalette = _palette->_data; } debug(0, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg); diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 5af9d98b01..d2a75c150d 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -35,15 +35,23 @@ #include "fullpipe/behavior.h" #include "fullpipe/constants.h" +#include "fullpipe/objectnames.h" #include "fullpipe/scenes.h" #include "fullpipe/modal.h" namespace Fullpipe { +int defaultUpdateCursor(); +void setElevatorButton(const char *name, int state); + int sceneIntro_updateCursor(); void sceneIntro_initScene(Scene *sc); int sceneHandlerIntro(ExCommand *cmd); +void scene01_fixEntrance(); +void scene01_initScene(Scene *sc, int entrance); +int sceneHandler01(ExCommand *cmd); + Vars::Vars() { sceneIntro_aniin1man = 0; sceneIntro_needSleep = true; @@ -153,19 +161,19 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { _updateCursorCallback = sceneIntro_updateCursor; break; -#if 0 case SC_1: - scene01_sub_40E160(); + scene01_fixEntrance(); sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_1"); scene->preloadMovements(sceneVar); - scene01_initScene(scene, entrance->field_4); + scene01_initScene(scene, entrance->_field_4); _behaviorManager->initBehavior(scene, sceneVar); scene->initObjectCursors("SC_1"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler01, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; +#if 0 case SC_2: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_2"); scene->preloadMovements(sceneVar); @@ -174,7 +182,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_2"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler02, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_3: @@ -208,7 +216,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_5"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler05, 2, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_6: @@ -231,7 +239,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_7"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler07, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_8: @@ -288,7 +296,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_12"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler12, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_13: @@ -299,7 +307,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_13"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler13, 2, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_14: @@ -397,7 +405,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_20"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler20, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_21: @@ -444,7 +452,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler24, 2); scene24_sub_423DD0(); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_25: @@ -523,7 +531,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_31"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler31, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_32: @@ -570,7 +578,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_35"); setSceneMusicParameters(sceneVar); insertMessageHandler(sceneHandler35, 2, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_36: @@ -603,7 +611,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_38"); setSceneMusicParameters(sceneVar); addMessageHandler(sceneHandler38, 2); - _updateCursorCallback = defaultUpdateCursorCallback; + _updateCursorCallback = defaultUpdateCursor; break; case SC_FINAL1: @@ -635,6 +643,13 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { return true; } +void setElevatorButton(const char *name, int state) { + CGameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons); + + if (var) + var->setSubVarAsInt(name, state); +} + int global_messageHandler1(ExCommand *cmd) { warning("STUB: global_messageHandler1()"); @@ -659,6 +674,12 @@ int global_messageHandler4(ExCommand *cmd) { return 0; } +int defaultUpdateCursor() { + warning("STUB: defaultUpdateCursor"); + + return g_fullpipe->_cursorId; +} + int sceneIntro_updateCursor() { g_fullpipe->_cursorId = 0; @@ -688,4 +709,40 @@ int sceneHandlerIntro(ExCommand *cmd) { return 0; } +void scene01_fixEntrance() { + CGameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME"); + if (var->getSubVarAsInt("Entrance") == TrubaLeft) + var->setSubVarAsInt("Entrance", TrubaRight); +} + +void scene01_initScene(Scene *sc, int entrance) { + g_vars->scene01_unused = 0; + + g_vars->scene01_picSc01Osk = sc->getPictureObjectById(PIC_SC1_OSK, 0); + g_vars->scene01_picSc01Osk->_flags &= 0xFFFB; + + g_vars->scene01_picSc01Osk2 = sc->getPictureObjectById(PIC_SC1_OSK2, 0); + g_vars->scene01_picSc01Osk2->_flags &= 0xFFFB; + + if (g_fullpipe->getObjectState(sO_EggCracker) == g_fullpipe->getObjectEnumState(sO_EggCracker, sO_DidNotCrackEgg)) { + PictureObject *pic = sc->getPictureObjectById(PIC_SC1_KUCHKA, 0); + if (pic) + pic->_flags &= 0xFFFB; + } + + if (entrance != TrubaLeft ) { + StaticANIObject *bootAnim = sc->getStaticANIObject1ById(ANI_BOOT_1, -1); + if (bootAnim) + bootAnim->_flags &= 0xFFFB; + } + + setElevatorButton(sO_Level2, ST_LBN_2N); +} + +int sceneHandler01(ExCommand *cmd) { + warning("STUB: sceneHandler01()"); + + return 0; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index 9466e14b96..da3ac5162c 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -37,6 +37,10 @@ class Vars { bool sceneIntro_skipIntro; bool sceneIntro_playing; bool sceneIntro_needBlackout; + + int scene01_unused; + PictureObject *scene01_picSc01Osk; + PictureObject *scene01_picSc01Osk2; }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 70a057c82a..00ae76eac7 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -79,6 +79,7 @@ class CObList : public Common::List, public CObject { class MemoryObject : CObject { friend class Picture; + friend class Scene; protected: char *_memfilename; -- cgit v1.2.3 From 1d55aa0c6ecade00b1b31932a86dd2f97b377882 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 8 Aug 2013 01:14:24 +0300 Subject: FULLPIPE: Attempt to fix crash on SC_1 startup. Domino is missing --- engines/fullpipe/fullpipe.cpp | 15 ++++----------- engines/fullpipe/fullpipe.h | 2 +- engines/fullpipe/gameloader.cpp | 3 +++ engines/fullpipe/gfx.cpp | 21 +++++++++++++-------- engines/fullpipe/scene.cpp | 14 +++++++------- engines/fullpipe/stateloader.cpp | 21 +++++++++++++-------- engines/fullpipe/statics.cpp | 16 ++++++++++++---- 7 files changed, 53 insertions(+), 39 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 2a5ceb1671..b71021bc66 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -133,24 +133,17 @@ Common::Error FullpipeEngine::run() { _isSaveAllowed = false; - if (!loadGam("fullpipe.gam")) - return Common::kNoGameDataFoundError; - - EntranceInfo ent; - + int scene = 0; if (ConfMan.hasKey("boot_param")) - ent._sceneId = ConfMan.getInt("boot_param"); - else - ent._sceneId = 3896; + scene = ConfMan.getInt("boot_param"); - sceneSwitcher(&ent); + if (!loadGam("fullpipe.gam", scene)) + return Common::kNoGameDataFoundError; #if 0 loadAllScenes(); #endif - _currentScene->draw(); - _gameContinue = true; while (_gameContinue) { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 85538e7cb2..257a45841a 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -98,7 +98,7 @@ public: CGameLoader *_gameLoader; GameProject *_gameProject; - bool loadGam(const char *fname); + bool loadGam(const char *fname, int scene = 0); CGameVar *getGameLoaderGameVar(); CInputController *getGameLoaderInputController(); diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 46cd557396..7d1d938f74 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -254,10 +254,13 @@ void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAn if (picAniInfoCount <= 0) return; + debug(0, "CGameLoader::applyPicAniInfos(sc, ptr, %d)", picAniInfoCount); + PictureObject *pict; StaticANIObject *ani; for (int i = 0; i < picAniInfoCount; i++) { + debug(0, "PicAniInfo: id: %d type: %d", picAniInfo[i]->objectId, picAniInfo[i]->type); if (picAniInfo[i]->type & 2) { pict = sc->getPictureObjectById(picAniInfo[i]->objectId, picAniInfo[i]->field_8); if (pict) { diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 8996337e2f..003d619612 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -381,7 +381,7 @@ Common::Point *Picture::getDimensions(Common::Point *p) { void Picture::getDibInfo() { int off = _dataSize & ~0xf; - debug(0, "Picture::getDibInfo: _dataSize: %d", _dataSize); + debug(9, "Picture::getDibInfo: _dataSize: %d", _dataSize); if (!_dataSize) { warning("Picture::getDibInfo(): Empty data size"); @@ -409,7 +409,7 @@ void Picture::draw(int x, int y, int style, int angle) { int x1 = x; int y1 = y; - debug(0, "Picture::draw(%d, %d, %d, %d)", x, y, style, angle); + debug(0, "Picture::draw(%d, %d, %d, %d) (%s)", x, y, style, angle, _memfilename); if (x != -1) x1 = x; @@ -430,10 +430,8 @@ void Picture::draw(int x, int y, int style, int angle) { byte *pal = _paletteData; if (!pal) { + warning("Picture:draw: using global palette"); pal = g_fullpipe->_globalPalette; - - if (!pal) - error("Picture::draw(): Both global and local palettes are empty"); } switch (style) { @@ -447,8 +445,9 @@ void Picture::draw(int x, int y, int style, int angle) { default: if (angle) drawRotated(x1, y1, angle); - else + else { _bitmap->putDib(x1, y1, (int32 *)pal); + } } } @@ -531,7 +530,10 @@ void Bitmap::putDibRB(int32 *palette) { uint16 *srcPtr2; uint16 *srcPtr; - debug(0, "Bitmap::putDibRB()"); + if (!palette) + error("Bitmap::putDibRB(): Both global and local palettes are empty"); + + debug(8, "Bitmap::putDibRB()"); endx = _width + _x - 1; endy = _height + _y - 1; @@ -642,7 +644,7 @@ void Bitmap::putDibCB(int32 *palette) { endx = _width + _x - 1; endy = _height + _y - 1; - debug(0, "Bitmap::putDibCB(): %d, %d, %d, %d [%d, %d]", _x, _y, endx, endy, _width, _height); + debug(8, "Bitmap::putDibCB(): %d, %d, %d, %d [%d, %d]", _x, _y, endx, endy, _width, _height); if (_x > 799 || endx < 0 || _y > 599 || endy < 0) return; @@ -655,6 +657,9 @@ void Bitmap::putDibCB(int32 *palette) { cb05_format = (_type == MKTAG('C', 'B', '\05', 'e')); + if (!palette && !cb05_format) + error("Bitmap::putDibCB(): Both global and local palettes are empty"); + bpp = cb05_format ? 2 : 1; pitch = (bpp * _width + 3) & 0xFFFFFFFC; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 13a25b78e5..f72e3ba21b 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -419,7 +419,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { g_fullpipe->_globalPalette = _palette->_data; } - debug(0, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg); + debug(8, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg); if (_picObjList.size() > 2) { // We need to z-sort them objectList_sortByPriority(_picObjList); @@ -431,11 +431,11 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { if (maxPri == -1) maxPri = 60000; - debug(0, "-> Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg); + debug(8, "-> Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg); Common::Point point; - debug(0, "_bigPict: %d objlist: %d", _bigPictureArray1Count, _picObjList.size()); + debug(8, "_bigPict: %d objlist: %d", _bigPictureArray1Count, _picObjList.size()); if (drawBg && _bigPictureArray1Count && _picObjList.size()) { _bigPictureArray[0][0]->getDimensions(&point); @@ -443,11 +443,11 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { int width = point.x; int height = point.y; - debug(0, "w: %d h:%d", width, height); + debug(8, "w: %d h:%d", width, height); ((PictureObject *)_picObjList[0])->getDimensions(&point); - debug(0, "w2: %d h2:%d", point.x, point.y); + debug(8, "w2: %d h2:%d", point.x, point.y); int bgStX = g_fullpipe->_sceneRect.left % point.x; @@ -505,14 +505,14 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { for (uint i = 1; i < _picObjList.size(); i++) { PictureObject *obj = (PictureObject *)_picObjList[i]; - debug(0, "pri: %d", obj->_priority); + debug(8, "pri: %d", obj->_priority); if (obj->_priority < minPri || obj->_priority >= maxPri) continue; int objX = obj->_ox; int objY = obj->_oy; - debug(0, "obj: %d %d", objX, objY); + debug(8, "obj: %d %d", objX, objY); obj->getDimensions(&point); diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index cd931b136c..bdfeb92b36 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -35,7 +35,7 @@ namespace Fullpipe { -bool FullpipeEngine::loadGam(const char *fname) { +bool FullpipeEngine::loadGam(const char *fname, int scene) { _gameLoader = new CGameLoader(); if (!_gameLoader->loadFile(fname)) @@ -43,7 +43,7 @@ bool FullpipeEngine::loadGam(const char *fname) { _currSoundListCount = 0; initObjectStates(); - // set_g_messageQueueCallback1(messageQueueCallback1); + // set_g_messageQueueCallback1(messageQueueCallback1); // substituted with direct call addMessageHandlerByIndex(global_messageHandler1, 0, 4); @@ -57,7 +57,7 @@ bool FullpipeEngine::loadGam(const char *fname) { ((MemoryObject *)((PictureObject *)*p)->_picture)->load(); } - // _sceneSwitcher = sceneSwitcher; + // _sceneSwitcher = sceneSwitcher; // substituted with direct call // _preloadCallback = gameLoaderPreloadCallback // _readSavegameCallback = gameLoaderReadSavegameCallback; @@ -80,12 +80,17 @@ bool FullpipeEngine::loadGam(const char *fname) { setMusicAllowed(_gameLoader->_gameVar->getSubVarAsInt("MUSIC_ALLOWED")); - if (_flgPlayIntro) { - _gameLoader->loadScene(SC_INTRO1); - _gameLoader->gotoScene(SC_INTRO1, TrubaUp); + if (scene) { + _gameLoader->loadScene(scene); + _gameLoader->gotoScene(scene, TrubaLeft); } else { - _gameLoader->loadScene(SC_1); - _gameLoader->gotoScene(SC_1, TrubaLeft); + if (_flgPlayIntro) { + _gameLoader->loadScene(SC_INTRO1); + _gameLoader->gotoScene(SC_INTRO1, TrubaUp); + } else { + _gameLoader->loadScene(SC_1); + _gameLoader->gotoScene(SC_1, TrubaLeft); + } } if (!_currentScene) diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 6939005b22..e64c3d2dfc 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -272,18 +272,23 @@ void StaticANIObject::draw() { Common::Point point; Common::Rect rect; - debug(0, "StaticANIObject::draw()"); + debug(0, "StaticANIObject::draw() (%s) [%d]", transCyrillic((byte *)_objectName), _id); if (_shadowsOn && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_shadows && (getCurrDimensions(point)->x != 1 || getCurrDimensions(point)->y != 1)) { DynamicPhase *dyn; - if (!_movement || _flags & 0x20 ) + if (!_movement || _flags & 0x20) dyn = _statics; else dyn = _movement->_currDynamicPhase; + if (!dyn) { + warning("HACK: StaticANIObject::draw(): dyn is missing"); + return; + } + if (dyn->getDynFlags() & 4) { rect = *dyn->_rect; @@ -410,6 +415,8 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { return false; } + debug(0, "StaticANIObject::setPicAniInfo() (%s [%d])", transCyrillic((byte *)_objectName), _id); + if (picAniInfo->type & 3) { setOXY(picAniInfo->ox, picAniInfo->oy); _priority = picAniInfo->priority; @@ -421,10 +428,11 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { if (picAniInfo->type & 1) { _messageQueueId = picAniInfo->type >> 16; - if (picAniInfo->staticsId) + if (picAniInfo->staticsId) { _statics = getStaticsById(picAniInfo->staticsId); - else + } else { _statics = 0; + } if (picAniInfo->movementId) { _movement = getMovementById(picAniInfo->movementId); -- cgit v1.2.3 From 3b86b149ed0f920659b2473feef86aad8c4b5853 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 8 Aug 2013 13:25:47 +0300 Subject: FULLPIPE: Added missing file --- engines/fullpipe/modal.cpp | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 engines/fullpipe/modal.cpp (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp new file mode 100644 index 0000000000..4728fb25f9 --- /dev/null +++ b/engines/fullpipe/modal.cpp @@ -0,0 +1,94 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" +#include "fullpipe/modal.h" +#include "fullpipe/messages.h" +#include "fullpipe/constants.h" +#include "fullpipe/scenes.h" + +namespace Fullpipe { + +bool CBaseModalObject::handleMessage(ExCommand *message) { + warning("STUB: CBaseModalObject::handleMessage()"); + + return true; +} + +bool CBaseModalObject::init(int counterdiff) { + warning("STUB: CBaseModalObject::init(%d)", counterdiff); + + return true; +} + +bool CBaseModalObject::update() { + warning("STUB: CBaseModalObject::update()"); + + return true; +} + +void CBaseModalObject::saveload() { + warning("STUB: CBaseModalObject::saveload()"); +} + + +CModalIntro::CModalIntro() { + _field_8 = 0; + _countDown = 0; + _needRedraw = 0; + if (g_vars->sceneIntro_skipIntro) { + _introFlags = 4; + } else { + _introFlags = 33; + _countDown = 150; + + PictureObject *pict = g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0); + pict->setFlags(pict->_flags & 0xFFFB); + } + g_vars->sceneIntro_skipIntro = false; + _sfxVolume = g_fullpipe->_sfxVolume; +} + +bool CModalIntro::handleMessage(ExCommand *message) { + if (message->_messageKind != 17) + return false; + + if (message->_messageNum != 36) + return false; + + if (message->_keyCode != 13 && message->_keyCode != 27 && message->_keyCode != 32 ) + return false; + + if (_needRedraw) { + if (!(_introFlags & 0x10)) { + _countDown = 0; + g_vars->sceneIntro_needBlackout = true; + return true; + } + g_vars->sceneIntro_playing = false; + g_vars->sceneIntro_needBlackout = true; + } + + return true; +} + +} // End of namespace Fullpipe -- cgit v1.2.3 From a80f93464031b9d48c05dc167ec220574b887ce0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 9 Aug 2013 01:19:57 +0300 Subject: FULLPIPE: Implemented main event handler --- engines/fullpipe/fullpipe.cpp | 103 ++++++++++++++++++++++++++++++++++++++++-- engines/fullpipe/fullpipe.h | 5 ++ engines/fullpipe/inventory.h | 1 + engines/fullpipe/messages.cpp | 14 +++++- engines/fullpipe/messages.h | 1 + 5 files changed, 120 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index b71021bc66..57691de861 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -58,6 +58,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _globalPalette = 0; _updateTicks = 0; + _lastInputTicks = 0; + _lastButtonUpTicks = 0; _currArchive = 0; @@ -74,6 +76,10 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _gameContinue = true; _needRestart = false; _flgPlayIntro = false; + _gamePaused = false; + _inputArFlag = false; + _recordEvents = false; + _flgSavegameMenuRequested = false; _isProcessingMessages = false; @@ -180,26 +186,117 @@ Common::Error FullpipeEngine::run() { void FullpipeEngine::updateEvents() { Common::Event event; Common::EventManager *eventMan = _system->getEventManager(); + ExCommand *ex; while (eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_KEYDOWN: _keyState = event.kbd.keycode; - break; + + switch (event.kbd.keycode) { + case Common::KEYCODE_SPACE: + if (_gamePaused) { + if (_modalObject) { + if (_modalObject->init(42)) { + _modalObject->update(); + } else { + _modalObject->saveload(); + CBaseModalObject *obj = _modalObject->_parentObj; + if (obj) + delete _modalObject; + _modalObject = obj; + } + } else { + _gameLoader->updateSystems(42); + } + return; + } + + ex = new ExCommand(0, 17, 36, 0, 0, 0, 1, 0, 0, 0); + ex->_keyCode = 32; + ex->_excFlags |= 3; + ex->handle(); + break; + case Common::KEYCODE_s: + if (_gamePaused) { + _gamePaused = 0; + _flgSavegameMenuRequested = true; + return; + } + + ex = new ExCommand(0, 17, 36, 0, 0, 0, 1, 0, 0, 0); + ex->_keyCode = 83; + ex->_excFlags |= 3; + ex->handle(); + break; + case Common::KEYCODE_q: + return; + break; + default: + ex = new ExCommand(0, 17, 36, 0, 0, 0, 1, 0, 0, 0); + ex->_keyCode = event.kbd.keycode; + ex->_excFlags |= 3; + ex->handle(); + break; + } case Common::EVENT_KEYUP: + if (!_inputArFlag) { + ex = new ExCommand(0, 17, 37, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + ex->handle(); + } _keyState = Common::KEYCODE_INVALID; break; case Common::EVENT_MOUSEMOVE: - _mouseX = event.mouse.x; - _mouseY = event.mouse.y; + if (_recordEvents) { + ex = new ExCommand(0, 17, 31, event.mouse.x, event.mouse.x, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + ex->handle(); + } break; case Common::EVENT_QUIT: _gameContinue = false; break; + case Common::EVENT_RBUTTONDOWN: + if (!_inputArFlag && (_updateTicks - _lastInputTicks) >= 2) { + ex = new ExCommand(0, 17, 107, event.mouse.x, event.mouse.x, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + _lastInputTicks = _updateTicks; + ex->handle(); + } + break; + case Common::EVENT_LBUTTONDOWN: + if (!_inputArFlag && (_updateTicks - _lastInputTicks) >= 2) { + ex = new ExCommand(0, 17, 29, event.mouse.x, event.mouse.x, 0, 1, 0, 0, 0); + + ex->_sceneClickX = _sceneRect.left + ex->_x; + ex->_sceneClickY = _sceneRect.top + ex->_y; + ex->_keyCode = getGameLoaderInventory()->getSelectedItemId(); + ex->_excFlags |= 3; + _lastInputTicks = _updateTicks; + ex->handle(); + } + break; + case Common::EVENT_LBUTTONUP: + if (!_inputArFlag && (_updateTicks - _lastButtonUpTicks) >= 2) { + ex = new ExCommand(0, 17, 30, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + _lastButtonUpTicks = _updateTicks; + ex->handle(); + } + break; default: break; } } + + +#if 0 + warning("STUB: FullpipeEngine::updateEvents() "); + if (Msg == MSG_SC11_SHOWSWING && _modalObject) { + _modalObject->method14(); + } +#endif } void FullpipeEngine::freeGameLoader() { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 257a45841a..4123f62855 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -109,7 +109,10 @@ public: bool _savesEnabled; bool _updateFlag; bool _flgCanOpenMap; + bool _gamePaused; bool _flgSavegameMenuRequested; + bool _inputArFlag; + bool _recordEvents; Common::Rect _sceneRect; int _sceneWidth; @@ -178,6 +181,8 @@ public: CInventory2 *_inventory; int32 _updateTicks; + int32 _lastInputTicks; + int32 _lastButtonUpTicks; CBaseModalObject *_modalObject; diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index a61df385a5..c449dfc718 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -100,6 +100,7 @@ class CInventory2 : public CInventory { void rebuildItemRects(); Scene *getScene() { return _scene; } + int getSelectedItemId() { return _selectedId < 0 ? 0 : _selectedId; } void draw(); }; diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 0b1fec9bc6..c8befd5fd9 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -24,6 +24,7 @@ #include "fullpipe/objects.h" #include "fullpipe/messages.h" +#include "fullpipe/modal.h" namespace Fullpipe { @@ -104,9 +105,20 @@ void ExCommand::sendMessage() { processMessages(); } +void ExCommand::handle() { + if (g_fullpipe->_modalObject) { + g_fullpipe->_modalObject->handleMessage(this); + + delete this; + } else { + postMessage(this); + } +} + Message::Message() { _messageKind = 0; - _parentId = 0; + _parentId = 0; + _x = 0; _y = 0; _field_14 = 0; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index b59b5947ee..25cdfc19ea 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -70,6 +70,7 @@ class ExCommand : public Message { bool handleMessage(); void sendMessage(); + void handle(); }; class CObjstateCommand : public CObject { -- cgit v1.2.3 From d866e2aabf5e69481b0feb797a075b469eaa1bb9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 10 Aug 2013 02:32:00 +0300 Subject: FULLPIPE: First phase of StaticANIObject::update() implementation --- engines/fullpipe/fullpipe.cpp | 1 + engines/fullpipe/messages.cpp | 7 ++ engines/fullpipe/messages.h | 1 + engines/fullpipe/scene.cpp | 2 + engines/fullpipe/statics.cpp | 170 +++++++++++++++++++++++++++++++++++++++--- engines/fullpipe/statics.h | 19 ++--- 6 files changed, 180 insertions(+), 20 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 57691de861..e68d940335 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -329,6 +329,7 @@ void FullpipeEngine::updateScreen() { } } } else if (_currentScene) { + _currentScene->update(42); // HACK. FIXME _currentScene->draw(); if (_inventoryScene) diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index c8befd5fd9..3a3ee4bc68 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -510,4 +510,11 @@ void processMessages() { } } +void updateGlobalMessageQueue(int id, int objid) { + MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(id); + if (m) { + m->update(); + } +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 25cdfc19ea..e2e27b5025 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -147,6 +147,7 @@ bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id); void clearMessageHandlers(); void postMessage(ExCommand *ex); void processMessages(); +void updateGlobalMessageQueue(int id, int objid); } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index f72e3ba21b..fd506712da 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -407,6 +407,8 @@ void Scene::updateScrolling() { } void Scene::update(int counterdiff) { + debug(0, "Scene::update(%d)", counterdiff); + for (CPtrList::iterator s = _staticANIObjectList2.begin(); s != _staticANIObjectList2.end(); ++s) ((StaticANIObject *)*s)->update(counterdiff); } diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index e64c3d2dfc..edbb5f7990 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -62,6 +62,26 @@ void CStepArray::clear() { } } +Common::Point *CStepArray::getCurrPoint(Common::Point *point) { + if (_isEos || _points == 0) { + point->x = 0; + point->y = 0; + } else { + point = _points[_currPointIndex]; + } + return point; +} + +bool CStepArray::gotoNextPoint() { + if (_currPointIndex < _maxPointIndex) { + _currPointIndex++; + return true; + } else { + _isEos = 1; + return false; + } +} + StaticANIObject::StaticANIObject() { _shadowsOn = 1; _field_30 = 0; @@ -405,7 +425,116 @@ Common::Point *StaticANIObject::getCurrDimensions(Common::Point &p) { } void StaticANIObject::update(int counterdiff) { - warning("STUB: StaticANIObject::update(%d)", counterdiff); + int mqid; + + debug(0, "StaticANIObject::update()"); + + if (_flags & 2) { + _messageNum--; + if (_messageNum) + return; + + mqid = _messageQueueId; + _messageQueueId = 0; + _flags ^= 2; + + updateGlobalMessageQueue(mqid, _id); + return; + } + + Common::Point point; + ExCommand *ex, *newex, *newex1, *newex2; + + if (_movement) { + _movement->_counter += counterdiff; + if (_movement->_counter >= _movement->_counterMax) { + _movement->_counter = 0; + + if (_flags & 1) { + if (_counter) { + _counter--; + } else { + DynamicPhase *dyn = _movement->_currDynamicPhase; + if (dyn->_initialCountdown != dyn->_countdown) + goto LABEL_40; + ex = dyn->getExCommand(); + if (!ex || ex->_messageKind == 35) + goto LABEL_40; + newex = new ExCommand(ex); + newex->_excFlags |= 2; + if (newex->_messageKind == 17) { + newex->_parentId = _id; + newex->_keyCode = _field_4; + } + ex->sendMessage(); + if (_movement) { + LABEL_40: + if (dyn->_initialCountdown != dyn->_countdown + || dyn->_field_68 == 0 + || (newex1 = new ExCommand(_id, 17, dyn->_field_68, 0, 0, 0, 1, 0, 0, 0)), + newex1->_excFlags = 2, + newex1->_keyCode = _field_4, + newex1->sendMessage(), + (_movement != 0)) { + if (_movement->gotoNextFrame(_callback1, _callback2)) { + setOXY(_movement->_ox, _movement->_oy); + _counter = _initialCounter; + if (dyn->_initialCountdown == dyn->_countdown) { + ex = dyn->getExCommand(); + if (ex) { + if (ex->_messageKind == 35) { + newex2 = new ExCommand(ex); + ex->_excFlags |= 2; + ex->sendMessage(); + } + } + } + } else { + stopAnim_maybe(); + } + if (_movement) { + _stepArray.getCurrPoint(&point); + setOXY(point.x + _ox, point.y + _oy); + _stepArray.gotoNextPoint(); + if (_someDynamicPhaseIndex == _movement->_currDynamicPhaseIndex) + adjustSomeXY(); + } + } + } + } + } else if (_flags & 0x20) { + _flags ^= 0x20; + _flags |= 1; + _movement->gotoFirstFrame(); + _movement->getCurrDynamicPhaseXY(point); + + Common::Point pointS; + _statics->getSomeXY(pointS); + setOXY(_ox + point.x + _movement->_mx - pointS.x, + _oy + point.y + _movement->_my - pointS.y); + } + } + } else { + if (_statics) { + if (_messageQueueId) { + if (_statics->_countdown) { + _statics->_countdown--; + return; + } + mqid = _messageQueueId; + _messageQueueId = 0; + updateGlobalMessageQueue(mqid, _id); + } + } + } +} + +void StaticANIObject::stopAnim_maybe() { + warning("STUB: StaticANIObject::stopAnim_maybe()"); +} + +void StaticANIObject::adjustSomeXY() { + warning("STUB: StaticANIObject::adjustSomeXY()"); } bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { @@ -731,7 +860,7 @@ void Movement::setDynamicPhaseIndex(int index) { gotoNextFrame(0, 0); while (_currDynamicPhaseIndex > index) - gotoPrevFrame(0, 0); + gotoPrevFrame(); } void Movement::loadPixelData() { @@ -768,24 +897,24 @@ void Movement::removeFirstPhase() { _updateFlag1 = 0; } -void Movement::gotoNextFrame(int callback1, int callback2) { +bool Movement::gotoNextFrame(int callback1, int callback2) { debug(0, "Movement::gotoNextFrame(%d, %d)", callback1, callback2); if (!callback2) { if (_currMovement) { if ((uint)_currDynamicPhaseIndex == _currMovement->_dynamicPhases.size() - 1 && !(((DynamicPhase *)(_currMovement->_dynamicPhases.back()))->_countdown)) { - return; + return false; } } else if ((uint)_currDynamicPhaseIndex == _dynamicPhases.size() - 1 && !(((DynamicPhase *)(_dynamicPhases.back()))->_countdown)) { - return; + return false; } } if (_currDynamicPhase->_countdown) { _currDynamicPhase->_countdown--; - return; + return true; } Common::Point point; @@ -806,11 +935,17 @@ void Movement::gotoNextFrame(int callback1, int callback2) { else _currDynamicPhaseIndex++; + bool result = true; + if (_currMovement) { - if (_currMovement->_dynamicPhases.size() <= (uint)_currDynamicPhaseIndex) + if (_currMovement->_dynamicPhases.size() <= (uint)_currDynamicPhaseIndex) { _currDynamicPhaseIndex = _currMovement->_dynamicPhases.size() - 1; - if (_currDynamicPhaseIndex < 0) + result = (callback2 == 0); + } + if (_currDynamicPhaseIndex < 0) { _currDynamicPhaseIndex = 0; + result = false; + } if (_currMovement->_framePosOffsets) { if (callback1) { point = *_currMovement->_framePosOffsets[_currDynamicPhaseIndex]; @@ -842,10 +977,14 @@ void Movement::gotoNextFrame(int callback1, int callback2) { } } } else { - if (_dynamicPhases.size() <= (uint)_currDynamicPhaseIndex) + if (_dynamicPhases.size() <= (uint)_currDynamicPhaseIndex) { _currDynamicPhaseIndex = _dynamicPhases.size() - 1; - if (_currDynamicPhaseIndex < 0) + result = (callback2 == 0); + } + if (_currDynamicPhaseIndex < 0) { _currDynamicPhaseIndex = 0; + result = false; + } if (_framePosOffsets) { if (callback1) { @@ -875,10 +1014,19 @@ void Movement::gotoNextFrame(int callback1, int callback2) { _oy += point.y; _currDynamicPhase->_countdown = _currDynamicPhase->_initialCountdown; + + return result; } -void Movement::gotoPrevFrame(int callback1, int callback2) { +bool Movement::gotoPrevFrame() { warning("STUB: Movement::gotoPrevFrame()"); + + return true; +} + +void Movement::gotoFirstFrame() { + while (_currDynamicPhaseIndex) + gotoPrevFrame(); } void Movement::gotoLastFrame() { diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 9e800c2b67..ecee6e3a5a 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -42,12 +42,12 @@ class CStepArray : public CObject { void clear(); int getCurrPointIndex() { return _currPointIndex; } + Common::Point *getCurrPoint(Common::Point *point); + bool gotoNextPoint(); }; class StaticPhase : public Picture { - friend class DynamicPhase; - friend class Movement; - + public: int16 _initialCountdown; int16 _countdown; int16 _field_68; @@ -63,10 +63,7 @@ class StaticPhase : public Picture { }; class DynamicPhase : public StaticPhase { - friend class Movement; - friend class Statics; - friend class StaticANIObject; - + public: int _someX; int _someY; Common::Rect *_rect; @@ -150,8 +147,9 @@ class Movement : public GameObject { void setDynamicPhaseIndex(int index); void removeFirstPhase(); - void gotoNextFrame(int callback1, int callback2); - void gotoPrevFrame(int callback1, int callback2); + bool gotoNextFrame(int callback1, int callback2); + bool gotoPrevFrame(); + void gotoFirstFrame(); void gotoLastFrame(); void loadPixelData(); @@ -218,6 +216,9 @@ class StaticANIObject : public GameObject { MovTable *countMovements(); void setSpeed(int speed); + + void stopAnim_maybe(); + void adjustSomeXY(); }; struct MovTable { -- cgit v1.2.3 From 1ca1a5dfa041179d980676c6aa8fa135f7b69a0e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 10 Aug 2013 23:41:38 +0300 Subject: FULLPIPE: Implement MessageQueue::chain() --- engines/fullpipe/fullpipe.cpp | 5 +- engines/fullpipe/messages.cpp | 152 +++++++++++++++++++++++++++++++++++++++--- engines/fullpipe/messages.h | 22 ++++-- engines/fullpipe/statics.cpp | 142 +++++++++++++++++++++++---------------- engines/fullpipe/statics.h | 1 + 5 files changed, 248 insertions(+), 74 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index e68d940335..e73a81aef0 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -253,6 +253,9 @@ void FullpipeEngine::updateEvents() { ex->_excFlags |= 3; ex->handle(); } + + _mouseX = event.mouse.x; + _mouseY = event.mouse.y; break; case Common::EVENT_QUIT: _gameContinue = false; @@ -329,7 +332,7 @@ void FullpipeEngine::updateScreen() { } } } else if (_currentScene) { - _currentScene->update(42); // HACK. FIXME + //_currentScene->update(42); // HACK. FIXME _currentScene->draw(); if (_inventoryScene) diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 3a3ee4bc68..43584f4aa7 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -25,6 +25,7 @@ #include "fullpipe/objects.h" #include "fullpipe/messages.h" #include "fullpipe/modal.h" +#include "fullpipe/statics.h" namespace Fullpipe { @@ -193,8 +194,8 @@ MessageQueue::MessageQueue(MessageQueue *src, int parId, int field_38) { _counter = 0; _field_38 = (field_38 == 0); - for (uint i = 0; i < src->_exCommands.size(); i++) { - ExCommand *ex = new ExCommand((ExCommand *)src->_exCommands[i]); + for (Common::List::iterator it = src->_exCommands.begin(); it != src->_exCommands.end(); ++it) { + ExCommand *ex = new ExCommand(*it); ex->_excFlags |= 2; _exCommands.push_back(ex); @@ -215,6 +216,28 @@ MessageQueue::MessageQueue(MessageQueue *src, int parId, int field_38) { _isFinished = 0; } +MessageQueue::~MessageQueue() { + for (Common::List::iterator it = _exCommands.begin(); it != _exCommands.end(); ++it) { + ExCommand *ex = (ExCommand *)*it; + + if (ex && ex->_excFlags & 2) + delete ex; + } + + _exCommands.clear(); + + if (_field_14) + delete _field_14; + + if (_flags & 2) { + g_fullpipe->_globalMessageQueueList->removeQueueById(_id); + } + + finish(); + + free(_queueName); +} + bool MessageQueue::load(MfcArchive &file) { debug(5, "MessageQueue::load()"); @@ -227,7 +250,7 @@ bool MessageQueue::load(MfcArchive &file) { _queueName = file.readPascalString(); for (int i = 0; i < count; i++) { - CObject *tmp = file.readClass(); + ExCommand *tmp = (ExCommand *)file.readClass(); _exCommands.push_back(tmp); } @@ -241,9 +264,23 @@ bool MessageQueue::load(MfcArchive &file) { } bool MessageQueue::chain(StaticANIObject *ani) { - warning("STUB: MessageQueue::chain()"); + if (ani) + ani->isIdle(); - return true; + if (checkGlobalExCommandList1() && checkGlobalExCommandList2()) { + if (!(getFlags() & 2)) { + g_fullpipe->_globalMessageQueueList->addMessageQueue(this); + _flags |= 2; + } + if (ani) { + ani->queueMessageQueue(this); + return true; + } else { + sendNextCommand(); + return true; + } + } + return false; } void MessageQueue::update() { @@ -262,15 +299,29 @@ void MessageQueue::messageQueueCallback1(int par) { warning("STUB: MessageQueue::messageQueueCallback1()"); } +ExCommand *MessageQueue::getExCommandByIndex(uint idx) { + if (idx > _exCommands.size()) + return 0; + + Common::List::iterator it = _exCommands.begin(); + + while (idx) { + ++it; + idx--; + } + + return *it; +} + void MessageQueue::sendNextCommand() { if (_exCommands.size()) { if (!(_flags & 4) && (_flags & 1)) { messageQueueCallback1(16); } - ExCommand *ex = (ExCommand *)_exCommands.front(); - _exCommands.remove_at(0); + ExCommand *ex = _exCommands.front(); + + _exCommands.pop_front(); - ex->handleMessage(); _counter++; ex->_parId = _id; ex->_excFlags |= (ex->_field_24 == 0 ? 1 : 0) | (ex->_field_3C != 0 ? 2 : 0); @@ -283,6 +334,76 @@ void MessageQueue::sendNextCommand() { } } +bool MessageQueue::checkGlobalExCommandList1() { + ExCommand *ex, *ex1; + + for (uint i = 0; i < getCount(); i++) { + ex = getExCommandByIndex(i); + + if (ex->_messageKind != 1 && ex->_messageKind != 20 && ex->_messageKind != 5 && ex->_messageKind != 27) + continue; + + for (Common::List::iterator it = g_fullpipe->_exCommandList.begin(); it != g_fullpipe->_exCommandList.end(); it++) { + ex1 = *it; + + if (ex1->_messageKind != 1 && ex1->_messageKind != 20 && ex1->_messageKind != 5 && ex1->_messageKind != 27) + continue; + + if (ex1->_keyCode != ex->_keyCode && ex1->_keyCode != -1 && ex->_keyCode != -1) + continue; + + MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex1->_parId); + + if (mq) { + if (mq->getFlags() & 1) + return false; + } + } + } + return true; +} + +bool MessageQueue::checkGlobalExCommandList2() { + ExCommand *ex, *ex1; + + for (uint i = 0; i < getCount(); i++) { + ex = getExCommandByIndex(i); + + if (ex->_messageKind != 1 && ex->_messageKind != 20 && ex->_messageKind != 5 && ex->_messageKind != 27) + continue; + + for (Common::List::iterator it = g_fullpipe->_exCommandList.begin(); it != g_fullpipe->_exCommandList.end();) { + ex1 = *it; + + if (ex1->_messageKind != 1 && ex1->_messageKind != 20 && ex1->_messageKind != 5 && ex1->_messageKind != 27) { + it++; + continue; + } + + if (ex1->_keyCode != ex->_keyCode && ex1->_keyCode != -1 && ex->_keyCode != -1) { + it++; + continue; + } + + MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex1->_parId); + + if (mq) { + if (mq->getFlags() & 1) + return false; + + delete mq; + } + + it = g_fullpipe->_exCommandList.erase(it); + + if (ex1->_excFlags & 2) { + delete ex1; + } + } + } + return true; +} + void MessageQueue::finish() { warning("STUB: MessageQueue::finish()"); } @@ -299,7 +420,18 @@ MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { void GlobalMessageQueueList::deleteQueueById(int id) { for (uint i = 0; i < size(); i++) if (((MessageQueue *)((*this).operator[](i)))->_id == id) { - delete (MessageQueue *)remove_at(i); + remove_at(i); + + disableQueueById(id); + return; + } +} + +void GlobalMessageQueueList::removeQueueById(int id) { + for (uint i = 0; i < size(); i++) + if (((MessageQueue *)((*this).operator[](i)))->_id == id) { + ((MessageQueue *)((*this).operator[](i)))->_flags &= 0xFD; // It is quite pointless + remove_at(i); disableQueueById(id); return; @@ -503,8 +635,8 @@ void processMessages() { while (g_fullpipe->_exCommandList.size()) { ExCommand *ex = g_fullpipe->_exCommandList.front(); - ex->handleMessage(); g_fullpipe->_exCommandList.pop_front(); + ex->handleMessage(); } g_fullpipe->_isProcessingMessages = false; } diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index e2e27b5025..746765f462 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -50,6 +50,8 @@ class Message : public CObject { public: Message(); Message(Message *src); + virtual ~Message() {} + Message(int16 parentId, int messageKind, int x, int y, int a6, int a7, int sceneClickX, int sceneClickY, int a10); }; @@ -84,18 +86,14 @@ class CObjstateCommand : public CObject { }; class MessageQueue : public CObject { - friend class GlobalMessageQueueList; - friend class CGameLoader; - friend class Scene; - - protected: + public: int _id; int _flags; char *_queueName; int16 _dataId; int16 _field_12; - int _field_14; - CPtrList _exCommands; + CObject *_field_14; + Common::List _exCommands; int _counter; int _field_38; int _isFinished; @@ -105,23 +103,33 @@ class MessageQueue : public CObject { public: MessageQueue(); MessageQueue(MessageQueue *src, int parId, int field_38); + virtual ~MessageQueue(); + virtual bool load(MfcArchive &file); int getFlags() { return _flags; } void setFlags(int flags) { _flags = flags; } + uint getCount() { return _exCommands.size(); } + + ExCommand *getExCommandByIndex(uint idx); + bool chain(StaticANIObject *ani); void update(); void sendNextCommand(); void finish(); void messageQueueCallback1(int par); + + bool checkGlobalExCommandList1(); + bool checkGlobalExCommandList2(); }; class GlobalMessageQueueList : public CPtrList { public: MessageQueue *getMessageQueueById(int id); void deleteQueueById(int id); + void removeQueueById(int id); void disableQueueById(int id); void addMessageQueue(MessageQueue *msg); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index edbb5f7990..4854bb1d0d 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -214,6 +214,26 @@ void StaticANIObject::deleteFromGlobalMessageQueue() { } } +void StaticANIObject::queueMessageQueue(MessageQueue *mq) { + if (isIdle() && !(_flags & 0x80)) { + deleteFromGlobalMessageQueue(); + _messageQueueId = 0; + _messageNum = 0; + if (_flags & 2) { + _flags ^= 2; + } + if (mq) { + _animExFlag = 0; + if (_movement) + _messageQueueId = mq->_id; + else + mq->sendNextCommand(); + } else { + _messageQueueId = 0; + } + } +} + bool StaticANIObject::isIdle() { if (_messageQueueId) { MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId); @@ -427,7 +447,7 @@ Common::Point *StaticANIObject::getCurrDimensions(Common::Point &p) { void StaticANIObject::update(int counterdiff) { int mqid; - debug(0, "StaticANIObject::update()"); + debug(0, "StaticANIObject::update() (%x)", _flags); if (_flags & 2) { _messageNum--; @@ -443,76 +463,86 @@ void StaticANIObject::update(int counterdiff) { } Common::Point point; - ExCommand *ex, *newex, *newex1, *newex2; + ExCommand *ex, *newex; if (_movement) { _movement->_counter += counterdiff; - if (_movement->_counter >= _movement->_counterMax) { - _movement->_counter = 0; - if (_flags & 1) { - if (_counter) { - _counter--; - } else { - DynamicPhase *dyn = _movement->_currDynamicPhase; - if (dyn->_initialCountdown != dyn->_countdown) - goto LABEL_40; - ex = dyn->getExCommand(); - if (!ex || ex->_messageKind == 35) - goto LABEL_40; + if (_movement->_counter < _movement->_counterMax) + return; + + _movement->_counter = 0; + + if (_flags & 1) { + if (_counter) { + _counter--; + + return; + } + + DynamicPhase *dyn = _movement->_currDynamicPhase; + if (dyn->_initialCountdown == dyn->_countdown) { + + ex = dyn->getExCommand(); + if (ex && ex->_messageKind == 35) { newex = new ExCommand(ex); newex->_excFlags |= 2; if (newex->_messageKind == 17) { newex->_parentId = _id; newex->_keyCode = _field_4; } - ex->sendMessage(); - if (_movement) { - LABEL_40: - if (dyn->_initialCountdown != dyn->_countdown - || dyn->_field_68 == 0 - || (newex1 = new ExCommand(_id, 17, dyn->_field_68, 0, 0, 0, 1, 0, 0, 0)), - newex1->_excFlags = 2, - newex1->_keyCode = _field_4, - newex1->sendMessage(), - (_movement != 0)) { - if (_movement->gotoNextFrame(_callback1, _callback2)) { - setOXY(_movement->_ox, _movement->_oy); - _counter = _initialCounter; - if (dyn->_initialCountdown == dyn->_countdown) { - ex = dyn->getExCommand(); - if (ex) { - if (ex->_messageKind == 35) { - newex2 = new ExCommand(ex); - ex->_excFlags |= 2; - ex->sendMessage(); - } - } - } - } else { - stopAnim_maybe(); - } - if (_movement) { - _stepArray.getCurrPoint(&point); - setOXY(point.x + _ox, point.y + _oy); - _stepArray.gotoNextPoint(); - if (_someDynamicPhaseIndex == _movement->_currDynamicPhaseIndex) - adjustSomeXY(); + newex->sendMessage(); + + if (!_movement) + return; + } + + if (dyn->_initialCountdown == dyn->_countdown && dyn->_field_68 == 0) { + newex = new ExCommand(_id, 17, dyn->_field_68, 0, 0, 0, 1, 0, 0, 0); + newex->_excFlags = 2; + newex->_keyCode = _field_4; + newex->sendMessage(); + + if (!_movement) + return; + } + + if (!_movement->gotoNextFrame(_callback1, _callback2)) { + stopAnim_maybe(); + } else { + setOXY(_movement->_ox, _movement->_oy); + _counter = _initialCounter; + + if (dyn->_initialCountdown == dyn->_countdown) { + ex = dyn->getExCommand(); + if (ex) { + if (ex->_messageKind == 35) { + newex = new ExCommand(ex); + newex->_excFlags |= 2; + newex->sendMessage(); } } } + if (!_movement) + return; + + _stepArray.getCurrPoint(&point); + setOXY(point.x + _ox, point.y + _oy); + _stepArray.gotoNextPoint(); + if (_someDynamicPhaseIndex == _movement->_currDynamicPhaseIndex) + adjustSomeXY(); } - } else if (_flags & 0x20) { - _flags ^= 0x20; - _flags |= 1; - _movement->gotoFirstFrame(); - _movement->getCurrDynamicPhaseXY(point); - - Common::Point pointS; - _statics->getSomeXY(pointS); - setOXY(_ox + point.x + _movement->_mx - pointS.x, - _oy + point.y + _movement->_my - pointS.y); } + } else if (_flags & 0x20) { + _flags ^= 0x20; + _flags |= 1; + _movement->gotoFirstFrame(); + _movement->getCurrDynamicPhaseXY(point); + + Common::Point pointS; + _statics->getSomeXY(pointS); + setOXY(_ox + point.x + _movement->_mx - pointS.x, + _oy + point.y + _movement->_my - pointS.y); } } else { if (_statics) { diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index ecee6e3a5a..e81a83d364 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -200,6 +200,7 @@ class StaticANIObject : public GameObject { bool isIdle(); void deleteFromGlobalMessageQueue(); + void queueMessageQueue(MessageQueue *msg); void initMovements(); void loadMovementsPixelData(); -- cgit v1.2.3 From 60ca9f74ac8dfbfcee4bdae3ffbce039fce42854 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 Aug 2013 01:19:23 +0300 Subject: FULLPIPE: Fix bug with lost picture palettes --- engines/fullpipe/gameloader.cpp | 2 +- engines/fullpipe/gfx.cpp | 4 ++-- engines/fullpipe/messages.cpp | 6 +++--- engines/fullpipe/scene.cpp | 1 + engines/fullpipe/statics.cpp | 8 ++++---- engines/fullpipe/utils.cpp | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 7d1d938f74..205a84ee41 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -260,7 +260,7 @@ void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAn StaticANIObject *ani; for (int i = 0; i < picAniInfoCount; i++) { - debug(0, "PicAniInfo: id: %d type: %d", picAniInfo[i]->objectId, picAniInfo[i]->type); + debug(7, "PicAniInfo: id: %d type: %d", picAniInfo[i]->objectId, picAniInfo[i]->type); if (picAniInfo[i]->type & 2) { pict = sc->getPictureObjectById(picAniInfo[i]->objectId, picAniInfo[i]->field_8); if (pict) { diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 003d619612..2c4701833b 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -333,7 +333,7 @@ bool Picture::load(MfcArchive &file) { assert (g_fullpipe->_gameProjectVersion >= 12); - _alpha = file.readUint32LE(); + _alpha = file.readUint32LE() & 0xff; int havePal = file.readUint32LE(); @@ -423,7 +423,7 @@ void Picture::draw(int x, int y, int style, int angle) { if (!_bitmap) return; - if (_alpha < 0xff) { + if ((_alpha & 0xff) < 0xff) { warning("Picture:draw: alpha = %0x", _alpha); } diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 43584f4aa7..40cd35530a 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -88,9 +88,9 @@ bool ExCommand::handleMessage() { if (_messageKind == 17 || (_excFlags & 1)) { if (_parId) { - MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_parId); - if (m) - m->update(); + MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_parId); + if (mq) + mq->update(); } } diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index fd506712da..a895010cb7 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -381,6 +381,7 @@ void Scene::objectList_sortByPriority(CPtrList &list) { } void Scene::draw() { + debug(0, ">>>>> Scene::draw()"); updateScrolling(); drawContent(60000, 0, true); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 4854bb1d0d..3a82f7dbe6 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -574,7 +574,7 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { return false; } - debug(0, "StaticANIObject::setPicAniInfo() (%s [%d])", transCyrillic((byte *)_objectName), _id); + debug(0, "StaticANIObject::setPicAniInfo() (%s [%d]) type: %d, statid: %d, movid: %d", transCyrillic((byte *)_objectName), _id, picAniInfo->type, picAniInfo->staticsId, picAniInfo->movementId); if (picAniInfo->type & 3) { setOXY(picAniInfo->ox, picAniInfo->oy); @@ -585,7 +585,7 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { } if (picAniInfo->type & 1) { - _messageQueueId = picAniInfo->type >> 16; + _messageQueueId = (picAniInfo->type >> 16) & 0xffff; if (picAniInfo->staticsId) { _statics = getStaticsById(picAniInfo->staticsId); @@ -928,7 +928,7 @@ void Movement::removeFirstPhase() { } bool Movement::gotoNextFrame(int callback1, int callback2) { - debug(0, "Movement::gotoNextFrame(%d, %d)", callback1, callback2); + debug(8, "Movement::gotoNextFrame(%d, %d)", callback1, callback2); if (!callback2) { if (_currMovement) { @@ -1151,7 +1151,7 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) { _field_6A = src->_field_6A; _dynFlags = src->_dynFlags; - setPaletteData(getPaletteData()); + setPaletteData(src->getPaletteData()); copyMemoryObject2(src); } diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 900ca84eea..3684d3ccf5 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -155,7 +155,7 @@ void MemoryObject::loadFile(char *filename) { _dataSize = s->size(); - debug(0, "Loading %s (%d bytes)", filename, _dataSize); + debug(5, "Loading %s (%d bytes)", filename, _dataSize); _data = (byte *)calloc(_dataSize, 1); s->read(_data, _dataSize); -- cgit v1.2.3 From cee12678dca97e52f57c926f646530cb3e23b176 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 Aug 2013 13:39:05 +0300 Subject: FULLPIPE: Implement sceneHandler01() --- engines/fullpipe/behavior.cpp | 4 ++ engines/fullpipe/behavior.h | 1 + engines/fullpipe/constants.h | 4 ++ engines/fullpipe/gameloader.cpp | 1 + engines/fullpipe/gameloader.h | 1 + engines/fullpipe/gfx.h | 3 -- engines/fullpipe/interaction.cpp | 99 ++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/interaction.h | 88 +++++++++++++++++++++++++++++++++++ engines/fullpipe/messages.cpp | 3 +- engines/fullpipe/module.mk | 1 + engines/fullpipe/objects.h | 48 ------------------- engines/fullpipe/scenes.cpp | 52 +++++++++++++++++++-- engines/fullpipe/sound.cpp | 4 ++ engines/fullpipe/sound.h | 2 + engines/fullpipe/stateloader.cpp | 60 +----------------------- engines/fullpipe/utils.cpp | 1 + 16 files changed, 256 insertions(+), 116 deletions(-) create mode 100644 engines/fullpipe/interaction.cpp create mode 100644 engines/fullpipe/interaction.h (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index e7d1bc9858..4f9e50d96b 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -36,4 +36,8 @@ void BehaviorManager::initBehavior(Scene *scene, CGameVar *var) { warning("STUB: BehaviorManager::initBehavior()"); } +void BehaviorManager::updateBehaviors() { + warning("STUB: BehaviorManager::updateBehaviors()"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h index 5e3b09086d..ea618fdfd6 100644 --- a/engines/fullpipe/behavior.h +++ b/engines/fullpipe/behavior.h @@ -34,6 +34,7 @@ class BehaviorManager : public CObject { BehaviorManager(); void initBehavior(Scene *scene, CGameVar *var); + void updateBehaviors(); }; struct BehaviorEntryInfo { diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 53a0831f1b..b1a7565fea 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -29,6 +29,9 @@ namespace Fullpipe { #define ANI_IN1MAN 5110 #define ANI_INV_MAP 5321 #define ANI_MAN 322 +#define MSG_SC1_SHOWOSK 1019 +#define MSG_SC1_SHOWOSK2 468 +#define MSG_SC1_UTRUBACLICK 1100 #define MV_MAN_TURN_LU 486 #define PIC_CMN_EVAL 3468 #define PIC_CSR_ARCADE1 4901 @@ -62,6 +65,7 @@ namespace Fullpipe { #define PIC_MAP_A13 5275 #define PIC_MAP_S01 5223 #define PIC_SC1_KUCHKA 1321 +#define PIC_SC1_LADDER 1091 #define PIC_SC1_OSK 1018 #define PIC_SC1_OSK2 2932 #define SC_1 301 diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 205a84ee41..0b431975e1 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -26,6 +26,7 @@ #include "fullpipe/scene.h" #include "fullpipe/input.h" #include "fullpipe/statics.h" +#include "fullpipe/interaction.h" namespace Fullpipe { diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index e1a0bac95e..cc41855dba 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -32,6 +32,7 @@ namespace Fullpipe { class SceneTag; class CMctlCompound; class CInputController; + class CInteractionController; class CGameLoader : public CObject { public: diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 2ee34e1a1a..98dfa20a06 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -151,12 +151,9 @@ class PictureObject : public GameObject { }; class Background : public CObject { - friend class FullpipeEngine; - public: CPtrList _picObjList; - protected: char *_bgname; int _x; int _y; diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp new file mode 100644 index 0000000000..8942d5dc6d --- /dev/null +++ b/engines/fullpipe/interaction.cpp @@ -0,0 +1,99 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/interaction.h" +#include "fullpipe/gameloader.h" + +namespace Fullpipe { + +int handleObjectInteraction(GameObject *subject, GameObject *object, int invId) { + return getGameLoaderInteractionController()->handleInteraction(subject, object, invId); +} + +bool CInteractionController::load(MfcArchive &file) { + debug(5, "CInteractionController::load()"); + + return _interactions.load(file); +} + +void CInteractionController::sortInteractions(int sceneId) { + warning("STUB: CInteractionController::sortInteractions(%d)", sceneId); +} + +int CInteractionController::handleInteraction(GameObject *subject, GameObject *object, int invId) { + warning("STUB: CInteractionController::handleInteraction()"); + + return 0; +} + +CInteraction::CInteraction() { + _objectId1 = 0; + _objectId2 = 0; + _staticsId1 = 0; + _objectId3 = 0; + _objectState2 = 0; + _objectState1 = 0; + _messageQueue = 0; + _flags = 0; + _yOffs = 0; + _xOffs = 0; + _staticsId2 = 0; + _field_28 = 0; + _sceneId = -1; +} + +bool CInteraction::load(MfcArchive &file) { + debug(5, "CInteraction::load()"); + + _objectId1 = file.readUint16LE(); + _objectId2 = file.readUint16LE(); + _staticsId1 = file.readUint16LE(); + _staticsId2 = file.readUint16LE(); + _objectId3 = file.readUint16LE(); + _objectState2 = file.readUint32LE(); + _objectState1 = file.readUint32LE(); + _xOffs = file.readUint32LE(); + _yOffs = file.readUint32LE(); + _sceneId = file.readUint32LE(); + _flags = file.readUint32LE(); + _actionName = file.readPascalString(); + + _messageQueue = (MessageQueue *)file.readClass(); + + return true; +} + +bool EntranceInfo::load(MfcArchive &file) { + debug(5, "EntranceInfo::load()"); + + _sceneId = file.readUint32LE(); + _field_4 = file.readUint32LE(); + _messageQueueId = file.readUint32LE(); + file.read(_gap_C, 292); // FIXME, Ugh + _field_130 = file.readUint32LE(); + + return true; +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h new file mode 100644 index 0000000000..5931f1a388 --- /dev/null +++ b/engines/fullpipe/interaction.h @@ -0,0 +1,88 @@ +/* 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. + * + */ + +#ifndef FULLPIPE_INTERACTION_H +#define FULLPIPE_INTERACTION_H + +#include "fullpipe/utils.h" + +namespace Fullpipe { + +class GameObject; +class MessageQueue; +class StaticANIObject; + +int handleObjectInteraction(GameObject *subject, GameObject *object, int invId); + +class CInteraction : public CObject { + int16 _objectId1; + int16 _objectId2; + int16 _objectId3; + int16 _staticsId1; + int16 _staticsId2; + int16 _field_E; + int _objectState1; + int _objectState2; + int _xOffs; + int _yOffs; + MessageQueue *_messageQueue; + int _sceneId; + int _field_28; + int _flags; + char *_actionName; + + public: + CInteraction(); + virtual bool load(MfcArchive &file); +}; + +class CInteractionController : public CObject { + CObList _interactions; + int16 _field_20; + bool _flag24; + + public: + CInteractionController() : _field_20(0), _flag24(true) {} + + virtual bool load(MfcArchive &file); + + void enableFlag24() { _flag24 = true; } + void disableFlag24() { _flag24 = false; } + + void sortInteractions(int sceneId); + + int handleInteraction(GameObject *subject, GameObject *object, int invId); +}; + +struct EntranceInfo { + int32 _sceneId; + int32 _field_4; + int32 _messageQueueId; + byte _gap_C[292]; // FIXME + int32 _field_130; + + bool load(MfcArchive &file); +}; + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_INTERACTION_H */ diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 40cd35530a..fe9ca51811 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -507,8 +507,7 @@ void addMessageHandler(int (*callback)(ExCommand *), int16 id) { allocMessageHandler(curItem, id, callback, index); if (curItem) - updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); - + updateMessageHandlerIndex(curItem->nextItem->nextItem, 1); } MessageHandler *getMessageHandlerById(int16 id) { diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 602478cbb7..81cb0f990f 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -8,6 +8,7 @@ MODULE_OBJS = \ gfx.o \ init.o \ input.o \ + interaction.o \ inventory.o \ messages.o \ modal.o \ diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 133320f326..33406bb217 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -43,44 +43,6 @@ class GameProject : public CObject { virtual bool load(MfcArchive &file); }; -class CInteraction : public CObject { - int16 _objectId1; - int16 _objectId2; - int16 _objectId3; - int16 _staticsId1; - int16 _staticsId2; - int16 _field_E; - int _objectState1; - int _objectState2; - int _xOffs; - int _yOffs; - MessageQueue *_messageQueue; - int _sceneId; - int _field_28; - int _flags; - char *_actionName; - - public: - CInteraction(); - virtual bool load(MfcArchive &file); -}; - -class CInteractionController : public CObject { - CObList _interactions; - int16 _field_20; - bool _flag24; - - public: - CInteractionController() : _field_20(0), _flag24(true) {} - - virtual bool load(MfcArchive &file); - - void enableFlag24() { _flag24 = true; } - void disableFlag24() { _flag24 = false; } - - void sortInteractions(int sceneId); -}; - struct PicAniInfo { int32 type; int16 objectId; @@ -101,16 +63,6 @@ struct PicAniInfo { bool load(MfcArchive &file); }; -struct EntranceInfo { - int32 _sceneId; - int32 _field_4; - int32 _messageQueueId; - byte _gap_C[292]; // FIXME - int32 _field_130; - - bool load(MfcArchive &file); -}; - class CMotionController; class Sc2 : public CObject { diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index d2a75c150d..5663fc2446 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -38,6 +38,7 @@ #include "fullpipe/objectnames.h" #include "fullpipe/scenes.h" #include "fullpipe/modal.h" +#include "fullpipe/interaction.h" namespace Fullpipe { @@ -695,10 +696,8 @@ void sceneIntro_initScene(Scene *sc) { g_vars->sceneIntro_playing = true; g_vars->sceneIntro_needBlackout = false; -#if 0 if (g_fullpipe->_recordEvents || g_fullpipe->_inputArFlag) g_vars->sceneIntro_skipIntro = false; -#endif g_fullpipe->_modalObject = new CModalIntro; } @@ -740,9 +739,54 @@ void scene01_initScene(Scene *sc, int entrance) { } int sceneHandler01(ExCommand *cmd) { - warning("STUB: sceneHandler01()"); + int res = 0; - return 0; + if (cmd->_messageKind != 17) + return 0; + + if (cmd->_messageNum > MSG_SC1_SHOWOSK) { + if (cmd->_messageNum == MSG_SC1_UTRUBACLICK) + handleObjectInteraction(g_fullpipe->_aniMan, g_fullpipe->_currentScene->getPictureObjectById(PIC_SC1_LADDER, 0), 0); + + return 0; + } + + if (cmd->_messageNum == MSG_SC1_SHOWOSK) { + g_vars->scene01_picSc01Osk->_flags |= 4; + + g_vars->scene01_picSc01Osk->_priority = 20; + g_vars->scene01_picSc01Osk2->_priority = 21; + + return 0; + } + + if (cmd->_messageNum != 0x21) { + if (cmd->_messageNum == MSG_SC1_SHOWOSK2) { + g_vars->scene01_picSc01Osk2->_flags |= 4; + g_vars->scene01_picSc01Osk2->_priority = 20; + g_vars->scene01_picSc01Osk->_priority = 21; + + return 0; + } + + return 0; + } + + if (g_fullpipe->_aniMan2) { + if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200) { + g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300; + } + + if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200) + g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300; + + res = 1; + } + g_fullpipe->_behaviorManager->updateBehaviors(); + + startSceneTrack(); + + return res; } } // End of namespace Fullpipe diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index ced3bf1c11..996bf5b1a4 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -110,4 +110,8 @@ void FullpipeEngine::setSceneMusicParameters(CGameVar *var) { warning("STUB: FullpipeEngine::setSceneMusicParameters()"); } +void startSceneTrack() { + warning("STUB: startSceneTrack()"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h index 93e994a720..775086774c 100644 --- a/engines/fullpipe/sound.h +++ b/engines/fullpipe/sound.h @@ -25,6 +25,8 @@ namespace Fullpipe { +void startSceneTrack(); + class Sound : public MemoryObject { int _id; char *_description; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index bdfeb92b36..3cc4d0046f 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -30,6 +30,7 @@ #include "fullpipe/gameloader.h" #include "fullpipe/scene.h" #include "fullpipe/statics.h" +#include "fullpipe/interaction.h" #include "fullpipe/constants.h" @@ -142,53 +143,6 @@ GameProject::~GameProject() { free(_headerFilename); } -bool CInteractionController::load(MfcArchive &file) { - debug(5, "CInteractionController::load()"); - - return _interactions.load(file); -} - -void CInteractionController::sortInteractions(int sceneId) { - warning("STUB: CInteractionController::sortInteractions(%d)", sceneId); -} - -CInteraction::CInteraction() { - _objectId1 = 0; - _objectId2 = 0; - _staticsId1 = 0; - _objectId3 = 0; - _objectState2 = 0; - _objectState1 = 0; - _messageQueue = 0; - _flags = 0; - _yOffs = 0; - _xOffs = 0; - _staticsId2 = 0; - _field_28 = 0; - _sceneId = -1; -} - -bool CInteraction::load(MfcArchive &file) { - debug(5, "CInteraction::load()"); - - _objectId1 = file.readUint16LE(); - _objectId2 = file.readUint16LE(); - _staticsId1 = file.readUint16LE(); - _staticsId2 = file.readUint16LE(); - _objectId3 = file.readUint16LE(); - _objectState2 = file.readUint32LE(); - _objectState1 = file.readUint32LE(); - _xOffs = file.readUint32LE(); - _yOffs = file.readUint32LE(); - _sceneId = file.readUint32LE(); - _flags = file.readUint32LE(); - _actionName = file.readPascalString(); - - _messageQueue = (MessageQueue *)file.readClass(); - - return true; -} - bool PreloadItems::load(MfcArchive &file) { debug(5, "PreloadItems::load()"); @@ -440,16 +394,4 @@ bool PicAniInfo::load(MfcArchive &file) { return true; } -bool EntranceInfo::load(MfcArchive &file) { - debug(5, "EntranceInfo::load()"); - - _sceneId = file.readUint32LE(); - _field_4 = file.readUint32LE(); - _messageQueueId = file.readUint32LE(); - file.read(_gap_C, 292); // FIXME, Ugh - _field_130 = file.readUint32LE(); - - return true; -} - } // End of namespace Fullpipe diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 3684d3ccf5..042afd28df 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -29,6 +29,7 @@ #include "fullpipe/motion.h" #include "fullpipe/ngiarchive.h" #include "fullpipe/messages.h" +#include "fullpipe/interaction.h" namespace Fullpipe { -- cgit v1.2.3 From c12ea8bd2b495c2d433ffc740bb44d0f32dbc47a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 Aug 2013 17:18:42 +0300 Subject: FULLPIPE: Implement global_messageHandler1() --- engines/fullpipe/constants.h | 19 +++++ engines/fullpipe/fullpipe.cpp | 16 ++-- engines/fullpipe/fullpipe.h | 19 ++++- engines/fullpipe/gameloader.cpp | 2 +- engines/fullpipe/input.cpp | 13 +++ engines/fullpipe/input.h | 1 + engines/fullpipe/inventory.cpp | 30 +++++++ engines/fullpipe/inventory.h | 13 ++- engines/fullpipe/messages.cpp | 10 +-- engines/fullpipe/messages.h | 2 +- engines/fullpipe/modal.cpp | 12 +++ engines/fullpipe/scenes.cpp | 171 +++++++++++++++++++++++++++++++++++++++- engines/fullpipe/sound.cpp | 18 ++++- engines/fullpipe/sound.h | 2 - engines/fullpipe/statics.h | 8 +- 15 files changed, 307 insertions(+), 29 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index b1a7565fea..43f90edf3d 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -29,9 +29,24 @@ namespace Fullpipe { #define ANI_IN1MAN 5110 #define ANI_INV_MAP 5321 #define ANI_MAN 322 +#define MSG_DISABLESAVES 5201 +#define MSG_ENABLESAVES 5202 +#define MSG_HMRKICK_METAL 4764 +#define MSG_HMRKICK_STUCCO 4765 +#define MSG_MANSHADOWSOFF 5196 +#define MSG_MANSHADOWSON 5197 #define MSG_SC1_SHOWOSK 1019 #define MSG_SC1_SHOWOSK2 468 #define MSG_SC1_UTRUBACLICK 1100 +#define MV_MAN_GOLADDER 451 +#define MV_MAN_GOLADDER2 2844 +#define MV_MAN_LOOKUP 4773 +#define MV_MAN_STARTLADDER 452 +#define MV_MAN_STARTLADDER2 2842 +#define MV_MAN_STOPLADDER 454 +#define MV_MAN_STOPLADDER2 2845 +#define MV_MAN_TOLADDER 448 +#define MV_MAN_TOLADDER2 2841 #define MV_MAN_TURN_LU 486 #define PIC_CMN_EVAL 3468 #define PIC_CSR_ARCADE1 4901 @@ -120,12 +135,16 @@ namespace Fullpipe { #define SC_MAP 5222 #define SC_TEST 903 #define SC_TITLES 5166 +#define SND_CMN_031 3516 +#define SND_CMN_070 5199 #define ST_LBN_2N 2756 #define ST_MAN_EMPTY 476 +#define ST_MAN_RIGHT 325 #define TrubaDown 697 #define TrubaLeft 474 #define TrubaRight 696 #define TrubaUp 680 +#define rMV_MAN_LOOKUP 4775 } // End of namespace Fullpipe diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index e73a81aef0..bca025770b 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -105,6 +105,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _mouseVirtX = 0; _mouseVirtY = 0; + _currSelectedInventoryItemId = 0; + _behaviorManager = 0; _cursorId = 0; @@ -254,8 +256,7 @@ void FullpipeEngine::updateEvents() { ex->handle(); } - _mouseX = event.mouse.x; - _mouseY = event.mouse.y; + _mouseScreenPos = event.mouse; break; case Common::EVENT_QUIT: _gameContinue = false; @@ -311,8 +312,8 @@ void FullpipeEngine::cleanup() { } void FullpipeEngine::updateScreen() { - _mouseVirtX = _mouseX + _sceneRect.left; - _mouseVirtY = _mouseY + _sceneRect.top; + _mouseVirtX = _mouseScreenPos.x + _sceneRect.left; + _mouseVirtY = _mouseScreenPos.y + _sceneRect.top; //if (inputArFlag) // updateGame_inputArFlag(); @@ -348,7 +349,7 @@ void FullpipeEngine::updateScreen() { } else { //vrtRectangle(*(_DWORD *)g_vrtHandle, 0, 0, 0, 800, 600); } - _inputController->drawCursor(_mouseX, _mouseY); + _inputController->drawCursor(_mouseScreenPos.x, _mouseScreenPos.y); ++_updateTicks; } @@ -404,4 +405,9 @@ void FullpipeEngine::updateMapPiece(int mapId, int update) { } } +void FullpipeEngine::disableSaves(ExCommand *ex) { + warning("STUB: FullpipeEngine::disableSaves()"); +} + + } // End of namespace Fullpipe diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 4123f62855..7598ff40ed 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -88,7 +88,6 @@ public: Common::RandomSource *_rnd; - int _mouseX, _mouseY; Common::KeyCode _keyState; uint16 _buttonState; @@ -106,7 +105,6 @@ public: int _gameProjectVersion; int _pictureScale; int _scrollSpeed; - bool _savesEnabled; bool _updateFlag; bool _flgCanOpenMap; bool _gamePaused; @@ -126,11 +124,18 @@ public: CInputController *_inputController; bool _inputDisabled; + void defHandleKeyDown(int key); + SoundList *_currSoundList1[11]; int _currSoundListCount; bool _soundEnabled; bool _flgSoundList; + void stopAllSounds(); + void toggleMute(); + void playSound(int id, int flag); + void startSceneTrack(); + int _sfxVolume; GlobalMessageQueueList *_globalMessageQueueList; @@ -146,6 +151,7 @@ public: int _mouseVirtX; int _mouseVirtY; + Common::Point _mouseScreenPos; BehaviorManager *_behaviorManager; @@ -163,6 +169,9 @@ public: bool _flgPlayIntro; int _musicAllowed; + void enableSaves() { _isSaveAllowed = true; } + void disableSaves(ExCommand *ex); + void initObjectStates(); void setLevelStates(); void setSwallowedEggsState(); @@ -179,6 +188,7 @@ public: Scene *_inventoryScene; CInventory2 *_inventory; + int _currSelectedInventoryItemId; int32 _updateTicks; int32 _lastInputTicks; @@ -190,6 +200,7 @@ public: int (*_updateCursorCallback)(); int _cursorId; + void setCursor(int id); int getObjectState(const char *objname); void setObjectState(const char *name, int state); @@ -201,6 +212,10 @@ public: NGIArchive *_currArchive; + void openMap(); + void openHelp(); + void openMainMenu(); + public: bool _isSaveAllowed; diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 0b431975e1..adb81092f9 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -311,7 +311,7 @@ void CGameLoader::updateSystems(int counterdiff) { _updateCounter++; _exCommand._messageNum = 33; _exCommand._excFlags = 0; - postMessage(&_exCommand); + _exCommand.postMessage(); } processMessages(); diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 78c6e50a49..b649c013f8 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -82,6 +82,10 @@ void CInputController::drawCursor(int x, int y) { warning("STUB: CInputController::drawCursor(%d, %d)", x, y); } +void CInputController::setCursor(int id) { + warning("STUB: CInputController::setCursor(%d)", id); +} + CursorInfo::CursorInfo() { pictureId = 0; picture = 0; @@ -104,4 +108,13 @@ CursorInfo::CursorInfo(CursorInfo *src) { height = src->height; } +void FullpipeEngine::setCursor(int id) { + if (_inputController) + _inputController->setCursor(id); +} + +void FullpipeEngine::defHandleKeyDown(int key) { + warning("STUB: FullpipeEngine::defHandleKeyDown(%d)", key); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h index 06013ab0c1..e527770dc9 100644 --- a/engines/fullpipe/input.h +++ b/engines/fullpipe/input.h @@ -65,6 +65,7 @@ class CInputController { void setCursorMode(bool mode); void drawCursor(int x, int y); + void setCursor(int id); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index c88d6f9cdc..c45c66dc7e 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -110,4 +110,34 @@ void CInventory2::draw() { warning("STUB: CInventory2::draw()"); } +void CInventory2::slideOut() { + _isInventoryOut = true; + + ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0); + + ex->_field_2C = 10; + ex->_field_14 = _isInventoryOut; + ex->_field_20 = !_isInventoryOut; + ex->_excFlags |= 3; + ex->postMessage(); +} + +int CInventory2::handleLeftClick(ExCommand *cmd) { + warning("STUB: CInventory2::handleLeftClick()"); + + return 0; +} + +int CInventory2::unselectItem(bool flag) { + warning("STUB: CInventory2::unselectItem()"); + + return 0; +} + +int CInventory2::getHoveredItem(Common::Point *point) { + warning("STUB: CInventory2::getHoveredItem()"); + + return 0; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index c449dfc718..accfb08afa 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -87,8 +87,8 @@ class CInventory2 : public CInventory { InventoryIcons _inventoryIcons; int _selectedId; int _field_48; - int _isInventoryOut; - int _isLocked; + bool _isInventoryOut; + bool _isLocked; int _topOffset; Scene *_scene; BigPicture *_picture; @@ -100,7 +100,16 @@ class CInventory2 : public CInventory { void rebuildItemRects(); Scene *getScene() { return _scene; } + bool getIsLocked() { return _isLocked; } + void setIsLocked(bool val) { _isLocked = val; } + bool getIsInventoryOut() { return _isInventoryOut; } + int getSelectedItemId() { return _selectedId < 0 ? 0 : _selectedId; } + int getHoveredItem(Common::Point *point); + void slideOut(); + + int handleLeftClick(ExCommand *cmd); + int unselectItem(bool flag); void draw(); }; diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index fe9ca51811..c93cd42172 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -106,13 +106,17 @@ void ExCommand::sendMessage() { processMessages(); } +void ExCommand::postMessage() { + g_fullpipe->_exCommandList.push_back(this); +} + void ExCommand::handle() { if (g_fullpipe->_modalObject) { g_fullpipe->_modalObject->handleMessage(this); delete this; } else { - postMessage(this); + postMessage(); } } @@ -624,10 +628,6 @@ void clearMessageHandlers() { } } -void postMessage(ExCommand *ex) { - g_fullpipe->_exCommandList.push_back(ex); -} - void processMessages() { if (!g_fullpipe->_isProcessingMessages) { g_fullpipe->_isProcessingMessages = true; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 746765f462..650a237381 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -72,6 +72,7 @@ class ExCommand : public Message { bool handleMessage(); void sendMessage(); + void postMessage(); void handle(); }; @@ -153,7 +154,6 @@ int getMessageHandlersCount(); bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id); bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id); void clearMessageHandlers(); -void postMessage(ExCommand *ex); void processMessages(); void updateGlobalMessageQueue(int id, int objid); diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index 4728fb25f9..f7bc633ca6 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -91,4 +91,16 @@ bool CModalIntro::handleMessage(ExCommand *message) { return true; } +void FullpipeEngine::openMap() { + warning("STUB: FullpipeEngine::openMap()"); +} + +void FullpipeEngine::openHelp() { + warning("STUB: FullpipeEngine::openHelp()"); +} + +void FullpipeEngine::openMainMenu() { + warning("STUB: FullpipeEngine::openMainMenu()"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 5663fc2446..0f1202abd0 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -91,7 +91,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { _scrollSpeed = 8; - _savesEnabled = true; + _isSaveAllowed = true; _updateFlag = true; _flgCanOpenMap = true; @@ -651,8 +651,173 @@ void setElevatorButton(const char *name, int state) { var->setSubVarAsInt(name, state); } +void global_messageHandler_KickStucco() { + warning("STUB: global_messageHandler_KickStucco()"); +} + +void global_messageHandler_KickMetal() { + warning("STUB: global_messageHandler_KickMetal()"); +} + int global_messageHandler1(ExCommand *cmd) { - warning("STUB: global_messageHandler1()"); + if (cmd->_excFlags & 0x10000) { + if (cmd->_messageNum == MV_MAN_TOLADDER) + cmd->_messageNum = MV_MAN_TOLADDER2; + if (cmd->_messageNum == MV_MAN_STARTLADDER) + cmd->_messageNum = MV_MAN_STARTLADDER2; + if (cmd->_messageNum == MV_MAN_GOLADDER) + cmd->_messageNum = MV_MAN_GOLADDER2; + if (cmd->_messageNum == MV_MAN_STOPLADDER) + cmd->_messageNum = MV_MAN_STOPLADDER2; + } + + if (g_fullpipe->_inputDisabled) { + if (cmd->_messageKind == 17) { + switch (cmd->_messageNum) { + case 29: + case 30: + case 36: + case 106: + cmd->_messageKind = 0; + break; + default: + break; + } + } + } else if (cmd->_messageKind == 17) { + switch (cmd->_messageNum) { + case MSG_MANSHADOWSON: + g_fullpipe->_aniMan->_shadowsOn = 1; + break; + case MSG_HMRKICK_STUCCO: + global_messageHandler_KickStucco(); + break; + case MSG_MANSHADOWSOFF: + g_fullpipe->_aniMan->_shadowsOn = 0; + break; + case MSG_DISABLESAVES: + g_fullpipe->disableSaves(cmd); + break; + case MSG_ENABLESAVES: + g_fullpipe->enableSaves(); + break; + case MSG_HMRKICK_METAL: + global_messageHandler_KickMetal(); + break; + case 29: // left mouse + if (g_fullpipe->_inventoryScene) { + if (getGameLoaderInventory()->handleLeftClick(cmd)) + cmd->_messageKind = 0; + } + break; + case 107: // right mouse + if (getGameLoaderInventory()->getSelectedItemId()) { + getGameLoaderInventory()->unselectItem(0); + cmd->_messageKind = 0; + } + break; + case 36: // keydown + switch (cmd->_keyCode) { + case '\x1B': // ESC + if (g_fullpipe->_currentScene) { + getGameLoaderInventory()->unselectItem(0); + g_fullpipe->openMainMenu(); + cmd->_messageKind = 0; + } + break; + case 't': + g_fullpipe->stopAllSounds(); + cmd->_messageKind = 0; + break; + case 'u': + g_fullpipe->toggleMute(); + cmd->_messageKind = 0; + break; + case ' ': + if (getGameLoaderInventory()->getIsLocked()) { + if (getGameLoaderInventory()->getIsInventoryOut()) { + getGameLoaderInventory()->setIsLocked(0); + } + } else { + getGameLoaderInventory()->slideOut(); + getGameLoaderInventory()->setIsLocked(1); + } + break; + case '\t': + if (g_fullpipe->_flgCanOpenMap) + g_fullpipe->openMap(); + cmd->_messageKind = 0; + break; + case 'p': + if (g_fullpipe->_flgCanOpenMap) + g_fullpipe->openHelp(); + cmd->_messageKind = 0; + break; + default: + g_fullpipe->defHandleKeyDown(cmd->_keyCode); + break; + } + break; + case 33: + if (!g_fullpipe->_inventoryScene) + break; + + int invItem; + + if (g_fullpipe->_updateFlag && (invItem = g_fullpipe->_inventory->getHoveredItem(&g_fullpipe->_mouseScreenPos))) { + g_fullpipe->_cursorId = PIC_CSR_ITN; + if (!g_fullpipe->_currSelectedInventoryItemId && !g_fullpipe->_aniMan->_movement && + !(g_fullpipe->_aniMan->_flags & 0x100) && g_fullpipe->_aniMan->isIdle()) { + int st = g_fullpipe->_aniMan->_statics->_staticsId; + ExCommand *newex; + + if (st == ST_MAN_RIGHT) { + newex = new ExCommand(g_fullpipe->_aniMan->_id, 1, rMV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0); + } else if (st == (0x4000 | ST_MAN_RIGHT)) { + newex = new ExCommand(g_fullpipe->_aniMan->_id, 1, MV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0); + } + newex->_keyCode = g_fullpipe->_aniMan->_field_4; + newex->_excFlags |= 3; + newex->postMessage(); + } + + if (g_fullpipe->_currSelectedInventoryItemId != invItem) + g_fullpipe->playSound(SND_CMN_070, 0); + + g_fullpipe->_currSelectedInventoryItemId = invItem; + g_fullpipe->setCursor(g_fullpipe->_cursorId); + break; + } + if (g_fullpipe->_updateCursorCallback) + g_fullpipe->_updateCursorCallback(); + + g_fullpipe->_currSelectedInventoryItemId = 0; + g_fullpipe->setCursor(g_fullpipe->_cursorId); + break; + case 65: // open map + if (cmd->_field_2C == 11 && cmd->_field_14 == ANI_INV_MAP && g_fullpipe->_flgCanOpenMap) + g_fullpipe->openMap(); + break; + default: + break; + } + } + + if (cmd->_messageKind == 56) { + getGameLoaderInventory()->rebuildItemRects(); + + ExCommand *newex = new ExCommand(0, 35, SND_CMN_031, 0, 0, 0, 1, 0, 0, 0); + + newex->_field_14 = 1; + newex->_excFlags |= 3; + newex->postMessage(); + + return 1; + } else if (cmd->_messageKind == 57) { + getGameLoaderInventory()->rebuildItemRects(); + + return 1; + } return 0; } @@ -784,7 +949,7 @@ int sceneHandler01(ExCommand *cmd) { } g_fullpipe->_behaviorManager->updateBehaviors(); - startSceneTrack(); + g_fullpipe->startSceneTrack(); return res; } diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 996bf5b1a4..7c64dd088b 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -110,8 +110,22 @@ void FullpipeEngine::setSceneMusicParameters(CGameVar *var) { warning("STUB: FullpipeEngine::setSceneMusicParameters()"); } -void startSceneTrack() { - warning("STUB: startSceneTrack()"); +void FullpipeEngine::startSceneTrack() { + warning("STUB: FullpipeEngine::startSceneTrack()"); } +void FullpipeEngine::stopAllSounds() { + warning("STUB: FullpipeEngine::stopAllSounds()"); +} + +void FullpipeEngine::toggleMute() { + warning("STUB: FullpipeEngine::toggleMute()"); +} + +void FullpipeEngine::playSound(int id, int flag) { + warning("STUB: FullpipeEngine::playSounds(%d, %d)", id, flag); +} + + + } // End of namespace Fullpipe diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h index 775086774c..93e994a720 100644 --- a/engines/fullpipe/sound.h +++ b/engines/fullpipe/sound.h @@ -25,8 +25,6 @@ namespace Fullpipe { -void startSceneTrack(); - class Sound : public MemoryObject { int _id; char *_description; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index e81a83d364..ee99861a00 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -81,9 +81,7 @@ class DynamicPhase : public StaticPhase { }; class Statics : public DynamicPhase { - friend class StaticANIObject; - friend class Movement; - + public: int16 _staticsId; int16 _field_86; char *_staticsName; @@ -158,9 +156,7 @@ class Movement : public GameObject { }; class StaticANIObject : public GameObject { - friend class FullpipeEngine; - - protected: + public: Movement *_movement; Statics *_statics; int _shadowsOn; -- cgit v1.2.3 From f90371ebceb987455a21d4358d1421e8cffb4f42 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 Aug 2013 22:47:46 +0300 Subject: FULLPIPE: Implement global_messageHandler4() and startAnim() --- engines/fullpipe/fullpipe.h | 2 + engines/fullpipe/messages.cpp | 1 + engines/fullpipe/messages.h | 6 ++ engines/fullpipe/scene.cpp | 4 + engines/fullpipe/scene.h | 1 + engines/fullpipe/scenes.cpp | 225 +++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/sound.cpp | 4 + engines/fullpipe/statics.cpp | 168 +++++++++++++++++++++++++++++++ engines/fullpipe/statics.h | 15 ++- 9 files changed, 423 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 7598ff40ed..ac9cb856d8 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -66,6 +66,8 @@ int global_messageHandler1(ExCommand *cmd); int global_messageHandler2(ExCommand *cmd); int global_messageHandler3(ExCommand *cmd); int global_messageHandler4(ExCommand *cmd); +void global_messageHandler_handleSound(ExCommand *cmd); + class FullpipeEngine : public ::Engine { protected: diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index c93cd42172..55a0b5f0bd 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -629,6 +629,7 @@ void clearMessageHandlers() { } void processMessages() { + warning("###################### processing"); if (!g_fullpipe->_isProcessingMessages) { g_fullpipe->_isProcessingMessages = true; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 650a237381..03d30f2b7d 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -76,6 +76,12 @@ class ExCommand : public Message { void handle(); }; +class ExCommand2 : public ExCommand { + public: + Common::Point **_points; + int _pointsSize; +}; + class CObjstateCommand : public CObject { ExCommand _cmd; char *_objCommandName; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index a895010cb7..7ef4e731b5 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -407,6 +407,10 @@ void Scene::updateScrolling() { warning("STUB Scene::updateScrolling()"); } +void Scene::updateScrolling2() { + warning("STUB Scene::updateScrolling2()"); +} + void Scene::update(int counterdiff) { debug(0, "Scene::update(%d)", counterdiff); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index defa3851e8..d8d436208b 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -55,6 +55,7 @@ class Scene : public Background { void draw(); void drawContent(int minPri, int maxPri, bool drawBG); void updateScrolling(); + void updateScrolling2(); void update(int counterdiff); diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 0f1202abd0..f7aa525ad3 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -835,9 +835,230 @@ int global_messageHandler3(ExCommand *cmd) { } int global_messageHandler4(ExCommand *cmd) { - warning("STUB: global_messageHandler4()"); + StaticANIObject *ani = 0; - return 0; + switch (cmd->_messageKind) { + case 18: { + MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(cmd->_messageNum), cmd->_parId, 0); + + if (cmd->_excFlags & 1) + mq->_flag1 = 1; + else + mq->_flag1 = 0; + + mq->sendNextCommand(); + break; + } + case 2: + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + ani->trySetMessageQueue(cmd->_messageNum, cmd->_parId); + break; + + case 1: { + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + int flags = cmd->_field_14; + if (flags <= 0) + flags = -1; + + if (cmd->_excFlags & 1) + ani->startAnim(cmd->_messageNum, 0, flags); + else + ani->startAnim(cmd->_messageNum, cmd->_parId, flags); + + break; + } + case 8: + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + ani->startAnimEx(cmd->_messageNum, cmd->_parId, -1, -1); + break; + + case 20: { + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + int flags = cmd->_field_14; + if (flags <= 0) + flags = -1; + + ExCommand2 *cmd2 = (ExCommand2 *)cmd; + + if (cmd->_excFlags & 1) { + ani->startAnimSteps(cmd->_messageNum, 0, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize >> 3, flags); + } else { + ani->startAnimSteps(cmd->_messageNum, cmd->_parId, cmd->_x, cmd->_y, cmd2->_points, cmd2->_pointsSize >> 3, flags); + } + break; + } + case 21: + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + ani->queueMessageQueue(0); + ani->playIdle(); + break; + case 9: + // Nop in original + break; + case 3: + g_fullpipe->_currentScene->_y = cmd->_messageNum - cmd->_messageNum % g_fullpipe->_scrollSpeed; + break; + + case 4: + g_fullpipe->_currentScene->_x = cmd->_messageNum - cmd->_messageNum % g_fullpipe->_scrollSpeed; + break; + + case 19: { + if (!g_fullpipe->_currentScene) + break; + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + MessageQueue *mq = ani->getMessageQueue(); + MessageQueue *mq2 = ani->changeStatics1(cmd->_messageNum); + + if (!mq2 || !mq2->getExCommandByIndex(0) || !mq) + break; + + mq2->_parId = mq->_id; + mq2->_flag1 = (cmd->_field_24 == 0); + break; + } + case 22: + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + ani->_flags |= 4; + ani->changeStatics2(cmd->_messageNum); + break; + + case 6: + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + ani->hide(); + break; + + case 27: + if (!g_fullpipe->_currentScene || g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode) == 0) { + ani = g_fullpipe->accessScene(cmd->_field_20)->getStaticANIObject1ById(cmd->_parentId, -1); + if (ani) { + ani = new StaticANIObject(ani); + g_fullpipe->_currentScene->addStaticANIObject(ani, 1); + } + } + + // fall through + case 5: + if (g_fullpipe->_currentScene) + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + + if (!ani) + break; + + if (cmd->_field_14 >= 0) + ani->_priority = cmd->_field_14; + + ani->show1(cmd->_x, cmd->_y, cmd->_messageNum, cmd->_parId); + break; + + case 10: + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + if (cmd->_field_14 >= 0) + ani->_priority = cmd->_field_14; + + ani->show2(cmd->_x, cmd->_y, cmd->_messageNum, cmd->_parId); + break; + + case 7: { + if (!g_fullpipe->_currentScene->_picObjList.size()) + break; + + int offX = g_fullpipe->_scrollSpeed * (cmd->_x / g_fullpipe->_scrollSpeed); + int offY = g_fullpipe->_scrollSpeed * (cmd->_y / g_fullpipe->_scrollSpeed); + + if (cmd->_messageNum) { + g_fullpipe->_currentScene->_x = offX - g_fullpipe->_sceneRect.left; + g_fullpipe->_currentScene->_y = offY - g_fullpipe->_sceneRect.top; + + if (cmd->_field_24) { + g_fullpipe->_currentScene->_messageQueueId = cmd->_parId; + } + } else { + g_fullpipe->_sceneRect.moveTo(offX, offY); + + g_fullpipe->_currentScene->_x = 0; + g_fullpipe->_currentScene->_y = 0; + + g_fullpipe->_currentScene->updateScrolling2(); + } + break; + } + case 34: + if (!g_fullpipe->_currentScene) + break; + + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (!ani) + break; + + ani->_flags = cmd->_messageNum | (ani->_flags & ~cmd->_field_14); + + break; + + case 35: + global_messageHandler_handleSound(cmd); + break; + + case 11: + case 12: + break; + default: + return 0; + break; + } + + return 1; } int defaultUpdateCursor() { diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 7c64dd088b..d69ce35777 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -126,6 +126,10 @@ void FullpipeEngine::playSound(int id, int flag) { warning("STUB: FullpipeEngine::playSounds(%d, %d)", id, flag); } +void global_messageHandler_handleSound(ExCommand *cmd) { + warning("STUB: global_messageHandler_handleSound()"); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 3a82f7dbe6..f03e19c5f6 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -234,6 +234,26 @@ void StaticANIObject::queueMessageQueue(MessageQueue *mq) { } } +MessageQueue *StaticANIObject::getMessageQueue() { + if (this->_messageQueueId <= 0 ) + return 0; + + return g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId); +} + +bool StaticANIObject::trySetMessageQueue(int msgNum, int qId) { + if (_messageQueueId || !msgNum) { + updateGlobalMessageQueue(qId, _id); + return false; + } + + _flags |= 2; + _messageNum = msgNum; + _messageQueueId = qId; + + return true; +} + bool StaticANIObject::isIdle() { if (_messageQueueId) { MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId); @@ -607,6 +627,154 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { return true; } +MessageQueue *StaticANIObject::changeStatics1(int msgNum) { + warning("STUB: StaticANIObject::changeStatics1(%d)", msgNum); + + return 0; +} + +void StaticANIObject::changeStatics2(int objId) { + warning("STUB: StaticANIObject::changeStatics2(%d)", objId); +} + +void StaticANIObject::hide() { + if (!_messageQueueId) { + if (_flags & 4) + _flags ^= 4; + } +} + +void StaticANIObject::show1(int x, int y, int movementId, int mqId) { + warning("STUB: StaticANIObject::show1(%d, %d, %d, %d)", x, y, movementId, mqId); +} + +void StaticANIObject::show2(int x, int y, int movementId, int mqId) { + warning("STUB: StaticANIObject::show2(%d, %d, %d, %d)", x, y, movementId, mqId); +} + +void StaticANIObject::playIdle() { + if (isIdle()) + adjustSomeXY(); +} + +void StaticANIObject::startAnimSteps(int movementId, int messageQueueId, int x, int y, Common::Point **points, int pointsCount, int someDynamicPhaseIndex) { + warning("STUB: StaticANIObject::startAnimSteps()"); +} + +bool StaticANIObject::startAnimEx(int movid, int parId, int flag1, int flag2) { + bool res = startAnim(movid, parId, -1); + if (res) + _animExFlag = 1; + + _someDynamicPhaseIndex = -1; + return res; +} + +bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhaseIdx) { + if (_flags & 0x80) + return false; + + warning("STUB: StaticANIObject::startAnim(%d, %d, %d)", movementId, messageQueueId, dynPhaseIdx); + + if (_messageQueueId) { + updateGlobalMessageQueue(messageQueueId, _id); + return false; + } + + bool found = false; + Movement *mov; + + for (uint i = 0; i < _movements.size(); i++) { + mov = (Movement *)_movements[i]; + + if (mov->_id != movementId) { + found = true; + break; + } + } + + if (!found) { + updateGlobalMessageQueue(messageQueueId, _id); + return false; + } + + if (mov == _movement) { + _flags |= 1; + _messageQueueId = messageQueueId; + + return 1; + } + + int newx = _ox; + int newy = _oy; + Common::Point point; + + if (_movement) { + _movement->getCurrDynamicPhaseXY(point); + } else if (_statics) { + _statics->getSomeXY(point); + + newx -= point.x; + newy -= point.y; + } + + _movement = mov; + + _stepArray.clear(); + + if (_flags & 0x40) + _movement->gotoLastFrame(); + else + _movement->gotoFirstFrame(); + + if (!(_flags & 0x40)) { + if (!_movement->_currDynamicPhaseIndex) { + _stepArray.getCurrPoint(&point); + newx += point.x + _movement->_mx; + newy += point.y + _movement->_my; + + _stepArray.gotoNextPoint(); + + ExCommand *ex = _movement->_currDynamicPhase->getExCommand(); + if (ex) { + if (ex->_messageKind == 35) { + ExCommand *newex = new ExCommand(ex); + newex->_excFlags |= 2; + newex->sendMessage(); + } + } + } + } + + _movement->getCurrDynamicPhaseXY(point); + setOXY(point.x + newx, point.y + newy); + + if (_movement->_staticsObj2->_staticsId & 0x4000) + _flags |= 8; + else + _flags &= 0xFFF7; + + _flags |= 1; + + _messageQueueId = messageQueueId; + _movement->_currDynamicPhase->_countdown = _movement->_currDynamicPhase->_initialCountdown; + _movement->_counter = 0; + + _counter = _initialCounter; + _someDynamicPhaseIndex = dynPhaseIdx; + + _stepArray.clear(); + + ExCommand *newex = new ExCommand(_id, 17, 23, 0, 0, movementId, 1, 0, 0, 0); + + newex->_keyCode = _field_4; + newex->_excFlags = 2; + + newex->postMessage(); + + return true; +} + Statics::Statics() { _staticsId = 0; _picture = 0; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index ee99861a00..97a044f95f 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -197,6 +197,8 @@ class StaticANIObject : public GameObject { void deleteFromGlobalMessageQueue(); void queueMessageQueue(MessageQueue *msg); + MessageQueue *getMessageQueue(); + bool trySetMessageQueue(int msgNum, int qId); void initMovements(); void loadMovementsPixelData(); @@ -204,7 +206,16 @@ class StaticANIObject : public GameObject { bool setPicAniInfo(PicAniInfo *picAniInfo); void setSomeDynamicPhaseIndex(int val) { _someDynamicPhaseIndex = val; } + void adjustSomeXY(); + + bool startAnim(int movementId, int messageQueueId, int dynPhaseIdx); + bool startAnimEx(int movid, int parId, int flag1, int flag2); + void startAnimSteps(int movementId, int messageQueueId, int x, int y, Common::Point **points, int pointsCount, int someDynamicPhaseIndex); + void hide(); + void show1(int x, int y, int movementId, int mqId); + void show2(int x, int y, int movementId, int mqId); + void playIdle(); void update(int counterdiff); Statics *addReverseStatics(Statics *ani); @@ -215,7 +226,9 @@ class StaticANIObject : public GameObject { void setSpeed(int speed); void stopAnim_maybe(); - void adjustSomeXY(); + + MessageQueue *changeStatics1(int msgNum); + void changeStatics2(int objId); }; struct MovTable { -- cgit v1.2.3 From 687d0624e57177322c64bc660132c4c017a6e9f0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 Aug 2013 23:56:14 +0300 Subject: FULLPIPE: Fix stupid bug with not processed messages --- engines/fullpipe/fullpipe.cpp | 8 ++++---- engines/fullpipe/fullpipe.h | 2 +- engines/fullpipe/scenes.cpp | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index bca025770b..740c2c2788 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -80,7 +80,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _inputArFlag = false; _recordEvents = false; - _flgSavegameMenuRequested = false; + _flgGameIsRunning = true; _isProcessingMessages = false; @@ -222,7 +222,7 @@ void FullpipeEngine::updateEvents() { case Common::KEYCODE_s: if (_gamePaused) { _gamePaused = 0; - _flgSavegameMenuRequested = true; + _flgGameIsRunning = true; return; } @@ -318,8 +318,8 @@ void FullpipeEngine::updateScreen() { //if (inputArFlag) // updateGame_inputArFlag(); - if (_modalObject || _flgSavegameMenuRequested && (_gameLoader->updateSystems(42), _modalObject != 0)) { - if (_flgSavegameMenuRequested) { + if (_modalObject || _flgGameIsRunning && (_gameLoader->updateSystems(42), _modalObject != 0)) { + if (_flgGameIsRunning) { if (_modalObject->init(42)) { _modalObject->update(); } else { diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index ac9cb856d8..404a70a7e1 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -110,7 +110,7 @@ public: bool _updateFlag; bool _flgCanOpenMap; bool _gamePaused; - bool _flgSavegameMenuRequested; + bool _flgGameIsRunning; bool _inputArFlag; bool _recordEvents; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index f7aa525ad3..d2160b7264 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -837,6 +837,7 @@ int global_messageHandler3(ExCommand *cmd) { int global_messageHandler4(ExCommand *cmd) { StaticANIObject *ani = 0; + debug(0, "global_messageHandler4: %d %d", cmd->_messageKind, cmd->_messageNum); switch (cmd->_messageKind) { case 18: { MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(cmd->_messageNum), cmd->_parId, 0); -- cgit v1.2.3 From 13059906c5f68bebb6344cf5617dc62243d146cf Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 12 Aug 2013 12:32:49 +0300 Subject: FULLPIPE: Rename base class variables to avoid ambigiuity --- engines/fullpipe/gameloader.cpp | 4 ++-- engines/fullpipe/gfx.cpp | 18 +++++++++--------- engines/fullpipe/gfx.h | 2 +- engines/fullpipe/scene.cpp | 10 +++++----- engines/fullpipe/scenes.cpp | 2 +- engines/fullpipe/statics.cpp | 20 ++++++++++---------- engines/fullpipe/utils.cpp | 20 ++++++++++---------- engines/fullpipe/utils.h | 16 ++++++++-------- 8 files changed, 46 insertions(+), 46 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index adb81092f9..f4f59a724c 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -199,7 +199,7 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { StaticANIObject *stobj = g_fullpipe->_currentScene->getStaticANIObject1ById(_field_FA, -1); if (stobj) { - stobj->setFlags(stobj->_flags & 0x100); + stobj->_flags &= 0x100; ExCommand *ex = new ExCommand(stobj->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0); @@ -220,7 +220,7 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { } else { StaticANIObject *stobj = g_fullpipe->_currentScene->getStaticANIObject1ById(_field_FA, -1); if (stobj) - stobj->setFlags(stobj->_flags & 0xfeff); + stobj->_flags &= 0xfeff; } return true; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 2c4701833b..d294267a66 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -96,7 +96,7 @@ bool Background::load(MfcArchive &file) { } void Background::addPictureObject(PictureObject *pct) { - if (pct->_field_4) + if (pct->_okeyCode) pct->renumPictures(&_picObjList); bool inserted = false; @@ -181,7 +181,7 @@ bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) { if (picAniInfo->type & 2) { setOXY(picAniInfo->ox, picAniInfo->oy); _priority = picAniInfo->priority; - _field_4 = picAniInfo->field_8; + _okeyCode = picAniInfo->field_8; setFlags(picAniInfo->flags); _field_8 = picAniInfo->field_24; @@ -192,7 +192,7 @@ bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) { } GameObject::GameObject() { - _field_4 = 0; + _okeyCode = 0; _flags = 0; _id = 0; _ox = 0; @@ -203,7 +203,7 @@ GameObject::GameObject() { } GameObject::GameObject(GameObject *src) { - _field_4 = 1; + _okeyCode = 1; _flags = 0; _id = src->_id; @@ -219,7 +219,7 @@ GameObject::GameObject(GameObject *src) { bool GameObject::load(MfcArchive &file) { debug(5, "GameObject::load()"); - _field_4 = 0; + _okeyCode = 0; _flags = 0; _field_20 = 0; @@ -247,14 +247,14 @@ void GameObject::renumPictures(CPtrList *lst) { for (uint i = 0; i < lst->size(); i++) { if (_id == ((PictureObject *)((*lst)[i]))->_id) - buf[((PictureObject *)((*lst)[i]))->_field_4] = 1; + buf[((PictureObject *)((*lst)[i]))->_okeyCode] = 1; } - if (buf[_field_4]) { + if (buf[_okeyCode]) { uint count; for (count = 1; buf[count] && count < lst->size() + 2; count++) ; - _field_4 = count; + _okeyCode = count; } free(buf); @@ -322,7 +322,7 @@ bool Picture::load(MfcArchive &file) { _width = file.readUint32LE(); _height = file.readUint32LE(); - _flags |= 1; + _mflags |= 1; _memoryObject2 = new MemoryObject2; _memoryObject2->load(file); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 98dfa20a06..a47596c1f4 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -109,7 +109,7 @@ class BigPicture : public Picture { class GameObject : public CObject { public: - int16 _field_4; + int16 _okeyCode; int16 _field_6; int _field_8; int16 _flags; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 7ef4e731b5..0bb44e4143 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -272,7 +272,7 @@ StaticANIObject *Scene::getAniMan() { StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) { for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) { StaticANIObject *o = (StaticANIObject *)*s; - if (o->_id == obj && (a3 == -1 || o->_field_4 == a3)) + if (o->_id == obj && (a3 == -1 || o->_okeyCode == a3)) return o; } @@ -282,7 +282,7 @@ StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) { StaticANIObject *Scene::getStaticANIObject1ByName(char *name, int a3) { for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) { StaticANIObject *o = (StaticANIObject *)*s; - if (!strcmp(o->_objectName, name) && (a3 == -1 || o->_field_4 == a3)) + if (!strcmp(o->_objectName, name) && (a3 == -1 || o->_okeyCode == a3)) return o; } @@ -304,13 +304,13 @@ void Scene::deleteStaticANIObject(StaticANIObject *obj) { } void Scene::addStaticANIObject(StaticANIObject *obj, bool addList2) { - if (obj->_field_4) + if (obj->_okeyCode) obj->renumPictures(&_staticANIObjectList1); _staticANIObjectList1.push_back(obj); if (addList2) { - if (!obj->_field_4) + if (!obj->_okeyCode) obj->clearFlags(); _staticANIObjectList2.push_back(obj); @@ -325,7 +325,7 @@ void Scene::setPictureObjectsFlag4() { PictureObject *Scene::getPictureObjectById(int objId, int flags) { for (uint i = 1; i < _picObjList.size(); i++) { - if (((PictureObject *)_picObjList[i])->_id == objId && ((PictureObject *)_picObjList[i])->_field_4 == flags) + if (((PictureObject *)_picObjList[i])->_id == objId && ((PictureObject *)_picObjList[i])->_okeyCode == flags) return (PictureObject *)_picObjList[i]; } diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index d2160b7264..f3991e234b 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -776,7 +776,7 @@ int global_messageHandler1(ExCommand *cmd) { } else if (st == (0x4000 | ST_MAN_RIGHT)) { newex = new ExCommand(g_fullpipe->_aniMan->_id, 1, MV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0); } - newex->_keyCode = g_fullpipe->_aniMan->_field_4; + newex->_keyCode = g_fullpipe->_aniMan->_okeyCode; newex->_excFlags |= 3; newex->postMessage(); } diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index f03e19c5f6..bef18293b9 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -509,7 +509,7 @@ void StaticANIObject::update(int counterdiff) { newex->_excFlags |= 2; if (newex->_messageKind == 17) { newex->_parentId = _id; - newex->_keyCode = _field_4; + newex->_keyCode = _okeyCode; } newex->sendMessage(); @@ -520,7 +520,7 @@ void StaticANIObject::update(int counterdiff) { if (dyn->_initialCountdown == dyn->_countdown && dyn->_field_68 == 0) { newex = new ExCommand(_id, 17, dyn->_field_68, 0, 0, 0, 1, 0, 0, 0); newex->_excFlags = 2; - newex->_keyCode = _field_4; + newex->_keyCode = _okeyCode; newex->sendMessage(); if (!_movement) @@ -599,7 +599,7 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { if (picAniInfo->type & 3) { setOXY(picAniInfo->ox, picAniInfo->oy); _priority = picAniInfo->priority; - _field_4 = picAniInfo->field_8; + _okeyCode = picAniInfo->field_8; setFlags(picAniInfo->flags); _field_8 = picAniInfo->field_24; } @@ -767,7 +767,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase ExCommand *newex = new ExCommand(_id, 17, 23, 0, 0, movementId, 1, 0, 0, 0); - newex->_keyCode = _field_4; + newex->_keyCode = _okeyCode; newex->_excFlags = 2; newex->postMessage(); @@ -1277,23 +1277,23 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) { _dataSize = src->_dataSize; if (g_fullpipe->_currArchive) { - _field_14 = 0; + _mfield_14 = 0; _libHandle = g_fullpipe->_currArchive; } - _flags |= 1; + _mflags |= 1; _someX = src->_someX; _someY = src->_someY; } else { - _field_14 = src->_field_14; - _field_8 = src->_field_8; - _flags = src->_flags; + _mfield_14 = src->_mfield_14; + _mfield_8 = src->_mfield_8; + _mflags = src->_mflags; _memfilename = (char *)calloc(strlen(src->_memfilename) + 1, 1); strncpy(_memfilename, src->_memfilename, strlen(src->_memfilename) + 1); _dataSize = src->_dataSize; - _field_10 = src->_field_10; + _mfield_10 = src->_mfield_10; _libHandle = src->_libHandle; _bitmap = src->_bitmap; diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index 042afd28df..fb777cc4f2 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -111,12 +111,12 @@ char *MfcArchive::readPascalString(bool twoByte) { MemoryObject::MemoryObject() { _memfilename = 0; - _field_8 = 0; - _field_C = 0; - _field_10 = -1; - _field_14 = 1; + _mfield_8 = 0; + _mfield_C = 0; + _mfield_10 = -1; + _mfield_14 = 1; _dataSize = 0; - _flags = 0; + _mflags = 0; _libHandle = 0; _data = 0; } @@ -139,7 +139,7 @@ bool MemoryObject::load(MfcArchive &file) { } if (g_fullpipe->_currArchive) { - _field_14 = 0; + _mfield_14 = 0; _libHandle = g_fullpipe->_currArchive; } @@ -168,7 +168,7 @@ void MemoryObject::loadFile(char *filename) { byte *MemoryObject::getData() { load(); - if (_field_14 || _flags & 1) { + if (_mfield_14 || _mflags & 1) { return _data; } else { error("Unhandled packed data"); @@ -188,10 +188,10 @@ void MemoryObject::freeData() { } bool MemoryObject::testFlags() { - if (_field_8) + if (_mfield_8) return false; - if (_flags & 1) + if (_mflags & 1) return true; return false; @@ -210,7 +210,7 @@ bool MemoryObject2::load(MfcArchive &file) { debug(5, "MemoryObject2::load()"); MemoryObject::load(file); - _flags |= 1; + _mflags |= 1; debug(5, "MemoryObject2::load: <%s>", _memfilename); diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 00ae76eac7..cfe9d93a74 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -83,16 +83,16 @@ class MemoryObject : CObject { protected: char *_memfilename; - int _field_8; - int _field_C; - int _field_10; - char _field_14; - char _field_15; - char _field_16; - char _field_17; + int _mfield_8; + int _mfield_C; + int _mfield_10; + char _mfield_14; + char _mfield_15; + char _mfield_16; + char _mfield_17; byte *_data; int _dataSize; - int _flags; + int _mflags; NGIArchive *_libHandle; public: -- cgit v1.2.3 From 3cacf6486d09b2062f5cdb57d283977c7c71d2eb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 12 Aug 2013 23:39:10 +0300 Subject: FULLPIPE: Implement BehaviorManager::updateBehaviors() --- engines/fullpipe/behavior.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/behavior.h | 34 +++++++++++----------- 2 files changed, 83 insertions(+), 17 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index 4f9e50d96b..cf1a436c6a 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -24,6 +24,8 @@ #include "fullpipe/objects.h" #include "fullpipe/behavior.h" +#include "fullpipe/statics.h" +#include "fullpipe/messages.h" namespace Fullpipe { @@ -37,7 +39,69 @@ void BehaviorManager::initBehavior(Scene *scene, CGameVar *var) { } void BehaviorManager::updateBehaviors() { - warning("STUB: BehaviorManager::updateBehaviors()"); + if (!_isActive) + return; + + for (uint i = 0; i < _behaviors.size(); i++) { + BehaviorInfo *beh = _behaviors[i]; + + if (!beh->_ani) { + beh->_counter++; + if (beh->_counter >= beh->_counterMax) + updateBehavior(beh, beh->_bheItems[0]); + + continue; + } + + if (beh->_ani->_movement || !(beh->_ani->_flags & 4) || (beh->_ani->_flags & 2)) { + beh->_staticsId = 0; + continue; + } + + if (beh->_ani->_statics->_staticsId == beh->_staticsId) { + beh->_counter++; + if (beh->_counter >= beh->_counterMax) { + if (beh->_subIndex >= 0 && !(beh->_flags & 1) && beh->_ani->_messageQueueId <= 0) + updateStaticAniBehavior(beh->_ani, beh->_counter, beh->_bheItems[beh->_subIndex]); + } + } else { + beh->_staticsId = beh->_ani->_statics->_staticsId; + beh->_counter = 0; + beh->_subIndex = -1; + + for (int j = 0; j < beh->_itemsCount; j++) + if (beh->_bheItems[j]->_staticsId == beh->_staticsId) { + beh->_subIndex = j; + break; + } + + } + } +} + +void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry) { + for (int i = 0; i < entry->_itemsCount; i++) { + BehaviorEntryInfo *bhi = entry->_items[i]; + if (!(bhi->_flags & 1)) { + if (bhi->_flags & 2) { + MessageQueue *mq = new MessageQueue(entry->_items[i]->_messageQueue, 0, 1); + + mq->sendNextCommand(); + + entry->_items[i]->_flags &= 0xFFFFFFFD; + } else if (behaviorInfo->_counter >= bhi->_delay && bhi->_percent && g_fullpipe->_rnd->getRandomNumber(32767) <= entry->_items[i]->_percent) { + MessageQueue *mq = new MessageQueue(entry->_items[i]->_messageQueue, 0, 1); + + mq->sendNextCommand(); + + behaviorInfo->_counter = 0; + } + } + } +} + +void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, unsigned int delay, BehaviorEntry *behaviorEntry) { + warning("STUB: BehaviorManager::updateStaticAniBehavior()"); } } // End of namespace Fullpipe diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h index ea618fdfd6..5029b3ee17 100644 --- a/engines/fullpipe/behavior.h +++ b/engines/fullpipe/behavior.h @@ -25,22 +25,10 @@ namespace Fullpipe { -class BehaviorManager : public CObject { - CObArray _behaviors; - Scene *_scene; - bool _isActive; - - public: - BehaviorManager(); - - void initBehavior(Scene *scene, CGameVar *var); - void updateBehaviors(); -}; - struct BehaviorEntryInfo { - int _messageQueue; + MessageQueue *_messageQueue; int _delay; - int _percent; + uint _percent; int _flags; }; @@ -48,7 +36,7 @@ struct BehaviorEntry { int _staticsId; int _itemsCount; int _flags; - BehaviorEntryInfo *_items; + BehaviorEntryInfo **_items; }; struct BehaviorInfo { @@ -59,7 +47,21 @@ struct BehaviorInfo { int _flags; int _subIndex; int _itemsCount; - BehaviorEntryInfo *_items; + Common::Array _bheItems; +}; + +class BehaviorManager : public CObject { + Common::Array _behaviors; + Scene *_scene; + bool _isActive; + + public: + BehaviorManager(); + + void initBehavior(Scene *scene, CGameVar *var); + void updateBehaviors(); + void updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry); + void updateStaticAniBehavior(StaticANIObject *ani, unsigned int delay, BehaviorEntry *behaviorEntry); }; } // End of namespace Fullpipe -- cgit v1.2.3 From db290e9b0ce3c0a76d42365cd9ca494605f3bf05 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 14 Aug 2013 01:51:03 +0300 Subject: FULLPIPE: Implement BehaviorManager::initBehavior() --- engines/fullpipe/behavior.cpp | 53 +++++++++++++++++++++++++++++++++++++++++-- engines/fullpipe/behavior.h | 7 ++++++ engines/fullpipe/scene.h | 5 +--- 3 files changed, 59 insertions(+), 6 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index cf1a436c6a..d1048948ac 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -34,8 +34,49 @@ BehaviorManager::BehaviorManager() { _isActive = 1; } -void BehaviorManager::initBehavior(Scene *scene, CGameVar *var) { - warning("STUB: BehaviorManager::initBehavior()"); +BehaviorManager::~BehaviorManager() { + clear(); +} + +void BehaviorManager::clear() { + for (uint i = 0; i < _behaviors.size(); i++) { + for (int j = 0; j < _behaviors[i]->_itemsCount; j++) + delete _behaviors[i]->_bheItems[j]; + + delete _behaviors[i]; + } + _behaviors.clear(); +} + +void BehaviorManager::initBehavior(Scene *sc, CGameVar *var) { + clear(); + _scene = sc; + + BehaviorInfo *behinfo; + + CGameVar *behvar = var->getSubVarByName("BEHAVIOR"); + if (!behvar) + return; + + for (CGameVar *subvar = behvar->_subVars; subvar; subvar = subvar->_nextVarObj) { + if (!strcmp(subvar->_varName, "AMBIENT")) { + behinfo = new BehaviorInfo; + behinfo->initAmbientBehavior(subvar); + + _behaviors.push_back(behinfo); + } else { + StaticANIObject *ani = sc->getStaticANIObject1ByName(subvar->_varName, -1); + if (ani) + for (uint i = 0; i < sc->_staticANIObjectList1.size(); i++) + if (((StaticANIObject *)sc->_staticANIObjectList1[i])->_id == ani->_id) { + behinfo = new BehaviorInfo; + behinfo->initObjectBehavior(subvar, sc, ani); + behinfo->_ani = (StaticANIObject *)sc->_staticANIObjectList1[i]; + + _behaviors.push_back(behinfo); + } + } + } } void BehaviorManager::updateBehaviors() { @@ -104,4 +145,12 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, unsigned int warning("STUB: BehaviorManager::updateStaticAniBehavior()"); } +void BehaviorInfo::initAmbientBehavior(CGameVar *var) { + warning("STUB: BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName)); +} + +void BehaviorInfo::initObjectBehavior(CGameVar *var, Scene *sceneObj, StaticANIObject *ani) { + warning("STUB: BehaviorInfo::initObjectBehavior(%s)", transCyrillic((byte *)var->_varName)); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h index 5029b3ee17..7cddabc0af 100644 --- a/engines/fullpipe/behavior.h +++ b/engines/fullpipe/behavior.h @@ -48,6 +48,9 @@ struct BehaviorInfo { int _subIndex; int _itemsCount; Common::Array _bheItems; + + void initAmbientBehavior(CGameVar *var); + void initObjectBehavior(CGameVar *var, Scene *sceneObj, StaticANIObject *ani); }; class BehaviorManager : public CObject { @@ -57,8 +60,12 @@ class BehaviorManager : public CObject { public: BehaviorManager(); + ~BehaviorManager(); + + void clear(); void initBehavior(Scene *scene, CGameVar *var); + void updateBehaviors(); void updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry); void updateStaticAniBehavior(StaticANIObject *ani, unsigned int delay, BehaviorEntry *behaviorEntry); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index d8d436208b..1b05234853 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -30,10 +30,7 @@ namespace Fullpipe { class MessageQueue; class Scene : public Background { - friend class FullpipeEngine; - friend class SceneTag; - friend class StaticANIObject; - + public: CPtrList _staticANIObjectList1; CPtrList _staticANIObjectList2; CPtrList _messageQueueList; -- cgit v1.2.3 From 682eb87af6788cf576691ecc938da9dbc48802cf Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 14 Aug 2013 09:30:30 +0300 Subject: FULLPIPE: Implement BehaviorInfo::initObjectBehavior() --- engines/fullpipe/behavior.cpp | 49 ++++++++++++++++++++++++++++++++++++++-- engines/fullpipe/behavior.h | 7 +++++- engines/fullpipe/objects.h | 1 + engines/fullpipe/stateloader.cpp | 13 +++++++++++ 4 files changed, 67 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index d1048948ac..f2d0d5594d 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -145,12 +145,57 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, unsigned int warning("STUB: BehaviorManager::updateStaticAniBehavior()"); } +void BehaviorInfo::clear() { + _ani = 0; + _staticsId = 0; + _counter = 0; + _counterMax = 0; + _flags = 0; + _subIndex = 0; + _itemsCount = 0; + + _bheItems.clear(); +} + void BehaviorInfo::initAmbientBehavior(CGameVar *var) { warning("STUB: BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName)); } -void BehaviorInfo::initObjectBehavior(CGameVar *var, Scene *sceneObj, StaticANIObject *ani) { - warning("STUB: BehaviorInfo::initObjectBehavior(%s)", transCyrillic((byte *)var->_varName)); +void BehaviorInfo::initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject *ani) { + debug(0, "BehaviorInfo::initObjectBehavior(%s)", transCyrillic((byte *)var->_varName)); + + clear(); + + _itemsCount = var->getSubVarsCount(); + _counterMax = -1; + + while (var->_varType == 2) { + if (strcmp(var->_value.stringValue, "ROOT")) + break; + + CGameVar *v1 = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("BEHAVIOR")->getSubVarByName(ani->getName()); + if (v1 == var) + return; + + sc = g_fullpipe->accessScene(ani->_sceneId); + clear(); + var = v1; + _itemsCount = var->getSubVarsCount(); + _counterMax = -1; + } + + for (int i = 0; i < _itemsCount; i++) { + int maxDelay; + + _bheItems.push_back(new BehaviorEntry(var->getSubVarByIndex(i), sc, ani, &maxDelay)); + + if (maxDelay < _counterMax ) + _counterMax = maxDelay; + } +} + +BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *maxDelay) { + warning("STUB: BehaviorEntry::BehaviorEntry()"); } } // End of namespace Fullpipe diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h index 7cddabc0af..ecb7d3a428 100644 --- a/engines/fullpipe/behavior.h +++ b/engines/fullpipe/behavior.h @@ -37,6 +37,8 @@ struct BehaviorEntry { int _itemsCount; int _flags; BehaviorEntryInfo **_items; + + BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *maxDelay); }; struct BehaviorInfo { @@ -49,8 +51,11 @@ struct BehaviorInfo { int _itemsCount; Common::Array _bheItems; + BehaviorInfo() { clear(); } + + void clear(); void initAmbientBehavior(CGameVar *var); - void initObjectBehavior(CGameVar *var, Scene *sceneObj, StaticANIObject *ani); + void initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject *ani); }; class BehaviorManager : public CObject { diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 33406bb217..590e8ebcbc 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -115,6 +115,7 @@ class CGameVar : public CObject { CGameVar *addSubVarAsInt(const char *name, int value); bool addSubVar(CGameVar *subvar); int getSubVarsCount(); + CGameVar *getSubVarByIndex(int idx); }; struct PreloadItem { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 3cc4d0046f..6d6185e58c 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -300,6 +300,19 @@ int CGameVar::getSubVarsCount() { return res; } +CGameVar *CGameVar::getSubVarByIndex(int idx) { + CGameVar *sub = _subVars; + + while (idx--) { + sub = sub->_nextVarObj; + + if (!sub) + return 0; + } + + return sub; +} + Sc2::Sc2() { _sceneId = 0; _field_2 = 0; -- cgit v1.2.3 From fce8c0f5952533b592de21205274f5cf9347a3b1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 14 Aug 2013 12:52:59 +0300 Subject: FULLPIPE: Implement BehaviorEntry --- engines/fullpipe/behavior.cpp | 53 +++++++++++++++++++++++++++++++++++++++++-- engines/fullpipe/behavior.h | 4 +++- engines/fullpipe/gfx.cpp | 1 + engines/fullpipe/scene.cpp | 12 ++++++++-- engines/fullpipe/scene.h | 1 + engines/fullpipe/statics.cpp | 8 +++++++ engines/fullpipe/statics.h | 1 + 7 files changed, 75 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index f2d0d5594d..5f26efabe4 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -194,8 +194,57 @@ void BehaviorInfo::initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject } } -BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *maxDelay) { - warning("STUB: BehaviorEntry::BehaviorEntry()"); +BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay) { + _staticsId = 0; + _itemsCount = 0; + + *minDelay = -1; + + int totalPercent = 0; + _flags = 0; + _items = 0; + + Statics *st = ani->getStaticsByName(var->_varName); + if (st) + _staticsId = st->_staticsId; + + _itemsCount = var->getSubVarsCount(); + if (_itemsCount) { + _items = (BehaviorEntryInfo**)calloc(_itemsCount, sizeof(BehaviorEntryInfo *)); + + for (int i = 0; i < _itemsCount; i++) { + CGameVar *subvar = var->getSubVarByIndex(i); + + _items[i] = new BehaviorEntryInfo(subvar, sc); + totalPercent += _items[i]->_percent; + + if (_items[i]->_delay < *minDelay) + *minDelay = _items[i]->_delay; + } + + if (!*minDelay && totalPercent == 1000) + _flags |= 1; + } +} + +BehaviorEntryInfo::BehaviorEntryInfo(CGameVar *subvar, Scene *sc) { + _messageQueue = 0; + _delay = 0; + _percent = 0; + _flags = 0; + _messageQueue = sc->getMessageQueueByName(subvar->_varName); + + CGameVar *vart = subvar->getSubVarByName("dwDelay"); + if (vart) + _delay = vart->_value.intValue; + + vart = subvar->getSubVarByName("dwPercent"); + if (vart) + _percent = 0x7FFF * vart->_value.intValue / 1000; + + vart = subvar->getSubVarByName("dwFlags"); + if (vart && vart->_varType == 2 && strstr(vart->_value.stringValue, "QDESC_AUTOSTART")) + _flags |= 2; } } // End of namespace Fullpipe diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h index ecb7d3a428..210426ebc6 100644 --- a/engines/fullpipe/behavior.h +++ b/engines/fullpipe/behavior.h @@ -30,6 +30,8 @@ struct BehaviorEntryInfo { int _delay; uint _percent; int _flags; + + BehaviorEntryInfo(CGameVar *subvar, Scene *sc); }; struct BehaviorEntry { @@ -38,7 +40,7 @@ struct BehaviorEntry { int _flags; BehaviorEntryInfo **_items; - BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *maxDelay); + BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay); }; struct BehaviorInfo { diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index d294267a66..6367407838 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -200,6 +200,7 @@ GameObject::GameObject() { _priority = 0; _field_20 = 0; _field_8 = 0; + _objectName = 0; } GameObject::GameObject(GameObject *src) { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 0bb44e4143..7f1aeaa02c 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -280,8 +280,8 @@ StaticANIObject *Scene::getStaticANIObject1ById(int obj, int a3) { } StaticANIObject *Scene::getStaticANIObject1ByName(char *name, int a3) { - for (CPtrList::iterator s = _staticANIObjectList1.begin(); s != _staticANIObjectList1.end(); ++s) { - StaticANIObject *o = (StaticANIObject *)*s; + for (uint n = 0; n < _staticANIObjectList1.size(); n++) { + StaticANIObject *o = (StaticANIObject *)_staticANIObjectList1[n]; if (!strcmp(o->_objectName, name) && (a3 == -1 || o->_okeyCode == a3)) return o; } @@ -340,6 +340,14 @@ MessageQueue *Scene::getMessageQueueById(int messageId) { return 0; } +MessageQueue *Scene::getMessageQueueByName(char *name) { + for (uint i = 0; i < _messageQueueList.size(); i++) + if (!strcmp(((MessageQueue *)_messageQueueList[i])->_queueName, name)) + return (MessageQueue *)_messageQueueList[i]; + + return 0; +} + void Scene::preloadMovements(CGameVar *var) { CGameVar *preload = var->getSubVarByName("PRELOAD"); if (!preload) diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 1b05234853..1292bedf59 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -60,6 +60,7 @@ class Scene : public Background { StaticANIObject *getStaticANIObject1ById(int obj, int a3); StaticANIObject *getStaticANIObject1ByName(char *name, int a3); MessageQueue *getMessageQueueById(int messageId); + MessageQueue *getMessageQueueByName(char *name); void deleteStaticANIObject(StaticANIObject *obj); void addStaticANIObject(StaticANIObject *obj, bool addList2); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index bef18293b9..de5d68983f 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -273,6 +273,14 @@ Statics *StaticANIObject::getStaticsById(int itemId) { return 0; } +Statics *StaticANIObject::getStaticsByName(char *name) { + for (uint i = 0; i < _staticsList.size(); i++) + if (!strcmp(((Statics *)_staticsList[i])->_staticsName, name)) + return (Statics *)_staticsList[i]; + + return 0; +} + Movement *StaticANIObject::getMovementById(int itemId) { for (uint i = 0; i < _movements.size(); i++) if (((Movement *)_movements[i])->_id == itemId) diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 97a044f95f..40fc91dc06 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -187,6 +187,7 @@ class StaticANIObject : public GameObject { void setOXY(int x, int y); Statics *getStaticsById(int id); + Statics *getStaticsByName(char *name); Movement *getMovementById(int id); int getMovementIdById(int itemId); Movement *getMovementByName(char *name); -- cgit v1.2.3 From 4db2d7e21b6729b04e1760af302a1acdd3bd4ae4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 14 Aug 2013 21:11:12 +0300 Subject: FULLPIPE: Fix crash --- engines/fullpipe/gameloader.cpp | 2 +- engines/fullpipe/gameloader.h | 2 +- engines/fullpipe/interaction.cpp | 1 + engines/fullpipe/messages.cpp | 2 ++ engines/fullpipe/motion.cpp | 1 + engines/fullpipe/scene.cpp | 2 ++ engines/fullpipe/scenes.cpp | 2 +- engines/fullpipe/sound.cpp | 3 ++- engines/fullpipe/stateloader.cpp | 1 + 9 files changed, 12 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index f4f59a724c..a91065fe87 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -51,7 +51,7 @@ CGameLoader::CGameLoader() { _inputController = new CInputController(); _gameProject = 0; - //_gameName = "untitled"; + _gameName = 0; addMessageHandlerByIndex(global_messageHandler2, 0, 0); insertMessageHandler(global_messageHandler3, 0, 128); diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index cc41855dba..a8d51cd794 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -32,7 +32,7 @@ namespace Fullpipe { class SceneTag; class CMctlCompound; class CInputController; - class CInteractionController; +class CInteractionController; class CGameLoader : public CObject { public: diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index 8942d5dc6d..b25a20949f 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -61,6 +61,7 @@ CInteraction::CInteraction() { _staticsId2 = 0; _field_28 = 0; _sceneId = -1; + _actionName = 0; } bool CInteraction::load(MfcArchive &file) { diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 55a0b5f0bd..953b87c6af 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -171,6 +171,7 @@ Message::Message(int16 parentId, int messageKind, int x, int y, int a6, int a7, CObjstateCommand::CObjstateCommand() { _value = 0; + _objCommandName = 0; } bool CObjstateCommand::load(MfcArchive &file) { @@ -192,6 +193,7 @@ MessageQueue::MessageQueue() { _id = 0; _isFinished = 0; _flags = 0; + _queueName = 0; } MessageQueue::MessageQueue(MessageQueue *src, int parId, int field_38) { diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index fed3cb79ff..3259653001 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -122,6 +122,7 @@ CMovGraphLink::CMovGraphLink() { _field_3C = 0; _field_38 = 0; _movGraphReact = 0; + _name = 0; } bool CMovGraphLink::load(MfcArchive &file) { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 7f1aeaa02c..da89611c9b 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -70,6 +70,7 @@ bool SceneTagList::load(MfcArchive &file) { SceneTag::SceneTag() { _field_4 = 0; _scene = 0; + _tag = 0; } bool SceneTag::load(MfcArchive &file) { @@ -123,6 +124,7 @@ Scene::Scene() { _shadows = 0; _soundList = 0; _libHandle = 0; + _sceneName = 0; } bool Scene::load(MfcArchive &file) { diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index f3991e234b..b6c05afb9d 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -140,7 +140,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->setPictureObjectsFlag4(); for (CPtrList::iterator s = scene->_staticANIObjectList1.begin(); s != scene->_staticANIObjectList1.end(); ++s) { - StaticANIObject *o = (StaticANIObject *)s; + StaticANIObject *o = (StaticANIObject *)*s; o->setFlags(o->_field_6 & 0xFE7F); } diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index d69ce35777..7a6696edd6 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -73,7 +73,8 @@ Sound::Sound() { _directSoundBuffer = 0; _soundData = 0; _objectId = 0; - memset(_directSoundBuffers, 0, sizeof(_directSoundBuffers)); + memset(_directSoundBuffers, 0, sizeof(_directSoundBuffers)); + _description = 0; } diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 6d6185e58c..97306c1815 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -171,6 +171,7 @@ CGameVar::CGameVar() { _field_14 = 0; _varType = 0; _value.floatValue = 0; + _varName = 0; } bool CGameVar::load(MfcArchive &file) { -- cgit v1.2.3 From 9f52e9f65068e136680e5fbd4a55eb4ff69720c2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 15 Aug 2013 00:46:19 +0300 Subject: FULLPIPE: More work on behaviors. Animations start to (buggy) work. --- engines/fullpipe/behavior.cpp | 92 ++++++++++++++++++++++++++++++++++++------- engines/fullpipe/behavior.h | 9 +++-- engines/fullpipe/gfx.cpp | 1 + engines/fullpipe/messages.cpp | 18 +++++++-- engines/fullpipe/messages.h | 2 + engines/fullpipe/objects.h | 2 +- engines/fullpipe/scenes.cpp | 2 +- engines/fullpipe/statics.cpp | 43 +++++++++++++++++++- 8 files changed, 144 insertions(+), 25 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index 5f26efabe4..2551133675 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -61,7 +61,7 @@ void BehaviorManager::initBehavior(Scene *sc, CGameVar *var) { for (CGameVar *subvar = behvar->_subVars; subvar; subvar = subvar->_nextVarObj) { if (!strcmp(subvar->_varName, "AMBIENT")) { behinfo = new BehaviorInfo; - behinfo->initAmbientBehavior(subvar); + behinfo->initAmbientBehavior(subvar, sc); _behaviors.push_back(behinfo); } else { @@ -83,6 +83,7 @@ void BehaviorManager::updateBehaviors() { if (!_isActive) return; + debug(0, "BehaviorManager::updateBehaviors()"); for (uint i = 0; i < _behaviors.size(); i++) { BehaviorInfo *beh = _behaviors[i]; @@ -121,17 +122,18 @@ void BehaviorManager::updateBehaviors() { } void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry) { + debug(0, "BehaviorManager::updateBehavior() %d", entry->_itemsCount); for (int i = 0; i < entry->_itemsCount; i++) { BehaviorEntryInfo *bhi = entry->_items[i]; if (!(bhi->_flags & 1)) { if (bhi->_flags & 2) { - MessageQueue *mq = new MessageQueue(entry->_items[i]->_messageQueue, 0, 1); + MessageQueue *mq = new MessageQueue(bhi->_messageQueue, 0, 1); mq->sendNextCommand(); - entry->_items[i]->_flags &= 0xFFFFFFFD; + bhi->_flags &= 0xFFFFFFFD; } else if (behaviorInfo->_counter >= bhi->_delay && bhi->_percent && g_fullpipe->_rnd->getRandomNumber(32767) <= entry->_items[i]->_percent) { - MessageQueue *mq = new MessageQueue(entry->_items[i]->_messageQueue, 0, 1); + MessageQueue *mq = new MessageQueue(bhi->_messageQueue, 0, 1); mq->sendNextCommand(); @@ -141,8 +143,40 @@ void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry * } } -void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, unsigned int delay, BehaviorEntry *behaviorEntry) { - warning("STUB: BehaviorManager::updateStaticAniBehavior()"); +void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorEntry *bhe) { + debug(0, "BehaviorManager::updateStaticAniBehavior(%s)", transCyrillic((byte *)ani->_objectName)); + + MessageQueue *mq = 0; + + if (bhe->_flags & 1) { + uint rnd = g_fullpipe->_rnd->getRandomNumber(32767); + uint runPercent = 0; + for (int i = 0; i < bhe->_itemsCount; i++) { + if (!(bhe->_items[i]->_flags & 1) && bhe->_items[i]->_percent) { + if (rnd >= runPercent && rnd <= runPercent + bhe->_items[i]->_percent || i == bhe->_itemsCount - 1) { + mq = new MessageQueue(bhe->_items[i]->_messageQueue, 0, 1); + break; + } + runPercent += bhe->_items[i]->_percent; + } + } + } else { + for (int i = 0; i < bhe->_itemsCount; i++) { + if (!(bhe->_items[i]->_flags & 1) && delay >= bhe->_items[i]->_delay) { + if (bhe->_items[i]->_percent) { + if (g_fullpipe->_rnd->getRandomNumber(32767) <= bhe->_items[i]->_percent) { + mq = new MessageQueue(bhe->_items[i]->_messageQueue, 0, 1); + break; + } + } + } + } + } + + if (mq) { + mq->replaceKeyCode(-1, ani->_okeyCode); + mq->chain(ani); + } } void BehaviorInfo::clear() { @@ -157,8 +191,28 @@ void BehaviorInfo::clear() { _bheItems.clear(); } -void BehaviorInfo::initAmbientBehavior(CGameVar *var) { - warning("STUB: BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName)); +void BehaviorInfo::initAmbientBehavior(CGameVar *var, Scene *sc) { + debug(0, "BehaviorInfo::initAmbientBehavior(%s)", transCyrillic((byte *)var->_varName)); + + clear(); + _itemsCount = 1; + _counterMax = -1; + + BehaviorEntry *bi = new BehaviorEntry(); + + _bheItems.push_back(bi); + + bi->_itemsCount = var->getSubVarsCount(); + + bi->_items = (BehaviorEntryInfo**)calloc(bi->_itemsCount, sizeof(BehaviorEntryInfo *)); + + for (int i = 0; i < bi->_itemsCount; i++) { + int delay; + bi->_items[i] = new BehaviorEntryInfo(var->getSubVarByIndex(i), sc, &delay); + + if (bi->_items[i]->_delay <_counterMax) + _counterMax = bi->_items[i]->_delay; + } } void BehaviorInfo::initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject *ani) { @@ -189,16 +243,23 @@ void BehaviorInfo::initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject _bheItems.push_back(new BehaviorEntry(var->getSubVarByIndex(i), sc, ani, &maxDelay)); - if (maxDelay < _counterMax ) + if (maxDelay < _counterMax) _counterMax = maxDelay; } } +BehaviorEntry::BehaviorEntry() { + _staticsId = 0; + _itemsCount = 0; + _flags = 0; + _items = 0; +} + BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay) { _staticsId = 0; _itemsCount = 0; - *minDelay = -1; + *minDelay = 100000000; int totalPercent = 0; _flags = 0; @@ -214,9 +275,10 @@ BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int for (int i = 0; i < _itemsCount; i++) { CGameVar *subvar = var->getSubVarByIndex(i); + int delay; - _items[i] = new BehaviorEntryInfo(subvar, sc); - totalPercent += _items[i]->_percent; + _items[i] = new BehaviorEntryInfo(subvar, sc, &delay); + totalPercent += delay; if (_items[i]->_delay < *minDelay) *minDelay = _items[i]->_delay; @@ -227,7 +289,7 @@ BehaviorEntry::BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int } } -BehaviorEntryInfo::BehaviorEntryInfo(CGameVar *subvar, Scene *sc) { +BehaviorEntryInfo::BehaviorEntryInfo(CGameVar *subvar, Scene *sc, int *delay) { _messageQueue = 0; _delay = 0; _percent = 0; @@ -241,7 +303,9 @@ BehaviorEntryInfo::BehaviorEntryInfo(CGameVar *subvar, Scene *sc) { vart = subvar->getSubVarByName("dwPercent"); if (vart) _percent = 0x7FFF * vart->_value.intValue / 1000; - + + *delay = vart->_value.intValue; + vart = subvar->getSubVarByName("dwFlags"); if (vart && vart->_varType == 2 && strstr(vart->_value.stringValue, "QDESC_AUTOSTART")) _flags |= 2; diff --git a/engines/fullpipe/behavior.h b/engines/fullpipe/behavior.h index 210426ebc6..d9375d4d01 100644 --- a/engines/fullpipe/behavior.h +++ b/engines/fullpipe/behavior.h @@ -28,10 +28,10 @@ namespace Fullpipe { struct BehaviorEntryInfo { MessageQueue *_messageQueue; int _delay; - uint _percent; + uint32 _percent; int _flags; - BehaviorEntryInfo(CGameVar *subvar, Scene *sc); + BehaviorEntryInfo(CGameVar *subvar, Scene *sc, int *delay); }; struct BehaviorEntry { @@ -40,6 +40,7 @@ struct BehaviorEntry { int _flags; BehaviorEntryInfo **_items; + BehaviorEntry(); BehaviorEntry(CGameVar *var, Scene *sc, StaticANIObject *ani, int *minDelay); }; @@ -56,7 +57,7 @@ struct BehaviorInfo { BehaviorInfo() { clear(); } void clear(); - void initAmbientBehavior(CGameVar *var); + void initAmbientBehavior(CGameVar *var, Scene *sc); void initObjectBehavior(CGameVar *var, Scene *sc, StaticANIObject *ani); }; @@ -75,7 +76,7 @@ class BehaviorManager : public CObject { void updateBehaviors(); void updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *entry); - void updateStaticAniBehavior(StaticANIObject *ani, unsigned int delay, BehaviorEntry *behaviorEntry); + void updateStaticAniBehavior(StaticANIObject *ani, int delay, BehaviorEntry *beh); }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 6367407838..df48a1cb7d 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -199,6 +199,7 @@ GameObject::GameObject() { _oy = 0; _priority = 0; _field_20 = 0; + _field_6 = 0; _field_8 = 0; _objectName = 0; } diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 953b87c6af..22343af8f8 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -414,10 +414,20 @@ void MessageQueue::finish() { warning("STUB: MessageQueue::finish()"); } +void MessageQueue::replaceKeyCode(int key1, int key2) { + for (uint i = 0; i < getCount(); i++) { + ExCommand *ex = getExCommandByIndex(i); + int k = ex->_messageKind; + if ((k == 1 || k == 20 || k == 5 || k == 6 || k == 2 || k == 18 || k == 19 || k == 22 || k == 55) + && ex->_keyCode == key1) + ex->_keyCode = key2; + } +} + MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { for (CPtrList::iterator s = begin(); s != end(); ++s) { - if (((MessageQueue *)s)->_id == id) - return (MessageQueue *)s; + if (((MessageQueue *)*s)->_id == id) + return (MessageQueue *)*s; } return 0; @@ -446,8 +456,8 @@ void GlobalMessageQueueList::removeQueueById(int id) { void GlobalMessageQueueList::disableQueueById(int id) { for (CPtrList::iterator s = begin(); s != end(); ++s) { - if (((MessageQueue *)s)->_parId == id) - ((MessageQueue *)s)->_parId = 0; + if (((MessageQueue *)*s)->_parId == id) + ((MessageQueue *)*s)->_parId = 0; } } diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 03d30f2b7d..d202235f93 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -121,6 +121,8 @@ class MessageQueue : public CObject { ExCommand *getExCommandByIndex(uint idx); + void replaceKeyCode(int key1, int key2); + bool chain(StaticANIObject *ani); void update(); void sendNextCommand(); diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 590e8ebcbc..dd1545ffb0 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -91,7 +91,7 @@ class Sc2Array : public Common::Array { union VarValue { float floatValue; - int intValue; + int32 intValue; char *stringValue; }; diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index b6c05afb9d..843b098aab 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -141,7 +141,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { for (CPtrList::iterator s = scene->_staticANIObjectList1.begin(); s != scene->_staticANIObjectList1.end(); ++s) { StaticANIObject *o = (StaticANIObject *)*s; - o->setFlags(o->_field_6 & 0xFE7F); + o->setFlags(o->_flags & 0xFE7F); } PictureObject *p = accessScene(SC_INV)->getPictureObjectById(PIC_INV_MENU, 0); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index de5d68983f..168ec90e27 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1225,7 +1225,48 @@ bool Movement::gotoNextFrame(int callback1, int callback2) { } bool Movement::gotoPrevFrame() { - warning("STUB: Movement::gotoPrevFrame()"); + debug(8, "Movement::gotoPrevFrame()"); + + if (!_currDynamicPhaseIndex) { + gotoLastFrame(); + return false; + } + + Common::Point point; + + getCurrDynamicPhaseXY(point); + + _ox -= point.x; + _oy -= point.y; + + if (_currMovement) { + if (_currMovement->_framePosOffsets) { + _ox += _currMovement->getDimensionsOfPhase(&point, _currDynamicPhaseIndex)->x; + _ox += _currMovement->_framePosOffsets[_currDynamicPhaseIndex]->x; + _oy -= _currMovement->_framePosOffsets[_currDynamicPhaseIndex]->y; + } + + _currDynamicPhaseIndex--; + if (_currDynamicPhaseIndex < 0) + _currDynamicPhaseIndex = _currMovement->_dynamicPhases.size() - 1; + + _ox -= _currMovement->getDimensionsOfPhase(&point, _currDynamicPhaseIndex)->x; + } else { + if (_framePosOffsets) { + _ox -= _framePosOffsets[_currDynamicPhaseIndex]->x; + _oy -= _framePosOffsets[_currDynamicPhaseIndex]->y; + } + + _currDynamicPhaseIndex--; + if (_currDynamicPhaseIndex < 0) + _currDynamicPhaseIndex = _currMovement->_dynamicPhases.size() - 1; + } + + updateCurrDynamicPhase(); + getCurrDynamicPhaseXY(point); + + _ox += point.x; + _oy += point.y; return true; } -- cgit v1.2.3 From 2167968d21d4a94d6077204f28e6d188ccaa9d5d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 15 Aug 2013 11:14:44 +0300 Subject: FULLPIPE: Implement Movement::draw() --- engines/fullpipe/gfx.cpp | 18 ++++++++++++++++ engines/fullpipe/gfx.h | 4 ++++ engines/fullpipe/statics.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index df48a1cb7d..e5cbac31ac 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -798,6 +798,24 @@ Bitmap *Bitmap::reverseImage() { return this; } +Bitmap *Bitmap::flipVertical() { + warning("STUB: Bitmap::flipVertical()"); + + return this; +} + + void Bitmap::drawShaded(int type, int x, int y, byte *palette) { + warning("STUB: Bitmap::drawShaded(%d, %d, %d)", type, x, y); + + putDib(x, y, (int32 *)palette); +} + + void Bitmap::drawRotated(int x, int y, int angle, byte *palette) { + warning("STUB: Bitmap::drawShaded(%d, %d, %d)", x, y, angle); + + putDib(x, y, (int32 *)palette); +} + bool BigPicture::load(MfcArchive &file) { debug(5, "BigPicture::load()"); Picture::load(file); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index a47596c1f4..7cc18adc7a 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -52,6 +52,10 @@ struct Bitmap { void copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format); Bitmap *reverseImage(); + Bitmap *flipVertical(); + + void drawShaded(int type, int x, int y, byte *palette); + void drawRotated(int x, int y, int angle, byte *palette); }; class Picture : public MemoryObject { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 168ec90e27..0bb580fc53 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -313,6 +313,56 @@ Movement *StaticANIObject::getMovementByName(char *name) { void Movement::draw(bool flipFlag, int angle) { warning("STUB: Movement::draw(%d, %d)", flipFlag, angle); + + Common::Point point; + + getCurrDynamicPhaseXY(point); + + int x = _ox - point.x; + int y = _oy - point.y; + + if (_currDynamicPhase->getPaletteData()) + g_fullpipe->_globalPalette = _currDynamicPhase->getPaletteData(); + + if (_currDynamicPhase->getAlpha() < 0xFF) { + warning("Movement::draw: alpha < 0xff: %d", _currDynamicPhase->getAlpha()); + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, _currDynamicPhase->getAlpha()); + } + + Bitmap *bmp; + if (_currMovement) { + bmp = _currDynamicPhase->getPixelData()->reverseImage(); + } else { + bmp = _currDynamicPhase->getPixelData(); + } + + if (flipFlag) { + bmp->flipVertical()->drawShaded(1, x, y + 30 + _currDynamicPhase->_rect->bottom, _currDynamicPhase->_paletteData); + } if (angle) { + bmp->drawRotated(x, y, angle, _currDynamicPhase->_paletteData); + } else { + bmp->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData); + } + + if (_currDynamicPhase->_rect->top) { + if (!_currDynamicPhase->_convertedBitmap) { + //v12 = Picture_getPixelData(v5); + //v13 = Bitmap_convertTo16Bit565(v12, (unsigned int *)&_currDynamicPhase->rect); + //_currDynamicPhase->convertedBitmap = v13; + } + + if (_currDynamicPhase->_convertedBitmap) { + if (_currMovement) { + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, LOBYTE(_currDynamicPhase->rect.top)); + _currDynamicPhase->_convertedBitmap->reverseImage()->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData); + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 0, 255); + } else { + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 1, LOBYTE(_currDynamicPhase->rect.top)); + _currDynamicPhase->_convertedBitmap->putDib(x, y, (int32 *)_currDynamicPhase->_paletteData); + //vrtSetAlphaBlendMode(g_vrtDrawHandle, 0, 255); + } + } + } } -- cgit v1.2.3 From 0945b4595656c32997d32aa64ed14e0d073731dd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 16 Aug 2013 02:21:43 +0300 Subject: FULLPIPE: Implement StaticANIObject::stopAnim_maybe() --- engines/fullpipe/statics.cpp | 65 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 0bb580fc53..6de3b6981a 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -638,7 +638,70 @@ void StaticANIObject::update(int counterdiff) { } void StaticANIObject::stopAnim_maybe() { - warning("STUB: StaticANIObject::stopAnim_maybe()"); + debug(0, "StaticANIObject::stopAnim_maybe()"); + + if (!(_flags & 1)) + return; + + _flags ^= 1; + + int oid = 0; + int oldmqid = _messageQueueId; + Common::Point point; + + if (_movement) { + setOXY(_movement->_ox, _movement->_oy); + + if (_flags & 0x40) { + if (!_movement->_currMovement && !_movement->_currDynamicPhaseIndex) { + _statics = _movement->_staticsObj1; + _movement->getCurrDynamicPhaseXY(point); + _ox -= point.x; + _oy -= point.y; + + _ox -= _movement->_mx; + _oy -= _movement->_my; + + if (_movement->_currMovement) { + _oy += point.y; + _ox -= point.x; + _ox += _statics->getDimensions(&point)->x; + } else { + _statics->getSomeXY(point); + _ox += point.x; + _oy += point.y; + } + } + } + + if (_movement->_currDynamicPhaseIndex || !(_flags & 0x40)) + _statics = _movement->_staticsObj2; + + _statics->getSomeXY(point); + + _statics->_x = _ox - point.x; + _statics->_y = _oy - point.y; + oid = _movement->_id; + _movement = 0; + + ExCommand *ex = new ExCommand(oid, 17, 24, 0, 0, 0, 1, 0, 0, 0); + ex->_keyCode = _okeyCode; + ex->_excFlags = 2; + ex->postMessage(); + } + + int mqid = _messageQueueId; + + if (_animExFlag) { + _messageQueueId = 0; + startAnimEx(oid, mqid, -1, -1); + } else { + if (_messageQueueId == oldmqid) { + _messageQueueId = 0; + if (_field_34 == 1) + updateGlobalMessageQueue(mqid, oldmqid); + } + } } void StaticANIObject::adjustSomeXY() { -- cgit v1.2.3 From 4db508bec199666d5287889ca24656bf0705a4f2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 16 Aug 2013 23:29:14 +0300 Subject: FULLPIPE: Unstubbed Picture::draw() --- engines/fullpipe/gfx.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index e5cbac31ac..9c19762d45 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -436,13 +436,20 @@ void Picture::draw(int x, int y, int style, int angle) { pal = g_fullpipe->_globalPalette; } + Common::Point point; + switch (style) { case 1: //flip - warning("STUB: Picture::draw: style 1"); + getDimensions(&point); + _bitmap->flipVertical()->drawShaded(1, x1, y1 + 30 + point.y, pal); break; case 2: - error("STUB: Picture::draw: style 2"); + //vrtSetFadeRatio(g_vrtDrawHandle, 0.34999999); + //vrtSetFadeTable(g_vrtDrawHandle, &unk_477F88, 1.0, 1000.0, 0, 0); + _bitmap->drawShaded(2, x1, y1, pal); + //vrtSetFadeRatio(g_vrtDrawHandle, 0.0); + //vrtSetFadeTable(g_vrtDrawHandle, &unk_477F90, 1.0, 1000.0, 0, 0); break; default: if (angle) @@ -804,7 +811,7 @@ Bitmap *Bitmap::flipVertical() { return this; } - void Bitmap::drawShaded(int type, int x, int y, byte *palette) { +void Bitmap::drawShaded(int type, int x, int y, byte *palette) { warning("STUB: Bitmap::drawShaded(%d, %d, %d)", type, x, y); putDib(x, y, (int32 *)palette); -- cgit v1.2.3 From 6a172694fb5da9851447eaf30403e63ed032b98b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 17 Aug 2013 20:08:00 +0300 Subject: FULLPIPE: Implement Bitmap::reverseImage() --- engines/fullpipe/gfx.cpp | 91 ++++++++++++++++++++++++++++++++++++++++++++++-- engines/fullpipe/gfx.h | 8 ++++- 2 files changed, 95 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 9c19762d45..9b15d695f0 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -31,6 +31,28 @@ namespace Fullpipe { +Bitmap::Bitmap() { + _x = 0; + _y = 0; + _width = 0; + _height = 0; + _pixels = 0; + _type = 0; + _dataSize = 0; + _flags = 0; +} + +Bitmap::Bitmap(Bitmap *src) { + _x = src->_x; + _y = src->_y; + _flags = src->_flags; + _dataSize = src->_dataSize; + _type = src->_type; + _width = src->_width; + _height = src->_height; + _pixels = src->_pixels; +} + void Bitmap::load(Common::ReadStream *s) { debug(5, "Bitmap::load()"); @@ -40,10 +62,10 @@ void Bitmap::load(Common::ReadStream *s) { _height = s->readUint32LE(); s->readUint32LE(); // pixels _type = s->readUint32LE(); - _field_18 = s->readUint32LE(); + _dataSize = s->readUint32LE(); _flags = s->readUint32LE(); - debug(8, "Bitmap: x: %d y: %d w: %d h: %d field_18: 0x%x", _x, _y, _width, _height, _field_18); + debug(8, "Bitmap: x: %d y: %d w: %d h: %d dataSize: 0x%x", _x, _y, _width, _height, _dataSize); debug(8, "Bitmap: type: %s (0x%04x) flags: 0x%x", Common::tag2string(_type).c_str(), _type, _flags); } @@ -565,6 +587,7 @@ void Bitmap::putDibRB(int32 *palette) { starty = 0; y = endy; + srcPtr = (uint16 *)_pixels; bool breakup = false; @@ -606,6 +629,7 @@ void Bitmap::putDibRB(int32 *palette) { if (x <= 799 + 1 || (fillLen += 799 - x + 1, fillLen > 0)) { if (y <= endy) { curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y); + int bgcolor = palette[(pixel >> 8) & 0xff]; colorFill(curDestPtr, fillLen, bgcolor); } @@ -800,7 +824,68 @@ void Bitmap::copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_ } Bitmap *Bitmap::reverseImage() { - warning("STUB: Bitmap::reverseImage()"); + switch (_type) { + case MKTAG('R', 'B', '\0', '\0'): + return reverseImageRB(); + case MKTAG('C', 'B', '\0', '\0'): + return reverseImageCB(); + case MKTAG('C', 'B', '\05', 'e'): + return reverseImageCB05(); + default: + error("Bitmap::reverseImage: Unknown image type: %x", _type); + } + + return 0; +} + +Bitmap *Bitmap::reverseImageRB() { + uint16 *newpixels = (uint16 *)calloc(((_dataSize + 15) & 0xfffffff0) + sizeof(Bitmap), 1); + uint16 *srcPtr = (uint16 *)_pixels; + + int idx = 0; + while (srcPtr[idx] != 0x100) { + uint16 *srcPtr2 = &srcPtr[idx]; + + int prevIdx = idx; + int i = idx; + + while (*srcPtr2) { + ++srcPtr2; + ++idx; + } + + int idx2 = idx; + + newpixels[idx] = srcPtr[idx]; + + while (i != idx) { + int fillLen = 2 - ((srcPtr[prevIdx] & 0xff) != 0 ? 1 : 0); + idx2 -= fillLen; + memcpy(&newpixels[idx2], &srcPtr[prevIdx], 2 * fillLen); + prevIdx = fillLen + i; + i += fillLen; + } + ++idx; + } + newpixels[idx] = 256; + + int oldBmp = ((_dataSize + 15) >> 1) & 0x7FFFFFF8; + memcpy(&newpixels[oldBmp], &srcPtr[oldBmp], sizeof(Bitmap)); + + Bitmap *res = new Bitmap(this); + res->_pixels = (byte *)newpixels; + + return res; +} + +Bitmap *Bitmap::reverseImageCB() { + warning("STUB: Bitmap::reverseImageCB()"); + + return this; +} + +Bitmap *Bitmap::reverseImageCB05() { + warning("STUB: Bitmap::reverseImageCB05()"); return this; } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 7cc18adc7a..eeff02646e 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -38,9 +38,12 @@ struct Bitmap { int _height; byte *_pixels; int _type; - int _field_18; + int _dataSize; int _flags; + Bitmap(); + Bitmap(Bitmap *src); + void load(Common::ReadStream *s); void putDib(int x, int y, int32 *palette); void putDibRB(int32 *palette); @@ -52,6 +55,9 @@ struct Bitmap { void copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format); Bitmap *reverseImage(); + Bitmap *reverseImageRB(); + Bitmap *reverseImageCB(); + Bitmap *reverseImageCB05(); Bitmap *flipVertical(); void drawShaded(int type, int x, int y, byte *palette); -- cgit v1.2.3 From f9cefd02dfa3a8dd665e23d002aea870a3269e03 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 18 Aug 2013 23:20:21 +0300 Subject: FULLPIPE: Implement Picture::isPointInside() --- engines/fullpipe/gfx.cpp | 10 +++++++++- engines/fullpipe/gfx.h | 1 + engines/fullpipe/statics.cpp | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 9b15d695f0..de2b81d76c 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -454,7 +454,7 @@ void Picture::draw(int x, int y, int style, int angle) { byte *pal = _paletteData; if (!pal) { - warning("Picture:draw: using global palette"); + //warning("Picture:draw: using global palette"); pal = g_fullpipe->_globalPalette; } @@ -537,6 +537,14 @@ void Picture::copyMemoryObject2(Picture *src) { } } +bool Picture::isPointInside(int x, int y) { + if (x >= _x) { + if (y >= _y && x < _x + _width && y < _y + _height) + return true; + } + return false; +} + void Bitmap::putDib(int x, int y, int32 *palette) { debug(0, "Bitmap::putDib(%d, %d)", x, y); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index eeff02646e..4c4ed3034d 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -104,6 +104,7 @@ class Picture : public MemoryObject { void setAlpha(byte alpha) { _alpha = alpha; } Common::Point *getDimensions(Common::Point *p); + bool isPointInside(int x, int y); byte *getPaletteData() { return _paletteData; } void setPaletteData(byte *pal); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 6de3b6981a..a6e9d3ab0a 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -312,7 +312,7 @@ Movement *StaticANIObject::getMovementByName(char *name) { } void Movement::draw(bool flipFlag, int angle) { - warning("STUB: Movement::draw(%d, %d)", flipFlag, angle); + debug(3, "Movement::draw(%d, %d)", flipFlag, angle); Common::Point point; -- cgit v1.2.3 From 5e21cefa72c25fa8695b3be323367411e1e7bd28 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 19 Aug 2013 09:24:36 +0300 Subject: FULLPIPE: Implement PictureObject::isPointInside() --- engines/fullpipe/gfx.cpp | 16 ++++++++++++++++ engines/fullpipe/gfx.h | 1 + 2 files changed, 17 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index de2b81d76c..63245a19e0 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -213,6 +213,22 @@ bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) { return false; } +bool PictureObject::isPointInside(int x, int y) { + bool res; + int oldx = _picture->_x; + int oldy = _picture->_y; + + _picture->_x = _ox; + _picture->_y = _oy; + + res = _picture->isPointInside(x, y); + + _picture->_x = oldx; + _picture->_y = oldy; + + return res; +} + GameObject::GameObject() { _okeyCode = 0; _flags = 0; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 4c4ed3034d..45414eb331 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -159,6 +159,7 @@ class PictureObject : public GameObject { void draw(); bool setPicAniInfo(PicAniInfo *picAniInfo); + bool isPointInside(int x, int y); }; class Background : public CObject { -- cgit v1.2.3 From f0795656929e09e74f85c427cbf506e35eefc44f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 19 Aug 2013 23:19:00 +0300 Subject: FULLPIPE: Implement global_messageHandler2() --- engines/fullpipe/scenes.cpp | 71 ++++++++++++++++++++++++++++++++++++++++++-- engines/fullpipe/sound.cpp | 4 +++ engines/fullpipe/sound.h | 2 ++ engines/fullpipe/statics.cpp | 15 ++++++++-- engines/fullpipe/statics.h | 8 ++--- 5 files changed, 91 insertions(+), 9 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 843b098aab..09fc158fa8 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -822,10 +822,77 @@ int global_messageHandler1(ExCommand *cmd) { return 0; } +void staticANIObjectCallback(int *arg) { + *arg--; +} + int global_messageHandler2(ExCommand *cmd) { - warning("STUB: global_messageHandler2()"); + debug(0, "global_messageHandler2()"); - return 0; + if (cmd->_messageKind != 17) + return 0; + + int res = 0; + StaticANIObject *ani; + + switch (cmd->_messageNum) { + case 0x44c8: + // Unk3_sub_4477A0(&unk3, _parentId, _field_14 != 0); + break; + + case 28: + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (ani) + ani->_priority = cmd->_field_14; + break; + + case 25: + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (ani) { + if (cmd->_field_14) { + ani->setFlags40(true); + ani->_callback2 = staticANIObjectCallback; + } else { + ani->setFlags40(false); + ani->_callback2 = 0; + } + } + break; + + case 26: + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (ani) { + Movement *mov = ani->_movement; + if (mov) + mov->_currDynamicPhase->_field_68 = 0; + } + break; + + default: +#if 0 + // We never put anything into _defMsgArray + while (::iterator it = g_fullpipe->_defMsgArray.begin(); it != g_fullpipe->_defMsgArray.end(); ++it) + if (((ExCommand *)*it)->_field_24 == _messageNum) { + ((ExCommand *)*it)->firef34(v13); + res = 1; + } +#endif + + //debug_msg(_messageNum); + + if (!g_fullpipe->_soundEnabled || cmd->_messageNum != 33 || g_fullpipe->_currSoundListCount <= 0) + return res; + + for (int snd = 0; snd < g_fullpipe->_currSoundListCount; snd++) { + SoundList *s = g_fullpipe->_currSoundList1[snd]; + int ms = s->getCount(); + for (int i = 0; i < ms; i++) { + s->getSoundByIndex(i)->setPanAndVolumeByStaticAni(); + } + } + } + + return res; } int global_messageHandler3(ExCommand *cmd) { diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 7a6696edd6..516e4ab4f0 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -107,6 +107,10 @@ void Sound::updateVolume() { warning("STUB Sound::updateVolume()"); } +void Sound::setPanAndVolumeByStaticAni() { + warning("STUB Sound::setPanAndVolumeByStaticAni()"); +} + void FullpipeEngine::setSceneMusicParameters(CGameVar *var) { warning("STUB: FullpipeEngine::setSceneMusicParameters()"); } diff --git a/engines/fullpipe/sound.h b/engines/fullpipe/sound.h index 93e994a720..4014cdd94e 100644 --- a/engines/fullpipe/sound.h +++ b/engines/fullpipe/sound.h @@ -38,6 +38,8 @@ class Sound : public MemoryObject { Sound(); bool load(MfcArchive &file, NGIArchive *archive); void updateVolume(); + + void setPanAndVolumeByStaticAni(); }; class SoundList : public CObject { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index a6e9d3ab0a..ce782d1d48 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -201,6 +201,15 @@ void StaticANIObject::clearFlags() { _stepArray.clear(); } +void StaticANIObject::setFlags40(bool state) { + if (state) { + _flags |= 0x40; + } else { + if (_flags & 0x40) + _flags ^= 0x40; + } +} + void StaticANIObject::deleteFromGlobalMessageQueue() { while (_messageQueueId) { if (g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId)) { @@ -1216,8 +1225,8 @@ void Movement::removeFirstPhase() { _updateFlag1 = 0; } -bool Movement::gotoNextFrame(int callback1, int callback2) { - debug(8, "Movement::gotoNextFrame(%d, %d)", callback1, callback2); +bool Movement::gotoNextFrame(int callback1, void (*callback2)(int *)) { + debug(8, "Movement::gotoNextFrame()"); if (!callback2) { if (_currMovement) { @@ -1250,7 +1259,7 @@ bool Movement::gotoNextFrame(int callback1, int callback2) { int oldDynIndex = _currDynamicPhaseIndex; if (callback2) - ; //callback2(&_currDynamicPhaseIndex); + callback2(&_currDynamicPhaseIndex); else _currDynamicPhaseIndex++; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 40fc91dc06..95030180c3 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -101,8 +101,7 @@ class Statics : public DynamicPhase { class StaticANIObject; class Movement : public GameObject { - friend class StaticANIObject; - + public: int _field_24; int _field_28; int _lastFrameSpecialFlag; @@ -145,7 +144,7 @@ class Movement : public GameObject { void setDynamicPhaseIndex(int index); void removeFirstPhase(); - bool gotoNextFrame(int callback1, int callback2); + bool gotoNextFrame(int callback1, void (*callback2)(int *)); bool gotoPrevFrame(); void gotoFirstFrame(); void gotoLastFrame(); @@ -165,7 +164,7 @@ class StaticANIObject : public GameObject { int _field_34; int _initialCounter; int _callback1; - int _callback2; + void (*_callback2)(int *); CPtrList _movements; CPtrList _staticsList; CStepArray _stepArray; @@ -194,6 +193,7 @@ class StaticANIObject : public GameObject { Common::Point *getCurrDimensions(Common::Point &p); void clearFlags(); + void setFlags40(bool state); bool isIdle(); void deleteFromGlobalMessageQueue(); -- cgit v1.2.3 From 6ba453fa2a967f6081712efc5cb32c969b54472e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 20 Aug 2013 00:34:15 +0300 Subject: FULLPIPE: Fix number of bugs found by Coverity --- engines/fullpipe/behavior.cpp | 7 ++++--- engines/fullpipe/fullpipe.cpp | 27 +++++++++++++++++++++++++-- engines/fullpipe/fullpipe.h | 4 ---- engines/fullpipe/gfx.cpp | 11 ++++++++++- engines/fullpipe/gfx.h | 4 +--- engines/fullpipe/init.cpp | 12 ------------ engines/fullpipe/interaction.h | 1 - engines/fullpipe/inventory.cpp | 8 ++++---- engines/fullpipe/inventory.h | 5 ++--- engines/fullpipe/scene.cpp | 2 +- engines/fullpipe/scenes.cpp | 21 +++++++++++++++++++-- engines/fullpipe/scenes.h | 5 ++++- engines/fullpipe/stateloader.cpp | 2 +- engines/fullpipe/statics.cpp | 2 +- 14 files changed, 72 insertions(+), 39 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index 2551133675..79ef86e8c5 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -300,11 +300,12 @@ BehaviorEntryInfo::BehaviorEntryInfo(CGameVar *subvar, Scene *sc, int *delay) { if (vart) _delay = vart->_value.intValue; + *delay = 0; vart = subvar->getSubVarByName("dwPercent"); - if (vart) + if (vart) { _percent = 0x7FFF * vart->_value.intValue / 1000; - - *delay = vart->_value.intValue; + *delay = vart->_value.intValue; + } vart = subvar->getSubVarByName("dwFlags"); if (vart && vart->_varType == 2 && strstr(vart->_value.stringValue, "QDESC_AUTOSTART")) diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 740c2c2788..569958cf31 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -111,6 +111,29 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _cursorId = 0; + _keyState = Common::KEYCODE_INVALID; + _buttonState = 0; + + _gameLoader = 0; + _gameProject = 0; + + _updateFlag = true; + _flgCanOpenMap = true; + + _sceneWidth = 1; + _sceneHeight = 1; + + for (int i = 0; i < 11; i++) + _currSoundList1[i] = 0; + + for (int i = 0; i < 200; i++) + _mapTable[i] = 0; + + _inventoryScene = 0; + _inventory = 0; + + _isSaveAllowed = true; + g_fullpipe = this; g_vars = new Vars; } @@ -241,6 +264,7 @@ void FullpipeEngine::updateEvents() { ex->handle(); break; } + break; case Common::EVENT_KEYUP: if (!_inputArFlag) { ex = new ExCommand(0, 17, 37, 0, 0, 0, 1, 0, 0, 0); @@ -326,8 +350,7 @@ void FullpipeEngine::updateScreen() { _modalObject->saveload(); CBaseModalObject *tmp = _modalObject->_parentObj; - if (_modalObject) - delete _modalObject; + delete _modalObject; _modalObject = tmp; } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 404a70a7e1..69a1acc700 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -182,10 +182,6 @@ public: void initCursors(); void addCursor(CursorInfo *cursorInfo, Scene *inv, int pictureId, int hotspotX, int hotspotY, int itemPictureOffsX, int itemPictureOffsY); - CGameVar *_swallowedEgg1; - CGameVar *_swallowedEgg2; - CGameVar *_swallowedEgg3; - int32 _mapTable[200]; Scene *_inventoryScene; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 63245a19e0..82014426c2 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -139,6 +139,9 @@ PictureObject::PictureObject() { _ox = 0; _oy = 0; _picture = 0; + _ox2 = 0; + _oy2 = 0; + _pictureObject2List = 0; } PictureObject::PictureObject(PictureObject *src) : GameObject(src) { @@ -237,7 +240,6 @@ GameObject::GameObject() { _oy = 0; _priority = 0; _field_20 = 0; - _field_6 = 0; _field_8 = 0; _objectName = 0; } @@ -257,6 +259,10 @@ GameObject::GameObject(GameObject *src) { _field_8 = src->_field_8; } +GameObject::~GameObject() { + free(_objectName); +} + bool GameObject::load(MfcArchive &file) { debug(5, "GameObject::load()"); _okeyCode = 0; @@ -309,6 +315,9 @@ Picture::Picture() { _alpha = -1; _paletteData = 0; _convertedBitmap = 0; + _memoryObject2 = 0; + _width = 0; + _height = 0; } Picture::~Picture() { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 45414eb331..18a48228e5 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -23,8 +23,6 @@ #ifndef FULLPIPE_GFX_H #define FULLPIPE_GFX_H -class Common::ReadStream; - namespace Fullpipe { class DynamicPhase; @@ -121,7 +119,6 @@ class BigPicture : public Picture { class GameObject : public CObject { public: int16 _okeyCode; - int16 _field_6; int _field_8; int16 _flags; int16 _id; @@ -134,6 +131,7 @@ class GameObject : public CObject { public: GameObject(); GameObject(GameObject *src); + ~GameObject(); virtual bool load(MfcArchive &file); void setOXY(int x, int y); diff --git a/engines/fullpipe/init.cpp b/engines/fullpipe/init.cpp index f4a62aabb3..c334542247 100644 --- a/engines/fullpipe/init.cpp +++ b/engines/fullpipe/init.cpp @@ -139,18 +139,6 @@ void FullpipeEngine::setLevelStates() { } } -void FullpipeEngine::setSwallowedEggsState() { - CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs); - - _swallowedEgg1 = v->getSubVarByName(sO_Egg1); - _swallowedEgg2 = v->getSubVarByName(sO_Egg2); - _swallowedEgg3 = v->getSubVarByName(sO_Egg3); - - _swallowedEgg1->_value.intValue = 0; - _swallowedEgg2->_value.intValue = 0; - _swallowedEgg3->_value.intValue = 0; -} - void FullpipeEngine::addCursor(CursorInfo *cursorInfo, Scene *inv, int pictureId, int hotspotX, int hotspotY, int itemPictureOffsX, int itemPictureOffsY) { cursorInfo->pictureId = pictureId; cursorInfo->picture = inv->getPictureObjectById(pictureId, 0)->_picture; diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h index 5931f1a388..f86e8e9405 100644 --- a/engines/fullpipe/interaction.h +++ b/engines/fullpipe/interaction.h @@ -39,7 +39,6 @@ class CInteraction : public CObject { int16 _objectId3; int16 _staticsId1; int16 _staticsId2; - int16 _field_E; int _objectState1; int _objectState2; int _xOffs; diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index c45c66dc7e..8dc856e9c5 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -44,7 +44,7 @@ bool CInventory::load(MfcArchive &file) { t->flags = file.readUint32LE(); t->field_C = 0; t->field_A = -536; - _itemsPool.push_back(*t); + _itemsPool.push_back(t); } return true; @@ -55,7 +55,7 @@ int CInventory::getInventoryPoolItemIndexById(int itemId) { return -1; for (uint i = 0; i < _itemsPool.size(); i++) { - if (_itemsPool[i].id == itemId) + if (_itemsPool[i]->id == itemId) return i; } @@ -68,7 +68,7 @@ bool CInventory::setItemFlags(int itemId, int flags) { if (idx < 0) return false; else - _itemsPool[idx].flags = flags; + _itemsPool[idx]->flags = flags; return true; } @@ -90,7 +90,7 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia InventoryItem *t = new InventoryItem(); t->itemId = file.readUint16LE(); t->count = file.readUint16LE(); - _inventoryItems.push_back(*t); + _inventoryItems.push_back(t); } return true; diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index accfb08afa..8b7c854e9a 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -41,12 +41,11 @@ struct InventoryPoolItem { int flags; }; -typedef Common::Array InventoryPoolItems; +typedef Common::Array InventoryPoolItems; class CInventory : public CObject { protected: int16 _sceneId; - int16 _field_6; InventoryPoolItems _itemsPool; public: @@ -62,7 +61,7 @@ struct InventoryItem { int16 count; }; -typedef Common::Array InventoryItems; +typedef Common::Array InventoryItems; class PictureObject; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index da89611c9b..8c53444b81 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -507,7 +507,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { bgNumX++; if (bgNumX >= _bigPictureArray1Count) { - if (!((PictureObject *)_picObjList[0])->_flags & 0x2) + if (!(((PictureObject *)_picObjList[0])->_flags & 0x2)) break; bgNumX = 0; } diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 09fc158fa8..70b3dff51b 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -60,6 +60,13 @@ Vars::Vars() { sceneIntro_skipIntro = true; sceneIntro_playing = false; sceneIntro_needBlackout = false; + + swallowedEgg1 = 0; + swallowedEgg2 = 0; + swallowedEgg3 = 0; + + scene01_picSc01Osk = 0; + scene01_picSc01Osk2 = 0; } bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { @@ -1141,6 +1148,18 @@ int sceneIntro_updateCursor() { return 0; } +void FullpipeEngine::setSwallowedEggsState() { + CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs); + + g_vars->swallowedEgg1 = v->getSubVarByName(sO_Egg1); + g_vars->swallowedEgg2 = v->getSubVarByName(sO_Egg2); + g_vars->swallowedEgg3 = v->getSubVarByName(sO_Egg3); + + g_vars->swallowedEgg1->_value.intValue = 0; + g_vars->swallowedEgg2->_value.intValue = 0; + g_vars->swallowedEgg3->_value.intValue = 0; +} + void sceneIntro_initScene(Scene *sc) { g_fullpipe->_gameLoader->loadScene(SC_INTRO2); @@ -1169,8 +1188,6 @@ void scene01_fixEntrance() { } void scene01_initScene(Scene *sc, int entrance) { - g_vars->scene01_unused = 0; - g_vars->scene01_picSc01Osk = sc->getPictureObjectById(PIC_SC1_OSK, 0); g_vars->scene01_picSc01Osk->_flags &= 0xFFFB; diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index da3ac5162c..ae5f2dafb1 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -31,6 +31,10 @@ class Vars { public: Vars(); + CGameVar *swallowedEgg1; + CGameVar *swallowedEgg2; + CGameVar *swallowedEgg3; + StaticANIObject *sceneIntro_aniin1man; bool sceneIntro_needSleep; bool sceneIntro_needGetup; @@ -38,7 +42,6 @@ class Vars { bool sceneIntro_playing; bool sceneIntro_needBlackout; - int scene01_unused; PictureObject *scene01_picSc01Osk; PictureObject *scene01_picSc01Osk2; }; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 97306c1815..40169ddf9f 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -370,7 +370,7 @@ bool Sc2::load(MfcArchive &file) { debug(4, "_entranceData: %d", _entranceDataCount); if (_entranceDataCount > 0) { - _entranceData = (EntranceInfo **)malloc(_defPicAniInfosCount * sizeof(EntranceInfo *)); + _entranceData = (EntranceInfo **)malloc(_entranceDataCount * sizeof(EntranceInfo *)); for (int i = 0; i < _entranceDataCount; i++) { _entranceData[i] = new EntranceInfo(); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index ce782d1d48..3308b05e49 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -393,7 +393,7 @@ Statics *StaticANIObject::addReverseStatics(Statics *st) { } void StaticANIObject::draw() { - if (_flags & 4 == 0) + if ((_flags & 4) == 0) return; Common::Point point; -- cgit v1.2.3 From 14ca32ee97c46a155dda057c6c9d3a50528b68f3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 21 Aug 2013 01:00:40 +0300 Subject: FULLPIPE: Fix mistype --- engines/fullpipe/scenes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 70b3dff51b..30cb3a8e36 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -830,7 +830,7 @@ int global_messageHandler1(ExCommand *cmd) { } void staticANIObjectCallback(int *arg) { - *arg--; + (*arg)--; } int global_messageHandler2(ExCommand *cmd) { -- cgit v1.2.3 From 625de9c9a38026a298177c129751fbd48c274b0a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 21 Aug 2013 01:01:20 +0300 Subject: FULLPIPE: Implement CInventory2::slideIn() --- engines/fullpipe/inventory.cpp | 12 ++++++++++++ engines/fullpipe/inventory.h | 1 + 2 files changed, 13 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 8dc856e9c5..c7e1fbcf70 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -110,6 +110,18 @@ void CInventory2::draw() { warning("STUB: CInventory2::draw()"); } +void CInventory2::slideIn() { + _isInventoryOut = false; + + ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0); + + ex->_field_2C = 10; + ex->_field_14 = _isInventoryOut; + ex->_field_20 = !_isInventoryOut; + ex->_excFlags |= 3; + ex->postMessage(); +} + void CInventory2::slideOut() { _isInventoryOut = true; diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 8b7c854e9a..f451b6a5da 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -105,6 +105,7 @@ class CInventory2 : public CInventory { int getSelectedItemId() { return _selectedId < 0 ? 0 : _selectedId; } int getHoveredItem(Common::Point *point); + void slideIn(); void slideOut(); int handleLeftClick(ExCommand *cmd); -- cgit v1.2.3 From e08340e64dfde2bd8abcab2281e80d67dc45128d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 21 Aug 2013 01:06:24 +0300 Subject: FULLPIPE: Turn noisy stub warnings into debug messages. --- engines/fullpipe/sound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 516e4ab4f0..d0ff8dd8eb 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -104,11 +104,11 @@ bool Sound::load(MfcArchive &file, NGIArchive *archive) { } void Sound::updateVolume() { - warning("STUB Sound::updateVolume()"); + debug(3, "STUB Sound::updateVolume()"); } void Sound::setPanAndVolumeByStaticAni() { - warning("STUB Sound::setPanAndVolumeByStaticAni()"); + debug(3, "STUB Sound::setPanAndVolumeByStaticAni()"); } void FullpipeEngine::setSceneMusicParameters(CGameVar *var) { -- cgit v1.2.3 From e826d359c9c452664a242cda71939dc9a1640488 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 21 Aug 2013 01:31:46 +0300 Subject: FULLPIPE: Implement StaticANIObject::show1() --- engines/fullpipe/messages.cpp | 3 ++- engines/fullpipe/statics.cpp | 47 +++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 22343af8f8..dcb47faaf7 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -302,7 +302,8 @@ void MessageQueue::update() { } void MessageQueue::messageQueueCallback1(int par) { - warning("STUB: MessageQueue::messageQueueCallback1()"); + // Autosave + debug(3, "STUB: MessageQueue::messageQueueCallback1()"); } ExCommand *MessageQueue::getExCommandByIndex(uint idx) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 3308b05e49..897db56f89 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -774,8 +774,51 @@ void StaticANIObject::hide() { } } -void StaticANIObject::show1(int x, int y, int movementId, int mqId) { - warning("STUB: StaticANIObject::show1(%d, %d, %d, %d)", x, y, movementId, mqId); +void StaticANIObject::show1(int x, int y, int movId, int mqId) { + debug(0, "StaticANIObject::show1(%d, %d, %d, %d)", x, y, movId, mqId); + + if (_messageQueueId) + return; + + if (movId == -1) { + _flags |= 4u; + if (x != -1 && y != -1) + setOXY(x, y); + + return; + } + + Movement *mov = getMovementById(movId); + if (!mov) + return; + + if (x != -1 && y != -1) + setOXY(x, y); + + _statics = mov->_staticsObj1; + + Common::Point point; + + mov->_staticsObj1->getSomeXY(point); + _statics->_x = x - point.x; + _statics->_y = y - point.y; + + _statics->_countdown = _statics->_initialCountdown; + + _flags |= 4; + _ox = x; + _oy = y; + _movement = 0; + + if (mov->_currMovement) + _flags |= 8; + else if (_flags & 8) + _flags ^= 8; + + if (_flags & 1) + _flags ^= 1; + + _messageQueueId = mqId; } void StaticANIObject::show2(int x, int y, int movementId, int mqId) { -- cgit v1.2.3 From ebaf5f6b4d36e9009014ffdd9286b153f611def1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 21 Aug 2013 23:17:09 +0300 Subject: FULLPIPE: Bugfix StaticANIObject::stopAnim_maybe() --- engines/fullpipe/statics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 897db56f89..c4097386f9 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -671,12 +671,12 @@ void StaticANIObject::stopAnim_maybe() { _ox -= _movement->_mx; _oy -= _movement->_my; + _statics->getSomeXY(point); if (_movement->_currMovement) { _oy += point.y; _ox -= point.x; _ox += _statics->getDimensions(&point)->x; } else { - _statics->getSomeXY(point); _ox += point.x; _oy += point.y; } @@ -693,7 +693,7 @@ void StaticANIObject::stopAnim_maybe() { oid = _movement->_id; _movement = 0; - ExCommand *ex = new ExCommand(oid, 17, 24, 0, 0, 0, 1, 0, 0, 0); + ExCommand *ex = new ExCommand(_id, 17, 24, 0, 0, 0, 1, 0, 0, 0); ex->_keyCode = _okeyCode; ex->_excFlags = 2; ex->postMessage(); @@ -708,7 +708,7 @@ void StaticANIObject::stopAnim_maybe() { if (_messageQueueId == oldmqid) { _messageQueueId = 0; if (_field_34 == 1) - updateGlobalMessageQueue(mqid, oldmqid); + updateGlobalMessageQueue(mqid, _id); } } } -- cgit v1.2.3 From 739c24cdd10a329a729a185ca25bed6acc05dfef Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 23 Aug 2013 00:01:58 +0300 Subject: FULLPIPE: Implement CInventory2::addItem() --- engines/fullpipe/inventory.cpp | 5 +++-- engines/fullpipe/inventory.h | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index c7e1fbcf70..36ee7129ab 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -96,8 +96,9 @@ bool CInventory2::loadPartial(MfcArchive &file) { // CInventory2_SerializePartia return true; } -void CInventory2::addItem(int itemId, int value) { - warning("STUB: CInventory2::addItem(%d, %d)", itemId, value); +void CInventory2::addItem(int itemId, int count) { + if (getInventoryPoolItemIndexById(itemId) >= 0) + _inventoryItems.push_back(new InventoryItem(itemId, count)); } void CInventory2::rebuildItemRects() { diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index f451b6a5da..0d16909f6a 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -59,6 +59,9 @@ class CInventory : public CObject { struct InventoryItem { int16 itemId; int16 count; + + InventoryItem() { itemId = count = 0; } + InventoryItem(int id, int cnt) : itemId(id), count(cnt) {} }; typedef Common::Array InventoryItems; @@ -95,7 +98,7 @@ class CInventory2 : public CInventory { public: CInventory2(); bool loadPartial(MfcArchive &file); - void addItem(int itemId, int value); + void addItem(int itemId, int count); void rebuildItemRects(); Scene *getScene() { return _scene; } -- cgit v1.2.3 From 54f4a8146128109edfaaacdbabbb4d945b4a9f62 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 23 Aug 2013 00:02:20 +0300 Subject: FULLPIPE: Fix formatting --- engines/fullpipe/messages.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index dcb47faaf7..c107933008 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -295,7 +295,7 @@ void MessageQueue::update() { if (_exCommands.size()) { sendNextCommand(); - } else if (_counter == 0 ) { + } else if (_counter == 0) { _isFinished = 1; finish(); } -- cgit v1.2.3 From cba0fb54f19fabbd71d4d20034dde2660fc3b673 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 23 Aug 2013 09:17:08 +0300 Subject: FULLPIPE: Started CInventory2::rebuildItemRects() implementation --- engines/fullpipe/inventory.cpp | 115 ++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/inventory.h | 27 +++++----- 2 files changed, 127 insertions(+), 15 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 36ee7129ab..35b516b587 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -104,7 +104,120 @@ void CInventory2::addItem(int itemId, int count) { void CInventory2::rebuildItemRects() { _scene = g_fullpipe->accessScene(_sceneId); - warning("STUB: CInventory2::rebuildItemRects()"); + if (!_scene) + return; + + _picture = _scene->getBigPicture(0, 0); + _picture->setAlpha(50); + + int itemX = 9; + int itemY = 0; + + for (uint i = 0; i < _scene->_picObjList.size(); i++) { + PictureObject *pic = (PictureObject *)_scene->_picObjList[i]; + + for (uint j = 0; j < _itemsPool.size(); j++) { + if (_itemsPool[j]->pictureObjectNormalId == pic->_id) { + if (pic->okeyCode) + _scene->deletePictureObject(pic); + else + pic->_flags &= 0xFFFB; + } + } + } + + for (uint i = 0; i < _inventoryItems.size(); i++) { + Common::Point point; + + idx = getInventoryPoolItemIndexById(_inventoryItems[i]->itemId); + + InventoryIcon *icn = new InventoryIcon(); + + icn->inventoryItemId = _itemsPool[idx]->id; + + PictureObject *pic = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectNormalId, 0); + + icn->pictureObjectNormal = pic; + + icn->icons = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectMouseInsideId, 0); + + icn->numIcons = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectId3, 0); // Weird + + pic->getDimensions(point); + + if (_itemsPool[idx]->flags & 0x10000) { + icn->x1 = 730; + icn->y1 = itemY; + icn->x2 = point.x + 730; + icn->y2 = point.y + itemY + 10; + } else { + icn->x1 = itemX; + icn->y1 = itemY; + icn->x2 = itemX + point.x; + itemX = icn->x2 + 1; + icn->y2 = point.y + itemY + 10; + } + v22 = _inventoryIcons->numIcons; + _inventoryIcons->numIcons++; + v38 = v23; + v24 = v23 + 1; + if (v24) { + v25 = _inventoryIcons->icons; + if (v25) { + v27 = _inventoryIcons->x1; + if (v24 > v27) { + v28 = _inventoryIcons->y1; + if (!v28) { + v28 = v22 / 8; + if (v22 / 8 >= 4) { + if (v28 > 1024) + v28 = 1024; + } else { + v28 = 4; + } + } + v29 = v27 + v28; + if (v24 >= v29) { + v34 = v24; + v29 = v24; + } else { + v34 = v29; + } + v30 = operator new(40 * v29); + memcpy(v30, _inventoryIcons->icons, 40 * _inventoryIcons->numIcons); + memset((char *)v30 + 40 * _inventoryIcons->numIcons, 0, 4 * ((unsigned int)(40 * (v24 - _inventoryIcons->numIcons)) >> 2)); + CObjectFree(_inventoryIcons->icons); + _inventoryIcons->icons = (InventoryIcon **)v30; + _inventoryIcons->numIcons = v24; + _inventoryIcons->x1 = v34; + } else if (v22 >= v24) { + _inventoryIcons->numIcons = v24; + } else { + memset(&v25[10 * v22], 0, 40 * (v24 - v22)); + _inventoryIcons->numIcons = v24; + } + } else { + v26 = (InventoryIcon **)operator new(40 * v24); + _inventoryIcons->icons = v26; + memset(v26, 0, 4 * ((unsigned int)(40 * v24) >> 2)); + _inventoryIcons->x1 = v24; + _inventoryIcons->numIcons = v24; + } + } else { + if (_inventoryIcons->icons) { + CObjectFree(_inventoryIcons->icons); + _inventoryIcons->icons = 0; + } + _inventoryIcons->x1 = 0; + _inventoryIcons->numIcons = 0; + } + v31 = icn->x1; + memcpy(&_inventoryIcons->icons[10 * v38], &inventoryIcon, 0x28u); + if (itemX >= 2 * (v31 - icn->x2) + 800) { + itemX = 9; + itemY = icn->y2 + 1; + } + } } void CInventory2::draw() { diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 0d16909f6a..6193c4a2bb 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -29,7 +29,6 @@ class Scene; class BigPicture; struct InventoryPoolItem { - public: int16 id; int16 pictureObjectNormalId; int16 pictureObjectId1; @@ -68,21 +67,21 @@ typedef Common::Array InventoryItems; class PictureObject; -class InventoryIcon { - PictureObject *_pictureObjectNormal; - InventoryIcon **_icons; - int _numIcons; - int _x1; - int _y1; - int _x2; - int _y2; - int16 _inventoryItemId; - int16 _field_1E; - int _isSelected; - int _isMouseInside; +struct InventoryIcon { + PictureObject *pictureObjectNormal; + InventoryIcon **icons; + int numIcons; + int x1; + int y1; + int x2; + int y2; + int16 inventoryItemId; + int16 field_1E; + int isSelected; + int isMouseInside; }; -typedef Common::Array InventoryIcons; +typedef Common::Array InventoryIcons; class CInventory2 : public CInventory { InventoryItems _inventoryItems; -- cgit v1.2.3 From 2a59b516890375bf542f049c1dc302dc2c19c260 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 Aug 2013 16:27:09 +0300 Subject: FULLPIPE: Implemented CInventory2::rebuildItemRects() --- engines/fullpipe/gfx.h | 2 ++ engines/fullpipe/inventory.cpp | 79 ++++++------------------------------------ engines/fullpipe/inventory.h | 6 ++-- engines/fullpipe/scene.cpp | 11 ++++++ engines/fullpipe/scene.h | 1 + 5 files changed, 28 insertions(+), 71 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 18a48228e5..f7fd292a22 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -177,6 +177,8 @@ class Background : public CObject { Background(); virtual bool load(MfcArchive &file); void addPictureObject(PictureObject *pct); + + BigPicture *getBigPicture(int x, int y) { return _bigPictureArray[x][y]; } }; struct ShadowsItem { diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 35b516b587..c6eebab183 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -39,7 +39,7 @@ bool CInventory::load(MfcArchive &file) { t->id = file.readUint16LE(); t->pictureObjectNormalId = file.readUint16LE(); t->pictureObjectId1 = file.readUint16LE(); - t->pictureObjectMouseInsideId = file.readUint16LE(); + t->pictureObjectMouseHover = file.readUint16LE(); t->pictureObjectId3 = file.readUint16LE(); t->flags = file.readUint32LE(); t->field_C = 0; @@ -118,7 +118,7 @@ void CInventory2::rebuildItemRects() { for (uint j = 0; j < _itemsPool.size(); j++) { if (_itemsPool[j]->pictureObjectNormalId == pic->_id) { - if (pic->okeyCode) + if (pic->_okeyCode) _scene->deletePictureObject(pic); else pic->_flags &= 0xFFFB; @@ -129,21 +129,17 @@ void CInventory2::rebuildItemRects() { for (uint i = 0; i < _inventoryItems.size(); i++) { Common::Point point; - idx = getInventoryPoolItemIndexById(_inventoryItems[i]->itemId); + int idx = getInventoryPoolItemIndexById(_inventoryItems[i]->itemId); InventoryIcon *icn = new InventoryIcon(); icn->inventoryItemId = _itemsPool[idx]->id; - PictureObject *pic = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectNormalId, 0); + icn->pictureObjectNormal = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectNormalId, 0); + icn->pictureObjectHover = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectMouseHover, 0); + icn->pictureObjectId3 = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectId3, 0); - icn->pictureObjectNormal = pic; - - icn->icons = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectMouseInsideId, 0); - - icn->numIcons = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectId3, 0); // Weird - - pic->getDimensions(point); + icn->pictureObjectNormal->getDimensions(&point); if (_itemsPool[idx]->flags & 0x10000) { icn->x1 = 730; @@ -157,63 +153,10 @@ void CInventory2::rebuildItemRects() { itemX = icn->x2 + 1; icn->y2 = point.y + itemY + 10; } - v22 = _inventoryIcons->numIcons; - _inventoryIcons->numIcons++; - v38 = v23; - v24 = v23 + 1; - if (v24) { - v25 = _inventoryIcons->icons; - if (v25) { - v27 = _inventoryIcons->x1; - if (v24 > v27) { - v28 = _inventoryIcons->y1; - if (!v28) { - v28 = v22 / 8; - if (v22 / 8 >= 4) { - if (v28 > 1024) - v28 = 1024; - } else { - v28 = 4; - } - } - v29 = v27 + v28; - if (v24 >= v29) { - v34 = v24; - v29 = v24; - } else { - v34 = v29; - } - v30 = operator new(40 * v29); - memcpy(v30, _inventoryIcons->icons, 40 * _inventoryIcons->numIcons); - memset((char *)v30 + 40 * _inventoryIcons->numIcons, 0, 4 * ((unsigned int)(40 * (v24 - _inventoryIcons->numIcons)) >> 2)); - CObjectFree(_inventoryIcons->icons); - _inventoryIcons->icons = (InventoryIcon **)v30; - _inventoryIcons->numIcons = v24; - _inventoryIcons->x1 = v34; - } else if (v22 >= v24) { - _inventoryIcons->numIcons = v24; - } else { - memset(&v25[10 * v22], 0, 40 * (v24 - v22)); - _inventoryIcons->numIcons = v24; - } - } else { - v26 = (InventoryIcon **)operator new(40 * v24); - _inventoryIcons->icons = v26; - memset(v26, 0, 4 * ((unsigned int)(40 * v24) >> 2)); - _inventoryIcons->x1 = v24; - _inventoryIcons->numIcons = v24; - } - } else { - if (_inventoryIcons->icons) { - CObjectFree(_inventoryIcons->icons); - _inventoryIcons->icons = 0; - } - _inventoryIcons->x1 = 0; - _inventoryIcons->numIcons = 0; - } - v31 = icn->x1; - memcpy(&_inventoryIcons->icons[10 * v38], &inventoryIcon, 0x28u); - if (itemX >= 2 * (v31 - icn->x2) + 800) { + + _inventoryIcons.push_back(icn); + + if (itemX >= 2 * (icn->x1 - icn->x2) + 800) { itemX = 9; itemY = icn->y2 + 1; } diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 6193c4a2bb..9244f9580a 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -32,7 +32,7 @@ struct InventoryPoolItem { int16 id; int16 pictureObjectNormalId; int16 pictureObjectId1; - int16 pictureObjectMouseInsideId; + int16 pictureObjectMouseHover; int16 pictureObjectId3; int16 field_A; int field_C; @@ -69,8 +69,8 @@ class PictureObject; struct InventoryIcon { PictureObject *pictureObjectNormal; - InventoryIcon **icons; - int numIcons; + PictureObject *pictureObjectHover; + PictureObject *pictureObjectId3; int x1; int y1; int x2; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 8c53444b81..806145504f 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -334,6 +334,17 @@ PictureObject *Scene::getPictureObjectById(int objId, int flags) { return 0; } +void Scene::deletePictureObject(PictureObject *obj) { + for (uint i = 0; i < _picObjList.size(); i++) { + if (((PictureObject *)_picObjList[i]) == obj) { + _picObjList.remove_at(i); + delete obj; + + return; + } + } +} + MessageQueue *Scene::getMessageQueueById(int messageId) { for (uint i = 0; i < _messageQueueList.size(); i++) if (((MessageQueue *)_messageQueueList[i])->_dataId == messageId) diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 1292bedf59..9c57bcbc10 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -67,6 +67,7 @@ class Scene : public Background { void setPictureObjectsFlag4(); PictureObject *getPictureObjectById(int objId, int flags); + void deletePictureObject(PictureObject *obj); void preloadMovements(CGameVar *var); void initObjectCursors(const char *name); -- cgit v1.2.3 From 87488185a82f123387176cb9f72e2c714d088c73 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 Aug 2013 17:57:58 +0300 Subject: FULLPIPE: Implement CInventory2::draw() --- engines/fullpipe/gfx.cpp | 15 ++++++++ engines/fullpipe/gfx.h | 1 + engines/fullpipe/inventory.cpp | 85 ++++++++++++++++++++++++++++++++++++++---- engines/fullpipe/inventory.h | 11 +++--- 4 files changed, 98 insertions(+), 14 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 82014426c2..6c22c2a493 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -196,6 +196,21 @@ void PictureObject::draw() { _picture->draw(_ox, _oy, 0, 0); } +void PictureObject::drawAt(int x, int y) { + if (x == -1) + x = _ox; + if (y == -1) + y = _oy; + + _picture->_x = x; + _picture->_y = y; + + if (_flags & 1) + _picture->draw(x, y, 2, 0); + else + _picture->draw(x, y, 0, 0); +} + bool PictureObject::setPicAniInfo(PicAniInfo *picAniInfo) { if (!(picAniInfo->type & 2) || (picAniInfo->type & 1)) { error("Picture::setPicAniInfo(): Wrong type: %d", picAniInfo->type); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index f7fd292a22..eec32848ec 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -155,6 +155,7 @@ class PictureObject : public GameObject { bool load(MfcArchive &file, bool bigPicture); Common::Point *getDimensions(Common::Point *p); void draw(); + void drawAt(int x, int y); bool setPicAniInfo(PicAniInfo *picAniInfo); bool isPointInside(int x, int y); diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index c6eebab183..002c9b9e6b 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -37,10 +37,10 @@ bool CInventory::load(MfcArchive &file) { for (int i = 0; i < numInvs; i++) { InventoryPoolItem *t = new InventoryPoolItem(); t->id = file.readUint16LE(); - t->pictureObjectNormalId = file.readUint16LE(); + t->pictureObjectNormal = file.readUint16LE(); t->pictureObjectId1 = file.readUint16LE(); - t->pictureObjectMouseHover = file.readUint16LE(); - t->pictureObjectId3 = file.readUint16LE(); + t->pictureObjectHover = file.readUint16LE(); + t->pictureObjectSelected = file.readUint16LE(); t->flags = file.readUint32LE(); t->field_C = 0; t->field_A = -536; @@ -117,7 +117,7 @@ void CInventory2::rebuildItemRects() { PictureObject *pic = (PictureObject *)_scene->_picObjList[i]; for (uint j = 0; j < _itemsPool.size(); j++) { - if (_itemsPool[j]->pictureObjectNormalId == pic->_id) { + if (_itemsPool[j]->pictureObjectNormal == pic->_id) { if (pic->_okeyCode) _scene->deletePictureObject(pic); else @@ -135,9 +135,9 @@ void CInventory2::rebuildItemRects() { icn->inventoryItemId = _itemsPool[idx]->id; - icn->pictureObjectNormal = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectNormalId, 0); - icn->pictureObjectHover = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectMouseHover, 0); - icn->pictureObjectId3 = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectId3, 0); + icn->pictureObjectNormal = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectNormal, 0); + icn->pictureObjectHover = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectHover, 0); + icn->pictureObjectSelected = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectSelected, 0); icn->pictureObjectNormal->getDimensions(&point); @@ -164,7 +164,76 @@ void CInventory2::rebuildItemRects() { } void CInventory2::draw() { - warning("STUB: CInventory2::draw()"); + if (!_scene) + return; + + int oldScLeft = g_fullpipe->_sceneRect.left; + int oldScTop = g_fullpipe->_sceneRect.top; + + g_fullpipe->_sceneRect.top = -_topOffset; + g_fullpipe->_sceneRect.left = 0; + + _picture->draw(-1, -1, 0, 0); + + for (uint i = 0; i < _inventoryIcons.size(); i++) { + InventoryIcon *icn = _inventoryIcons[i]; + + if (icn->isSelected) { + icn->pictureObjectSelected->drawAt(icn->x1, icn->y1 + 10); + } else { + if (icn->isMouseHover) + icn->pictureObjectHover->drawAt(icn->x1, icn->y1 + 10); + else + icn->pictureObjectNormal->drawAt(icn->x1, icn->y1 + 10); + } + } + + if (!_isInventoryOut) + goto LABEL_30; + + int v10, v11, v12; + + if (_topOffset != -10) { + if (_topOffset < -10) { + v10 = -10; + goto LABEL_13; + } + if (_topOffset + 10 >= 20) { + v11 = -20; +cont: + _topOffset += v11; + goto reset; + } + v12 = -10; + goto LABEL_25; + } + if (!_isInventoryOut) { +LABEL_30: + if (_topOffset != -65) { + if (_topOffset < -65) { + v10 = -65; +LABEL_13: + v11 = v10 - _topOffset; + if (v11 >= 20) + v11 = 20; + goto cont; + } + if (_topOffset + 65 >= 20) { + v11 = -20; + goto cont; + } + v12 = -65; +LABEL_25: + v11 = v12 - _topOffset; + goto cont; + } + } + +reset: + + g_fullpipe->_sceneRect.top = oldScTop; + g_fullpipe->_sceneRect.left = oldScLeft; + } void CInventory2::slideIn() { diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 9244f9580a..902ecffeb6 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -30,10 +30,10 @@ class BigPicture; struct InventoryPoolItem { int16 id; - int16 pictureObjectNormalId; + int16 pictureObjectNormal; int16 pictureObjectId1; - int16 pictureObjectMouseHover; - int16 pictureObjectId3; + int16 pictureObjectHover; + int16 pictureObjectSelected; int16 field_A; int field_C; int obj; @@ -70,15 +70,14 @@ class PictureObject; struct InventoryIcon { PictureObject *pictureObjectNormal; PictureObject *pictureObjectHover; - PictureObject *pictureObjectId3; + PictureObject *pictureObjectSelected; int x1; int y1; int x2; int y2; int16 inventoryItemId; - int16 field_1E; int isSelected; - int isMouseInside; + int isMouseHover; }; typedef Common::Array InventoryIcons; -- cgit v1.2.3 From 1261cd421d176d6caa7230c5cf726b08e04ff25f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 Aug 2013 18:29:45 +0300 Subject: FULLPIPE: Implement CInventory2::getHoveredItem() --- engines/fullpipe/inventory.cpp | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 002c9b9e6b..9384cb2463 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -78,7 +78,7 @@ CInventory2::CInventory2() { _field_48 = -1; _scene = 0; _picture = 0; - _isInventoryOut = 0; + _isInventoryOut = false; _isLocked = 0; _topOffset = -65; } @@ -273,7 +273,35 @@ int CInventory2::unselectItem(bool flag) { } int CInventory2::getHoveredItem(Common::Point *point) { - warning("STUB: CInventory2::getHoveredItem()"); + int selId = getSelectedItemId(); + + if (point->y <= 20 && !_isInventoryOut && !_isLocked ) + slideOut(); + + if (!selId && point->y >= 55) { + if (!_isInventoryOut) + return 0; + + if (!_isLocked) + slideIn(); + } + + if (!_isInventoryOut) + return 0; + + for (uint i = 0; i < _inventoryIcons.size(); i++) { + InventoryIcon *icn = _inventoryIcons[i]; + if (selId || + point->x < icn->x1 || + point->x > icn->x2 || + point->y < _topOffset + icn->y1 || + point->y > _topOffset + icn->y2) { + icn->isMouseHover = 0; + } else { + icn->isMouseHover = 1; + return icn->inventoryItemId; + } + } return 0; } -- cgit v1.2.3 From 3e4670e6be0b0ea77044355cb1d2c25704564cd1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 Aug 2013 21:07:16 +0300 Subject: FULLPIPE: Implement Scene::initObjectCursors() --- engines/fullpipe/fullpipe.cpp | 2 ++ engines/fullpipe/fullpipe.h | 5 +++++ engines/fullpipe/input.cpp | 4 ++++ engines/fullpipe/scene.cpp | 49 ++++++++++++++++++++++++++++++++++++++++--- engines/fullpipe/scene.h | 1 + engines/fullpipe/scenes.cpp | 2 +- 6 files changed, 59 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 569958cf31..6f4feee865 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -132,6 +132,8 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _inventoryScene = 0; _inventory = 0; + _minCursorId = 0; + _isSaveAllowed = true; g_fullpipe = this; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 69a1acc700..5d4deedebf 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -53,6 +53,7 @@ struct CursorInfo; class EntranceInfo; class ExCommand; class GameProject; +class GameObject; class GlobalMessageQueueList; class MessageHandler; struct MovTable; @@ -198,7 +199,11 @@ public: int (*_updateCursorCallback)(); int _cursorId; + int _minCursorId; + Common::Array _objectIdCursors; + void setCursor(int id); + void updateCursorsCommon(); int getObjectState(const char *objname); void setObjectState(const char *name, int state); diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index b649c013f8..64fd0d5d15 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -117,4 +117,8 @@ void FullpipeEngine::defHandleKeyDown(int key) { warning("STUB: FullpipeEngine::defHandleKeyDown(%d)", key); } +void FullpipeEngine::updateCursorsCommon() { + +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 806145504f..c413779963 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -26,6 +26,7 @@ #include "fullpipe/ngiarchive.h" #include "fullpipe/statics.h" #include "fullpipe/messages.h" +#include "fullpipe/gameloader.h" #include "fullpipe/constants.h" @@ -326,7 +327,7 @@ void Scene::setPictureObjectsFlag4() { } PictureObject *Scene::getPictureObjectById(int objId, int flags) { - for (uint i = 1; i < _picObjList.size(); i++) { + for (uint i = 0; i < _picObjList.size(); i++) { if (((PictureObject *)_picObjList[i])->_id == objId && ((PictureObject *)_picObjList[i])->_okeyCode == flags) return (PictureObject *)_picObjList[i]; } @@ -334,6 +335,15 @@ PictureObject *Scene::getPictureObjectById(int objId, int flags) { return 0; } +PictureObject *Scene::getPictureObjectByName(const char *objName, int flags) { + for (uint i = 0; i < _picObjList.size(); i++) { + if (!strcmp(((PictureObject *)_picObjList[i])->_objectName, objName) && ((PictureObject *)_picObjList[i])->_okeyCode == flags || flags == -1) + return (PictureObject *)_picObjList[i]; + } + + return 0; +} + void Scene::deletePictureObject(PictureObject *obj) { for (uint i = 0; i < _picObjList.size(); i++) { if (((PictureObject *)_picObjList[i]) == obj) { @@ -386,8 +396,41 @@ void Scene::preloadMovements(CGameVar *var) { } } -void Scene::initObjectCursors(const char *name) { - warning("STUB: Scene::initObjectCursors(%s)", name); +void Scene::initObjectCursors(const char *varname) { + CGameVar *cursorsVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(varname)->getSubVarByName("CURSORS"); + + if (!cursorsVar || !cursorsVar->_subVars) + return; + + int maxId = 0; + int minId = 0xffff; + + for (CGameVar *sub = cursorsVar->_subVars; sub; sub = sub->_nextVarObj) { + GameObject *obj = getPictureObjectByName(sub->_varName, -1); + + if (obj || (obj = getStaticANIObject1ByName(sub->_varName, -1)) != 0) { + if (obj->_id < minId) + minId = obj->_id; + if (obj->_id > maxId) + maxId = obj->_id; + } + } + + g_fullpipe->_minCursorId = minId; + + g_fullpipe->_objectIdCursors.resize(maxId - minId + 1); + + for (CGameVar *sub = cursorsVar->_subVars; sub; sub = sub->_nextVarObj) { + GameObject *obj = getPictureObjectByName(sub->_varName, -1); + + if (!obj) + obj = getStaticANIObject1ByName(sub->_varName, -1); + + PictureObject *pic = getGameLoaderInventory()->getScene()->getPictureObjectByName(sub->_value.stringValue, -1); + + if (obj && pic) + g_fullpipe->_objectIdCursors[obj->_id - minId] = pic->_id; + } } bool Scene::compareObjPriority(const void *p1, const void *p2) { diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 9c57bcbc10..d1a5b39721 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -67,6 +67,7 @@ class Scene : public Background { void setPictureObjectsFlag4(); PictureObject *getPictureObjectById(int objId, int flags); + PictureObject *getPictureObjectByName(const char *name, int keyCode); void deletePictureObject(PictureObject *obj); void preloadMovements(CGameVar *var); diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 30cb3a8e36..2916a4082f 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -1137,7 +1137,7 @@ int global_messageHandler4(ExCommand *cmd) { } int defaultUpdateCursor() { - warning("STUB: defaultUpdateCursor"); + g_fullpipe->updateCursorsCommon(); return g_fullpipe->_cursorId; } -- cgit v1.2.3 From ee18a545549f7ab58d3da2ca67fb6824b498b6d6 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 Aug 2013 22:12:00 +0300 Subject: FULLPIPE: Implemented FullpipeEngine::updateCursorsCommon() --- engines/fullpipe/constants.h | 26 +++++++++++++++++ engines/fullpipe/fullpipe.cpp | 5 +++- engines/fullpipe/fullpipe.h | 5 ++++ engines/fullpipe/input.cpp | 65 ++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/lift.cpp | 67 +++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/module.mk | 1 + engines/fullpipe/scene.cpp | 13 +++++++++ engines/fullpipe/scene.h | 3 ++ engines/fullpipe/statics.cpp | 6 ++++ engines/fullpipe/statics.h | 2 ++ 10 files changed, 191 insertions(+), 2 deletions(-) create mode 100644 engines/fullpipe/lift.cpp (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 43f90edf3d..5048bf9795 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -28,6 +28,7 @@ namespace Fullpipe { #define ANI_BOOT_1 4231 #define ANI_IN1MAN 5110 #define ANI_INV_MAP 5321 +#define ANI_LIFTBUTTON 2751 #define ANI_MAN 322 #define MSG_DISABLESAVES 5201 #define MSG_ENABLESAVES 5202 @@ -49,6 +50,12 @@ namespace Fullpipe { #define MV_MAN_TOLADDER2 2841 #define MV_MAN_TURN_LU 486 #define PIC_CMN_EVAL 3468 +#define PIC_CSR_DEFAULT 4891 +#define PIC_CSR_DEFAULT_INV 4892 +#define PIC_CSR_ITN 4893 +#define PIC_CSR_ITN_INV 4894 +#define PIC_CSR_GOFAR_L 4895 +#define PIC_CSR_GOFAR_R 4896 #define PIC_CSR_ARCADE1 4901 #define PIC_CSR_ARCADE2 4902 #define PIC_CSR_ARCADE2_D 4903 @@ -137,7 +144,26 @@ namespace Fullpipe { #define SC_TITLES 5166 #define SND_CMN_031 3516 #define SND_CMN_070 5199 +#define ST_LBN_0N 2832 +#define ST_LBN_0P 2833 +#define ST_LBN_1N 2753 +#define ST_LBN_1P 2754 #define ST_LBN_2N 2756 +#define ST_LBN_2P 2757 +#define ST_LBN_3N 2759 +#define ST_LBN_3P 2760 +#define ST_LBN_4N 2762 +#define ST_LBN_4P 2763 +#define ST_LBN_5N 2765 +#define ST_LBN_5P 2766 +#define ST_LBN_6N 2768 +#define ST_LBN_6P 2769 +#define ST_LBN_7N 2771 +#define ST_LBN_7P 2772 +#define ST_LBN_8N 2774 +#define ST_LBN_8P 2775 +#define ST_LBN_9N 2777 +#define ST_LBN_9P 2778 #define ST_MAN_EMPTY 476 #define ST_MAN_RIGHT 325 #define TrubaDown 697 diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 6f4feee865..49abbabd26 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -132,7 +132,10 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _inventoryScene = 0; _inventory = 0; - _minCursorId = 0; + _minCursorId = 0xffff; + _maxCursorId = 0; + _objectAtCursor = 0; + _objectIdAtCursor = 0; _isSaveAllowed = true; diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 5d4deedebf..5b0ea4437c 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -200,7 +200,10 @@ public: int _cursorId; int _minCursorId; + int _maxCursorId; Common::Array _objectIdCursors; + GameObject *_objectAtCursor; + int _objectIdAtCursor; void setCursor(int id); void updateCursorsCommon(); @@ -219,6 +222,8 @@ public: void openHelp(); void openMainMenu(); + int lift_getButtonIdP(int objid); + public: bool _isSaveAllowed; diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 64fd0d5d15..7a210772f2 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -25,6 +25,10 @@ #include "fullpipe/objects.h" #include "fullpipe/input.h" #include "fullpipe/gfx.h" +#include "fullpipe/scene.h" +#include "fullpipe/gameloader.h" +#include "fullpipe/statics.h" +#include "fullpipe/constants.h" namespace Fullpipe { @@ -118,7 +122,66 @@ void FullpipeEngine::defHandleKeyDown(int key) { } void FullpipeEngine::updateCursorsCommon() { - + GameObject *ani = _currentScene->getStaticANIObjectAtPos(_mouseVirtX, _mouseVirtY); + + GameObject *pic = _currentScene->getPictureObjectAtPos(_mouseVirtX, _mouseVirtY); + if (!ani || pic && pic->_priority < ani->_priority ) + ani = pic; + + int selId = getGameLoaderInventory()->getSelectedItemId(); + + _objectAtCursor = ani; + + if (ani) { + _objectIdAtCursor = ani->_id; + + if (!selId && ani->_id >= _minCursorId && ani->_id <= _maxCursorId) { + selId = _objectIdCursors[ani->_id - _minCursorId]; + if (selId) { + _cursorId = selId; + return; + } + } + if (_aniMan->canInteractAny(ani, selId)) { + _cursorId = selId > 0 ? PIC_CSR_ITN_INV : PIC_CSR_ITN; + return; + } + if (selId) { + _cursorId = PIC_CSR_DEFAULT_INV; + return; + } + if (_objectIdAtCursor == ANI_LIFTBUTTON && lift_getButtonIdP(((StaticANIObject *)ani)->_statics->_staticsId)) { + _cursorId = PIC_CSR_LIFT; + return; + } + if (_sceneRect.right - _mouseVirtX < 47 && _sceneRect.right < _sceneWidth - 1) { + _cursorId = PIC_CSR_GOFAR_R; + return; + } + if (_mouseVirtX - _sceneRect.left < 47 && _sceneRect.left > 0) { + _cursorId = PIC_CSR_GOFAR_L; + return; + } + _cursorId = PIC_CSR_DEFAULT; + return; + } else { + _objectIdAtCursor = 0; + + if (selId) { + _cursorId = PIC_CSR_DEFAULT_INV; + return; + } + if (_sceneRect.right - _mouseVirtX < 47 && _sceneRect.right < _sceneWidth - 1) { + _cursorId = PIC_CSR_GOFAR_R; + return; + } + if (_mouseVirtX - _sceneRect.left < 47 && _sceneRect.left > 0 ) { + _cursorId = PIC_CSR_GOFAR_L; + return; + } + } + + _cursorId = PIC_CSR_DEFAULT_INV; } } // End of namespace Fullpipe diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp new file mode 100644 index 0000000000..25dd2613fe --- /dev/null +++ b/engines/fullpipe/lift.cpp @@ -0,0 +1,67 @@ +/* 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. + * + */ + +#include "fullpipe/fullpipe.h" + +#include "fullpipe/constants.h" + +namespace Fullpipe { + +int FullpipeEngine::lift_getButtonIdP(int objid) { + switch (objid) { + case ST_LBN_0N: + return ST_LBN_0P; + break; + case ST_LBN_1N: + return ST_LBN_1P; + break; + case ST_LBN_2N: + return ST_LBN_2P; + break; + case ST_LBN_3N: + return ST_LBN_3P; + break; + case ST_LBN_4N: + return ST_LBN_4P; + break; + case ST_LBN_5N: + return ST_LBN_5P; + break; + case ST_LBN_6N: + return ST_LBN_6P; + break; + case ST_LBN_7N: + return ST_LBN_7P; + break; + case ST_LBN_8N: + return ST_LBN_8P; + break; + case ST_LBN_9N: + return ST_LBN_9P; + break; + default: + return 0; + break; + } +} + +} // End of namespace Fullpipe diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 81cb0f990f..41ed3e31f6 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -10,6 +10,7 @@ MODULE_OBJS = \ input.o \ interaction.o \ inventory.o \ + lift.o \ messages.o \ modal.o \ motion.o \ diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index c413779963..0a7d035339 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -417,6 +417,7 @@ void Scene::initObjectCursors(const char *varname) { } g_fullpipe->_minCursorId = minId; + g_fullpipe->_maxCursorId = maxId; g_fullpipe->_objectIdCursors.resize(maxId - minId + 1); @@ -475,6 +476,18 @@ void Scene::updateScrolling2() { warning("STUB Scene::updateScrolling2()"); } +StaticANIObject *Scene::getStaticANIObjectAtPos(int x, int y) { + warning("STUB: Scene::getStaticANIObjectAtPos(%d, %d)", x, y); + + return 0; +} + +PictureObject *Scene::getPictureObjectAtPos(int x, int y) { + warning("STUB: Scene::getPictureObjectAtPos(%d, %d)", x, y); + + return 0; +} + void Scene::update(int counterdiff) { debug(0, "Scene::update(%d)", counterdiff); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index d1a5b39721..0f0854b059 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -71,6 +71,9 @@ class Scene : public Background { void deletePictureObject(PictureObject *obj); void preloadMovements(CGameVar *var); + StaticANIObject *getStaticANIObjectAtPos(int x, int y); + PictureObject *getPictureObjectAtPos(int x, int y); + void initObjectCursors(const char *name); private: diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index c4097386f9..9706a456ca 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -312,6 +312,12 @@ int StaticANIObject::getMovementIdById(int itemId) { return 0; } +bool StaticANIObject::canInteractAny(GameObject *obj2, int a3) { + warning("STUB: StaticANIObject::canInteractAny()"); + return false; +} + + Movement *StaticANIObject::getMovementByName(char *name) { for (uint i = 0; i < _movements.size(); i++) if (!strcmp(((Movement *)_movements[i])->_objectName, name)) diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 95030180c3..e4e2c1f602 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -230,6 +230,8 @@ class StaticANIObject : public GameObject { MessageQueue *changeStatics1(int msgNum); void changeStatics2(int objId); + + bool canInteractAny(GameObject *obj2, int a3); }; struct MovTable { -- cgit v1.2.3 From 3d3ebc6ae7430ae4147bdc9e07115d134dd9d312 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 Aug 2013 22:23:31 +0300 Subject: FULLPIPE: Implement CInputController::setCursor() --- engines/fullpipe/input.cpp | 13 +++++++++++-- engines/fullpipe/input.h | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 7a210772f2..efc42b3bc9 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -86,8 +86,17 @@ void CInputController::drawCursor(int x, int y) { warning("STUB: CInputController::drawCursor(%d, %d)", x, y); } -void CInputController::setCursor(int id) { - warning("STUB: CInputController::setCursor(%d)", id); +void CInputController::setCursor(int cursorId) { + if (_cursorIndex == -1 || _cursorsArray[_cursorIndex]->pictureId != cursorId) { + _cursorIndex = -1; + + for (uint i = 0; i < _cursorsArray.size(); i++) { + if (_cursorsArray[i]->pictureId == cursorId) { + _cursorIndex = i; + break; + } + } + } } CursorInfo::CursorInfo() { diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h index e527770dc9..6a7ad11f67 100644 --- a/engines/fullpipe/input.h +++ b/engines/fullpipe/input.h @@ -56,7 +56,7 @@ class CInputController { int _cursorIndex; CursorsArray _cursorsArray; Common::Rect _cursorBounds; - int _cursorItemPicture; + Picture *_cursorItemPicture; public: CInputController(); -- cgit v1.2.3 From 44081e6b1e625f5c52acf26a0336935cf99449d9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 Aug 2013 22:36:40 +0300 Subject: FULLPIPE: Implement InputController::drawCursor() --- engines/fullpipe/input.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index efc42b3bc9..767a0d5c44 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -83,7 +83,18 @@ void CInputController::setCursorMode(bool enabled) { } void CInputController::drawCursor(int x, int y) { - warning("STUB: CInputController::drawCursor(%d, %d)", x, y); + if (_cursorIndex == -1) + return; + + _cursorBounds.left = g_fullpipe->_sceneRect.left + x - _cursorsArray[_cursorIndex]->hotspotX; + _cursorBounds.top = g_fullpipe->_sceneRect.top + y - _cursorsArray[_cursorIndex]->hotspotY; + _cursorBounds.right = _cursorBounds.left + _cursorsArray[_cursorIndex]->width; + _cursorBounds.bottom = _cursorBounds.top + _cursorsArray[_cursorIndex]->height; + + _cursorsArray[_cursorIndex]->picture->draw(_cursorBounds.left, _cursorBounds.top, 0, 0); + + if (_cursorItemPicture) + _cursorItemPicture->draw(_cursorsArray[_cursorIndex]->itemPictureOffsX, _cursorsArray[_cursorIndex]->itemPictureOffsY, 0, 0); } void CInputController::setCursor(int cursorId) { -- cgit v1.2.3 From 86aaaecc97a2bca872b8f4e7719d932419eca952 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 25 Aug 2013 00:18:07 +0300 Subject: FULLPIPE: Unstubbed couple small functions --- engines/fullpipe/input.cpp | 6 ++++++ engines/fullpipe/input.h | 4 ++++ engines/fullpipe/sound.cpp | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 767a0d5c44..03a77efdcf 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -51,6 +51,12 @@ CInputController::CInputController() { _cursorItemPicture = 0; } +CInputController::~CInputController() { + removeMessageHandler(126, -1); + + g_fullpipe->_inputController = 0; +} + void CInputController::setInputDisabled(bool state) { _flag = state; g_fullpipe->_inputDisabled = state; diff --git a/engines/fullpipe/input.h b/engines/fullpipe/input.h index 6a7ad11f67..4b32e510e3 100644 --- a/engines/fullpipe/input.h +++ b/engines/fullpipe/input.h @@ -60,12 +60,16 @@ class CInputController { public: CInputController(); + ~CInputController(); + void setInputDisabled(bool state); void addCursor(CursorInfo *cursor); void setCursorMode(bool mode); void drawCursor(int x, int y); void setCursor(int id); + + void setCursorItemPicture(Picture *pic) { _cursorItemPicture = pic; } }; } // End of namespace Fullpipe diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index d0ff8dd8eb..442db7a642 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -116,7 +116,7 @@ void FullpipeEngine::setSceneMusicParameters(CGameVar *var) { } void FullpipeEngine::startSceneTrack() { - warning("STUB: FullpipeEngine::startSceneTrack()"); + debug(3, "STUB: FullpipeEngine::startSceneTrack()"); } void FullpipeEngine::stopAllSounds() { -- cgit v1.2.3 From 624309b0db913ab15ce58992603ab76c9f53598d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 26 Aug 2013 01:11:07 +0300 Subject: FULLPIPE: Started implementation of global_messageHandler3() --- engines/fullpipe/scenes.cpp | 179 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 177 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 2916a4082f..ecbb8090e6 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -903,9 +903,184 @@ int global_messageHandler2(ExCommand *cmd) { } int global_messageHandler3(ExCommand *cmd) { - warning("STUB: global_messageHandler3()"); + result = 0; - return 0; + if (cmd->_messageKind == 17) { + switch (cmd->_messageNum) { + case 29: + case 30: + case 31: + case 32: + case 36: + if (g_fullpipe->_inputDisabled) + cmd->_messageKind = 0; + break; + default: + break; + } + } + + switch (cmd->_messageKind) { + case 17: + switch (cmd->_messageNum) { + case 61: + return gameLoaderPreloadScene(cmd->_parentId, cmd->_keyCode); + case 62: + return gameLoaderGotoScene(cmd->_parentId, cmd->_keyCode); + case 64: + if (g_fullpipe->_currentScene && g_fullpipe->_msgObjectId2 + && (!(cmd->_keyCode & 4) || g_fullpipe->_msgObjectId2 != cmd->_field_14 || g_fullpipe->_msgId != cmd->_field_20)) { + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_msgObjectId2, g_fullpipe->_msgId); + if (ani) { + ani->_flags &= 0xFF7F; + ani->_flags &= 0xFEFF; + ani->deleteFromGlobalMessageQueue(); + } + } + g_fullpipe->_msgX = 0; + g_fullpipe->_msgY = 0; + g_fullpipe->_msgObjectId2 = 0; + g_fullpipe->_msgId = 0; + if (cmd->_keyCode & 1 || cmd->_keyCode & 2) { + g_fullpipe->_msgX = cmd->_x; + g_fullpipe->_msgY = cmd->_y; + } + if (cmd->_keyCode & 4) { + g_fullpipe->_msgObjectId2 = cmd->_field_14; + g_fullpipe->_msgId = cmd->_field_20; + } + return result; + case 29: + if (g_fullpipe->_gameLoader->interactionController->_flag24 && g_fullpipe->_currentScene) { + ani = g_fullpipe->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); + ani2 = g_fullpipe->_currentScene->getStaticANIObject1ById(getGameLoaderFieldFA(), -1); + if (ani) { + if (g_fullpipe->_msgObjectId2 == ani->_id && g_fullpipe->_msgId == ani->_okeyCode) { + cmd->_messageKind = 0; + return result; + } + if (ani2->canInteractAny(ani, cmd->_keyCode)) { + ani2->handleObjectInteraction(ani, cmd->_keyCode); + return 1; + } + } else { + ani2 = g_fullpipe->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY); + ani = g_fullpipe->_currentScene->getPictureObjectById(ani2, 0); + if (ani) { + if (g_fullpipe->_msgObjectId2 == ani->_id && g_fullpipe->_msgId == ani->_okeyCode) { + cmd->_messageKind = 0; + return result; + } + if (ani2->canInteractAny(ani, cmd->_keyCode)) { + if (!ani2 || ani->isIdle() && !(ani2->_flags & 0x80) && !(ani2->_flags & 0x100)) + ani2->handleObjectInteraction(ani, cmd->_keyCode); + return 1; + } + } + } + } + if (*((_DWORD *)getCurrSceneSc2MotionController() + 2) && cmd->cmd.msg.keyCode <= 0) { + if (g_fullpipe->_msgX != cmd->cmd.msg.sceneClickX || g_fullpipe->_msgY != cmd->cmd.msg.sceneClickY) { + v13 = getGameLoaderFieldFA(); + ani_ = Scene_getStaticANIObject1ById(g_fullpipe->_currentScene, (Objects)(unsigned __int16)v13, -1); + v15 = ani_; + if (!ani_ + || (LOBYTE(v16) = StaticANIObject_isIdle(ani_), v16) + && (v17 = v15->GameObject.flags, !(v17 & 0x80)) + && !(v17 & 0x100)) { + v18 = cmd->cmd.msg.sceneClickY; + v19 = cmd->cmd.msg.sceneClickX; + v20 = getGameLoaderFieldFA(); + result = startWalkTo(v20, -1, v19, v18, 0); + if (result) { + v21 = (ExCommand *)operator new(sizeof(ExCommand)); + if (v21) { + v22 = getGameLoaderFieldFA(); + v23 = ExCommand_ctor(v21, v22, 17, 64, 0, 0, 0, 1, 0, 0, 0); + } else { + v23 = 0; + } + v24 = v23->excFlags; + v23->msg.keyCode = 1; + v23->excFlags = v24 | 3; + v23->msg.x = cmd->cmd.msg.sceneClickX; + v23->msg.y = cmd->cmd.msg.sceneClickY; + ExCommand_postMessage(v23); + } + } + } elae { + cmd->cmd.msg.messageKind = 0; + } + } + return result; + default: + return result; + } + case 58: + input_setCursor(cmd->_keyCode); + return result; + case 59: + setInputDisabled(1); + return result; + case 60: + setInputDisabled(0); + return result; + case 56: + if (cmd->_field_2C) { + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode); + if (ani) { + getGameLoaderInventory()->addItem2(ani); + result = 1; + } + } else { + result = 1; + getGameLoaderInventory()->addItem(cmd->_parentId, 1); + } + getGameLoaderInventory()->rebuildItemRects(); + return result; + case 57: + if (cmd->_field_2C) { + if (!cmd->_field_20) { + getGameLoaderInventory()->removeItem2(g_fullpipe->_currentScene, cmd->_parentId, cmd->_x, cmd->_y, cmd->_field_14); + getGameLoaderInventory()->rebuildItemRects(); + return 1; + } + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(getGameLoaderFieldFA(), -1); + if (ani) { + getGameLoaderInventory()->removeItem2(g_fullpipe->_currentScene, cmd->_parentId, ani->_ox + cmd->_x, ani->_oy + cmd->_y, ani->_priority + cmd->_field_14); + getGameLoaderInventory()->rebuildItemRects(); + return 1; + } + } else { + getGameLoaderInventory()->removeItem(cmd->_parentId, 1); + } + getGameLoaderInventory()->rebuildItemRects(); + return 1; + case 55: + if (g_fullpipe->_currentScene) { + if (cmd->_field_14) + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_x, cmd->_y); + else + ani = g_fullpipe->_currentScene->getPictureObjectById(cmd->_x, cmd->_y); + g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode)->handleObjectInteraction(ani, cmd->_field_20); + result = 1; + } + return result; + case 51: + return startWalkTo(cmd->_parentId, cmd->_keyCode, cmd->_x, cmd->_y, cmd->_field_20); + case 52: + return sub_457F60(cmd->_parentId, cmd->_keyCode, cmd->_field_20); + case 53: + return sub_457FA0(cmd->_parentId, cmd->_keyCode); + case 63: + if (CObject::IsKindOf(cmd, &RTCObjstateCommand)) { + result = 1; + setObjectState((char *)&cmd->objCommandName->m_pchData, cmd->value); + } + return result; + default: + return result; + } } int global_messageHandler4(ExCommand *cmd) { -- cgit v1.2.3 From d8bc218ce81ec7d24015bcb9a118e33aa244f225 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 26 Aug 2013 14:22:59 +0300 Subject: FULLPIPE: More work on global_messageHandler3() --- engines/fullpipe/interaction.h | 1 + engines/fullpipe/inventory.cpp | 36 ++++++++++++++++++++++++++ engines/fullpipe/inventory.h | 7 +++++ engines/fullpipe/scenes.cpp | 58 +++++++++++++++++------------------------- 4 files changed, 67 insertions(+), 35 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h index f86e8e9405..a0bd54b704 100644 --- a/engines/fullpipe/interaction.h +++ b/engines/fullpipe/interaction.h @@ -55,6 +55,7 @@ class CInteraction : public CObject { }; class CInteractionController : public CObject { + public: CObList _interactions; int16 _field_20; bool _flag24; diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 9384cb2463..adfbf664a2 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -25,6 +25,7 @@ #include "fullpipe/utils.h" #include "fullpipe/inventory.h" #include "fullpipe/gameloader.h" +#include "fullpipe/statics.h" namespace Fullpipe { @@ -101,6 +102,41 @@ void CInventory2::addItem(int itemId, int count) { _inventoryItems.push_back(new InventoryItem(itemId, count)); } +void CInventory2::addItem2(StaticANIObject *obj) { + if (getInventoryPoolItemIndexById(obj->_id) >= 0 && getInventoryPoolItemFieldCById(obj->_id) != 2) { + addItem(obj->_id, 1); + obj->hide(); + } +} + +void CInventory2::removeItem(int itemId, int count) { + warning("STUB: CInventory2::removeItem(%d, %d)", itemId, count); +} + +void CInventory2::removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority) { + warning("STUB: void removeItem2(sc, %d, %d, %d, %d)", itemId, x, y, priority); +} + +int CInventory2::getCountItemsWithId(int itemId) { + int res = 0; + + for (uint i = 0; i < _inventoryItems.size(); i++) { + if (_inventoryItems[i]->itemId == itemId) + res += _inventoryItems[i]->count; + } + + return res; +} + +int CInventory2::getInventoryPoolItemFieldCById(int itemId) { + for (uint i = 0; i < _itemsPool.size(); i++) { + if (_itemsPool[i]->id == itemId) + return _itemsPool[i]->field_C; + } + + return 0; +} + void CInventory2::rebuildItemRects() { _scene = g_fullpipe->accessScene(_sceneId); diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 902ecffeb6..8d72ffc8be 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -97,6 +97,13 @@ class CInventory2 : public CInventory { CInventory2(); bool loadPartial(MfcArchive &file); void addItem(int itemId, int count); + void addItem2(StaticANIObject *obj); + void removeItem(int itemId, int count); + void removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority); + + int getInventoryPoolItemFieldCById(int itemId); + int getCountItemsWithId(int itemId); + void rebuildItemRects(); Scene *getScene() { return _scene; } diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index ecbb8090e6..7f9e6bfacf 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -903,7 +903,7 @@ int global_messageHandler2(ExCommand *cmd) { } int global_messageHandler3(ExCommand *cmd) { - result = 0; + int result = 0; if (cmd->_messageKind == 17) { switch (cmd->_messageNum) { @@ -920,6 +920,8 @@ int global_messageHandler3(ExCommand *cmd) { } } + StaticANIObject *ani, *ani2; + switch (cmd->_messageKind) { case 17: switch (cmd->_messageNum) { @@ -941,7 +943,7 @@ int global_messageHandler3(ExCommand *cmd) { g_fullpipe->_msgY = 0; g_fullpipe->_msgObjectId2 = 0; g_fullpipe->_msgId = 0; - if (cmd->_keyCode & 1 || cmd->_keyCode & 2) { + if ((cmd->_keyCode & 1) || (cmd->_keyCode & 2)) { g_fullpipe->_msgX = cmd->_x; g_fullpipe->_msgY = cmd->_y; } @@ -951,7 +953,7 @@ int global_messageHandler3(ExCommand *cmd) { } return result; case 29: - if (g_fullpipe->_gameLoader->interactionController->_flag24 && g_fullpipe->_currentScene) { + if (g_fullpipe->_gameLoader->_interactionController->_flag24 && g_fullpipe->_currentScene) { ani = g_fullpipe->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); ani2 = g_fullpipe->_currentScene->getStaticANIObject1ById(getGameLoaderFieldFA(), -1); if (ani) { @@ -964,8 +966,8 @@ int global_messageHandler3(ExCommand *cmd) { return 1; } } else { - ani2 = g_fullpipe->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY); - ani = g_fullpipe->_currentScene->getPictureObjectById(ani2, 0); + int id = g_fullpipe->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY); + ani = g_fullpipe->_currentScene->getPictureObjectById(id, 0); if (ani) { if (g_fullpipe->_msgObjectId2 == ani->_id && g_fullpipe->_msgId == ani->_okeyCode) { cmd->_messageKind = 0; @@ -979,37 +981,23 @@ int global_messageHandler3(ExCommand *cmd) { } } } - if (*((_DWORD *)getCurrSceneSc2MotionController() + 2) && cmd->cmd.msg.keyCode <= 0) { - if (g_fullpipe->_msgX != cmd->cmd.msg.sceneClickX || g_fullpipe->_msgY != cmd->cmd.msg.sceneClickY) { - v13 = getGameLoaderFieldFA(); - ani_ = Scene_getStaticANIObject1ById(g_fullpipe->_currentScene, (Objects)(unsigned __int16)v13, -1); - v15 = ani_; - if (!ani_ - || (LOBYTE(v16) = StaticANIObject_isIdle(ani_), v16) - && (v17 = v15->GameObject.flags, !(v17 & 0x80)) - && !(v17 & 0x100)) { - v18 = cmd->cmd.msg.sceneClickY; - v19 = cmd->cmd.msg.sceneClickX; - v20 = getGameLoaderFieldFA(); - result = startWalkTo(v20, -1, v19, v18, 0); + if (getCurrSceneSc2MotionController()->_isEnabled && cmd->_keyCode <= 0) { + if (g_fullpipe->_msgX != cmd->_sceneClickX || g_fullpipe->_msgY != cmd->_sceneClickY) { + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(getGameLoaderFieldFA(), -1); + if (!ani || ani->isIdle() && !(ani->_flags & 0x80) && !(ani->_flags & 0x100)) { + result = startWalkTo(getGameLoaderFieldFA(), -1, cmd->_sceneClickX, cmd->_sceneClickY, 0); if (result) { - v21 = (ExCommand *)operator new(sizeof(ExCommand)); - if (v21) { - v22 = getGameLoaderFieldFA(); - v23 = ExCommand_ctor(v21, v22, 17, 64, 0, 0, 0, 1, 0, 0, 0); - } else { - v23 = 0; - } - v24 = v23->excFlags; - v23->msg.keyCode = 1; - v23->excFlags = v24 | 3; - v23->msg.x = cmd->cmd.msg.sceneClickX; - v23->msg.y = cmd->cmd.msg.sceneClickY; - ExCommand_postMessage(v23); + ExCommand *ex = new ExCommand(getGameLoaderFieldFA(), 17, 64, 0, 0, 0, 1, 0, 0, 0); + + ex->_keyCode = 1; + ex->_excFlags |= 3; + ex->_x = cmd->_sceneClickX; + ex->_y = cmd->_sceneClickY; + ex->postMessage(); } } - } elae { - cmd->cmd.msg.messageKind = 0; + } else { + cmd->_messageKind = 0; } } return result; @@ -1017,7 +1005,7 @@ int global_messageHandler3(ExCommand *cmd) { return result; } case 58: - input_setCursor(cmd->_keyCode); + g_fullpipe->setCursor(cmd->_keyCode); return result; case 59: setInputDisabled(1); @@ -1075,7 +1063,7 @@ int global_messageHandler3(ExCommand *cmd) { case 63: if (CObject::IsKindOf(cmd, &RTCObjstateCommand)) { result = 1; - setObjectState((char *)&cmd->objCommandName->m_pchData, cmd->value); + g_fullpipe->setObjectState(cmd->_objCommandName, cmd->_value); } return result; default: -- cgit v1.2.3 From 028772d153b79b38e5dfa2d90ba5f01fb287b47e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 26 Aug 2013 22:17:20 +0300 Subject: FULLPIPE: Finish global_messageHandler3() --- engines/fullpipe/gfx.cpp | 5 +++++ engines/fullpipe/gfx.h | 2 ++ engines/fullpipe/messages.cpp | 2 ++ engines/fullpipe/messages.h | 1 + engines/fullpipe/motion.cpp | 16 +++++++++++++++ engines/fullpipe/motion.h | 5 +++++ engines/fullpipe/scene.cpp | 6 ++++++ engines/fullpipe/scene.h | 1 + engines/fullpipe/scenes.cpp | 46 ++++++++++++++++++++++--------------------- engines/fullpipe/statics.cpp | 7 +------ engines/fullpipe/statics.h | 2 -- engines/fullpipe/utils.h | 8 ++++++++ 12 files changed, 71 insertions(+), 30 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 6c22c2a493..d700fff15e 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -321,6 +321,11 @@ void GameObject::renumPictures(CPtrList *lst) { free(buf); } +bool GameObject::canInteractAny(GameObject *obj2, int a3) { + warning("STUB: GameObject::canInteractAny()"); + return false; +} + Picture::Picture() { _x = 0; _y = 0; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index eec32848ec..59edaf49e4 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -139,6 +139,8 @@ class GameObject : public CObject { void setFlags(int16 flags) { _flags = flags; } void clearFlags() { _flags = 0; } const char *getName() { return _objectName; } + + bool canInteractAny(GameObject *obj2, int a3); }; class PictureObject : public GameObject { diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index c107933008..cc7cd2e942 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -177,6 +177,8 @@ CObjstateCommand::CObjstateCommand() { bool CObjstateCommand::load(MfcArchive &file) { debug(5, "CObjStateCommand::load()"); + _objtype = kObjTypeObjstateCommand; + _cmd.load(file); _value = file.readUint32LE(); diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index d202235f93..3611ae0127 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -83,6 +83,7 @@ class ExCommand2 : public ExCommand { }; class CObjstateCommand : public CObject { + public: ExCommand _cmd; char *_objCommandName; int _value; diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 3259653001..6d07747c9f 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -248,4 +248,20 @@ void CReactPolygonal::createRegion() { } } +int startWalkTo(int objId, int objKey, int x, int y, int a5) { + warning("STUB: startWalkTo(%d, %d, %d, %d, %d)", objId, objKey, x, y, a5); + + return 0; +} + +int doSomeAnimation(int objId, int objKey, int a3) { + warning("STUB: doSomeAnimation(%d, %d, %d)", objId, objKey, a3); + + return 0; +} + +int doSomeAnimation2(int objId, int objKey) { + return doSomeAnimation(objId, objKey, 0); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 28e4297337..318a6b383f 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -25,7 +25,12 @@ namespace Fullpipe { +int startWalkTo(int objId, int objKey, int x, int y, int a5); +int doSomeAnimation(int objId, int objKey, int a3); +int doSomeAnimation2(int objId, int objKey); + class CMotionController : public CObject { + public: int _field_4; bool _isEnabled; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 0a7d035339..95d2876ca9 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -488,6 +488,12 @@ PictureObject *Scene::getPictureObjectAtPos(int x, int y) { return 0; } +int Scene::getPictureObjectIdAtPos(int x, int y) { + warning("STUB: Scene::getPictureObjectIdAtPos(%d, %d)", x, y); + + return 0; +} + void Scene::update(int counterdiff) { debug(0, "Scene::update(%d)", counterdiff); diff --git a/engines/fullpipe/scene.h b/engines/fullpipe/scene.h index 0f0854b059..c1c8d47ba8 100644 --- a/engines/fullpipe/scene.h +++ b/engines/fullpipe/scene.h @@ -73,6 +73,7 @@ class Scene : public Background { StaticANIObject *getStaticANIObjectAtPos(int x, int y); PictureObject *getPictureObjectAtPos(int x, int y); + int getPictureObjectIdAtPos(int x, int y); void initObjectCursors(const char *name); diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 7f9e6bfacf..6a8b78a9a8 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -926,9 +926,9 @@ int global_messageHandler3(ExCommand *cmd) { case 17: switch (cmd->_messageNum) { case 61: - return gameLoaderPreloadScene(cmd->_parentId, cmd->_keyCode); + return g_fullpipe->_gameLoader->preloadScene(cmd->_parentId, cmd->_keyCode); case 62: - return gameLoaderGotoScene(cmd->_parentId, cmd->_keyCode); + return g_fullpipe->_gameLoader->gotoScene(cmd->_parentId, cmd->_keyCode); case 64: if (g_fullpipe->_currentScene && g_fullpipe->_msgObjectId2 && (!(cmd->_keyCode & 4) || g_fullpipe->_msgObjectId2 != cmd->_field_14 || g_fullpipe->_msgId != cmd->_field_20)) { @@ -955,39 +955,39 @@ int global_messageHandler3(ExCommand *cmd) { case 29: if (g_fullpipe->_gameLoader->_interactionController->_flag24 && g_fullpipe->_currentScene) { ani = g_fullpipe->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); - ani2 = g_fullpipe->_currentScene->getStaticANIObject1ById(getGameLoaderFieldFA(), -1); + ani2 = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1); if (ani) { if (g_fullpipe->_msgObjectId2 == ani->_id && g_fullpipe->_msgId == ani->_okeyCode) { cmd->_messageKind = 0; return result; } if (ani2->canInteractAny(ani, cmd->_keyCode)) { - ani2->handleObjectInteraction(ani, cmd->_keyCode); + handleObjectInteraction(ani2, ani, cmd->_keyCode); return 1; } } else { int id = g_fullpipe->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY); - ani = g_fullpipe->_currentScene->getPictureObjectById(id, 0); - if (ani) { - if (g_fullpipe->_msgObjectId2 == ani->_id && g_fullpipe->_msgId == ani->_okeyCode) { + PictureObject *pic = g_fullpipe->_currentScene->getPictureObjectById(id, 0); + if (pic) { + if (g_fullpipe->_msgObjectId2 == pic->_id && g_fullpipe->_msgId == pic->_okeyCode) { cmd->_messageKind = 0; return result; } - if (ani2->canInteractAny(ani, cmd->_keyCode)) { - if (!ani2 || ani->isIdle() && !(ani2->_flags & 0x80) && !(ani2->_flags & 0x100)) - ani2->handleObjectInteraction(ani, cmd->_keyCode); + if (ani2->canInteractAny(pic, cmd->_keyCode)) { + if (!ani2 || ani2->isIdle() && !(ani2->_flags & 0x80) && !(ani2->_flags & 0x100)) + handleObjectInteraction(ani2, pic, cmd->_keyCode); return 1; } } } } - if (getCurrSceneSc2MotionController()->_isEnabled && cmd->_keyCode <= 0) { + if (getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->_isEnabled && cmd->_keyCode <= 0) { if (g_fullpipe->_msgX != cmd->_sceneClickX || g_fullpipe->_msgY != cmd->_sceneClickY) { - ani = g_fullpipe->_currentScene->getStaticANIObject1ById(getGameLoaderFieldFA(), -1); + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1); if (!ani || ani->isIdle() && !(ani->_flags & 0x80) && !(ani->_flags & 0x100)) { - result = startWalkTo(getGameLoaderFieldFA(), -1, cmd->_sceneClickX, cmd->_sceneClickY, 0); + result = startWalkTo(g_fullpipe->_gameLoader->_field_FA, -1, cmd->_sceneClickX, cmd->_sceneClickY, 0); if (result) { - ExCommand *ex = new ExCommand(getGameLoaderFieldFA(), 17, 64, 0, 0, 0, 1, 0, 0, 0); + ExCommand *ex = new ExCommand(g_fullpipe->_gameLoader->_field_FA, 17, 64, 0, 0, 0, 1, 0, 0, 0); ex->_keyCode = 1; ex->_excFlags |= 3; @@ -1033,7 +1033,7 @@ int global_messageHandler3(ExCommand *cmd) { getGameLoaderInventory()->rebuildItemRects(); return 1; } - ani = g_fullpipe->_currentScene->getStaticANIObject1ById(getGameLoaderFieldFA(), -1); + ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1); if (ani) { getGameLoaderInventory()->removeItem2(g_fullpipe->_currentScene, cmd->_parentId, ani->_ox + cmd->_x, ani->_oy + cmd->_y, ani->_priority + cmd->_field_14); getGameLoaderInventory()->rebuildItemRects(); @@ -1046,24 +1046,26 @@ int global_messageHandler3(ExCommand *cmd) { return 1; case 55: if (g_fullpipe->_currentScene) { + GameObject *obj; if (cmd->_field_14) - ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_x, cmd->_y); + obj = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_x, cmd->_y); else - ani = g_fullpipe->_currentScene->getPictureObjectById(cmd->_x, cmd->_y); - g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode)->handleObjectInteraction(ani, cmd->_field_20); + obj = g_fullpipe->_currentScene->getPictureObjectById(cmd->_x, cmd->_y); + handleObjectInteraction(g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode), obj, cmd->_field_20); result = 1; } return result; case 51: return startWalkTo(cmd->_parentId, cmd->_keyCode, cmd->_x, cmd->_y, cmd->_field_20); case 52: - return sub_457F60(cmd->_parentId, cmd->_keyCode, cmd->_field_20); + return doSomeAnimation(cmd->_parentId, cmd->_keyCode, cmd->_field_20); case 53: - return sub_457FA0(cmd->_parentId, cmd->_keyCode); + return doSomeAnimation2(cmd->_parentId, cmd->_keyCode); case 63: - if (CObject::IsKindOf(cmd, &RTCObjstateCommand)) { + if (cmd->_objtype == kObjTypeObjstateCommand) { + CObjstateCommand *c = (CObjstateCommand *)cmd; result = 1; - g_fullpipe->setObjectState(cmd->_objCommandName, cmd->_value); + g_fullpipe->setObjectState(c->_objCommandName, c->_value); } return result; default: diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 9706a456ca..53111e82d4 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -26,6 +26,7 @@ #include "fullpipe/ngiarchive.h" #include "fullpipe/statics.h" #include "fullpipe/messages.h" +#include "fullpipe/interaction.h" #include "fullpipe/constants.h" #include "fullpipe/objectnames.h" @@ -312,12 +313,6 @@ int StaticANIObject::getMovementIdById(int itemId) { return 0; } -bool StaticANIObject::canInteractAny(GameObject *obj2, int a3) { - warning("STUB: StaticANIObject::canInteractAny()"); - return false; -} - - Movement *StaticANIObject::getMovementByName(char *name) { for (uint i = 0; i < _movements.size(); i++) if (!strcmp(((Movement *)_movements[i])->_objectName, name)) diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index e4e2c1f602..95030180c3 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -230,8 +230,6 @@ class StaticANIObject : public GameObject { MessageQueue *changeStatics1(int msgNum); void changeStatics2(int objId); - - bool canInteractAny(GameObject *obj2, int a3); }; struct MovTable { diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index cfe9d93a74..9ebbe887f0 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -64,8 +64,16 @@ class MfcArchive : public Common::SeekableReadStream { virtual bool seek(int32 offset, int whence = SEEK_SET) { return _stream->seek(offset, whence); } }; +enum ObjType { + kObjTypeDefault, + kObjTypeObjstateCommand +}; + class CObject { public: + ObjType _objtype; + + CObject() : _objtype(kObjTypeDefault) {} virtual bool load(MfcArchive &in) { return true; } virtual ~CObject() {} -- cgit v1.2.3 From b209329a1d2924064ddf47c35be76f0c2361419a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 28 Aug 2013 00:11:17 +0300 Subject: FULLPIPE: Implemented several high level *AtPos functions --- engines/fullpipe/gfx.cpp | 32 ++++++++++++++++++++++++++++++++ engines/fullpipe/gfx.h | 4 ++++ engines/fullpipe/scene.cpp | 27 +++++++++++++++++++++++---- 3 files changed, 59 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index d700fff15e..ef6a589f8f 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -247,6 +247,19 @@ bool PictureObject::isPointInside(int x, int y) { return res; } +bool PictureObject::isPixelHitAtPos(int x, int y) { + int oldx = _picture->_x; + int oldy = _picture->_y; + + _picture->_x = _ox; + _picture->_y = _oy; + bool res = _picture->isPixelHitAtPos(x, y); + _picture->_x = oldx; + _picture->_y = oldy; + + return res; +} + GameObject::GameObject() { _okeyCode = 0; _flags = 0; @@ -590,6 +603,25 @@ bool Picture::isPointInside(int x, int y) { return false; } +bool Picture::isPixelHitAtPos(int x, int y) { + if (x < _x || y < _y || x >= _x + _width || y >= _y + _height) + return false; + + if (!_bitmap ) + init(); + + _bitmap->_x = _x; + _bitmap->_y = _y; + + return _bitmap->isPixelHitAtPos(x, y); +} + +bool Bitmap::isPixelHitAtPos(int x, int y) { + debug(0, "STUB: Bitmap::isPixelHitAtPos(%d, %d)", x, y); + + return false; +} + void Bitmap::putDib(int x, int y, int32 *palette) { debug(0, "Bitmap::putDib(%d, %d)", x, y); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 59edaf49e4..feb560c06f 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -60,6 +60,8 @@ struct Bitmap { void drawShaded(int type, int x, int y, byte *palette); void drawRotated(int x, int y, int angle, byte *palette); + + bool isPixelHitAtPos(int x, int y); }; class Picture : public MemoryObject { @@ -103,6 +105,7 @@ class Picture : public MemoryObject { Common::Point *getDimensions(Common::Point *p); bool isPointInside(int x, int y); + bool isPixelHitAtPos(int x, int y); byte *getPaletteData() { return _paletteData; } void setPaletteData(byte *pal); @@ -161,6 +164,7 @@ class PictureObject : public GameObject { bool setPicAniInfo(PicAniInfo *picAniInfo); bool isPointInside(int x, int y); + bool isPixelHitAtPos(int x, int y); }; class Background : public CObject { diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 95d2876ca9..25d70770f0 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -483,15 +483,34 @@ StaticANIObject *Scene::getStaticANIObjectAtPos(int x, int y) { } PictureObject *Scene::getPictureObjectAtPos(int x, int y) { - warning("STUB: Scene::getPictureObjectAtPos(%d, %d)", x, y); + PictureObject *res = 0; - return 0; + for (uint i = 0; i < _picObjList.size(); i++) { + PictureObject *p = (PictureObject *)_picObjList[i]; + if ((p->_field_8 & 1) && (p->_flags & 4) && + p->isPixelHitAtPos(x, y) && + (!res || res->_priority >= p->_priority)) + res = p; + } + + return res; } int Scene::getPictureObjectIdAtPos(int x, int y) { - warning("STUB: Scene::getPictureObjectIdAtPos(%d, %d)", x, y); + PictureObject *resp = 0; + int res = 0; - return 0; + for (uint i = 0; i < _picObjList.size(); i++) { + PictureObject *p = (PictureObject *)_picObjList[i]; + if ((p->_field_8 & 1) && (p->_flags & 4) && + p->isPixelHitAtPos(x, y) && + (!res || resp->_priority >= p->_priority)) { + resp = p; + res = p->_id; + } + } + + return res; } void Scene::update(int counterdiff) { -- cgit v1.2.3 From f1eb4043c2601f1d5f18aec3841b838942939d8c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 28 Aug 2013 08:29:22 +0300 Subject: FULLPIPE: Fix couple of Coverity defects --- engines/fullpipe/scenes.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 6a8b78a9a8..c3cf810345 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -776,16 +776,19 @@ int global_messageHandler1(ExCommand *cmd) { if (!g_fullpipe->_currSelectedInventoryItemId && !g_fullpipe->_aniMan->_movement && !(g_fullpipe->_aniMan->_flags & 0x100) && g_fullpipe->_aniMan->isIdle()) { int st = g_fullpipe->_aniMan->_statics->_staticsId; - ExCommand *newex; + ExCommand *newex = 0; if (st == ST_MAN_RIGHT) { newex = new ExCommand(g_fullpipe->_aniMan->_id, 1, rMV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0); } else if (st == (0x4000 | ST_MAN_RIGHT)) { newex = new ExCommand(g_fullpipe->_aniMan->_id, 1, MV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0); } - newex->_keyCode = g_fullpipe->_aniMan->_okeyCode; - newex->_excFlags |= 3; - newex->postMessage(); + + if (newex) { + newex->_keyCode = g_fullpipe->_aniMan->_okeyCode; + newex->_excFlags |= 3; + newex->postMessage(); + } } if (g_fullpipe->_currSelectedInventoryItemId != invItem) @@ -953,7 +956,10 @@ int global_messageHandler3(ExCommand *cmd) { } return result; case 29: - if (g_fullpipe->_gameLoader->_interactionController->_flag24 && g_fullpipe->_currentScene) { + if (!g_fullpipe->_currentScene) + return result; + + if (g_fullpipe->_gameLoader->_interactionController->_flag24) { ani = g_fullpipe->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY); ani2 = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1); if (ani) { -- cgit v1.2.3 From 0daaadc604b5ec8ce3be491736b01156c19afca9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 28 Aug 2013 10:20:55 +0300 Subject: FULLPIPE: Fixed off-screen bitmap rendering --- engines/fullpipe/gfx.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index ef6a589f8f..3384b87815 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -783,16 +783,18 @@ void Bitmap::putDibCB(int32 *palette) { byte *srcPtr = &_pixels[pitch * (endy - _y)]; + int starty = _y; + if (starty < 0) { + starty = 0; + srcPtr = &_pixels[pitch * (_height + _y)]; + } + int startx = _x; if (startx < 0) { srcPtr += bpp * -_x; startx = 0; } - int starty = _y; - if (starty < 0) - starty = 0; - if (_flags & 0x1000000) { for (int y = starty; y < endy; srcPtr -= pitch, y++) { curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(startx, y); -- cgit v1.2.3 From 7154d1f2cd91e8d1b160bb89ce416edf38679afd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 28 Aug 2013 10:50:03 +0300 Subject: FULLPIPE: More *AtPos functions --- engines/fullpipe/gfx.cpp | 21 ++++++++++++++++ engines/fullpipe/gfx.h | 2 ++ engines/fullpipe/scene.cpp | 14 +++++++++-- engines/fullpipe/statics.cpp | 59 ++++++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/statics.h | 2 ++ 5 files changed, 96 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 3384b87815..b43ea9706d 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -616,6 +616,27 @@ bool Picture::isPixelHitAtPos(int x, int y) { return _bitmap->isPixelHitAtPos(x, y); } +int Picture::getPixelAtPos(int x, int y) { + return getPixelAtPosEx(x / g_fullpipe->_pictureScale, y / g_fullpipe->_pictureScale); + + return false; +} + +int Picture::getPixelAtPosEx(int x, int y) { +#if 0 + if (x < 0 || y < 0) + return 0; + + v5 = ictureScale + this->width - 1; + if ( x < v5 / g_fullpipe->_pictureScale + && (v6 = g_fullpipe->_pictureScale + this_->height - 1, y < v6 / (unsigned __int16)getPictureScale()) + && (v7 = this_->memoryObject2) != 0 + && (v8 = v7->rows) != 0 ) + return = *(_WORD *)&v8[x][2 * y]; +#endif + return 0; +} + bool Bitmap::isPixelHitAtPos(int x, int y) { debug(0, "STUB: Bitmap::isPixelHitAtPos(%d, %d)", x, y); diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index feb560c06f..640b888636 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -106,6 +106,8 @@ class Picture : public MemoryObject { Common::Point *getDimensions(Common::Point *p); bool isPointInside(int x, int y); bool isPixelHitAtPos(int x, int y); + int getPixelAtPos(int x, int y); + int getPixelAtPosEx(int x, int y); byte *getPaletteData() { return _paletteData; } void setPaletteData(byte *pal); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 25d70770f0..47a68118df 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -477,9 +477,19 @@ void Scene::updateScrolling2() { } StaticANIObject *Scene::getStaticANIObjectAtPos(int x, int y) { - warning("STUB: Scene::getStaticANIObjectAtPos(%d, %d)", x, y); + StaticANIObject *res = 0; - return 0; + for (uint i = 0; i < _staticANIObjectList1.size(); i++) { + StaticANIObject *p = (StaticANIObject *)_staticANIObjectList1[i]; + int pixel; + + if ((p->_field_8 & 1) && (p->_flags & 4) && + p->getPixelAtPos(x, y, &pixel) && + (!res || res->_priority >= p->_priority)) + res = p; + } + + return res; } PictureObject *Scene::getPictureObjectAtPos(int x, int y) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 53111e82d4..7e4c1397ac 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -321,6 +321,65 @@ Movement *StaticANIObject::getMovementByName(char *name) { return 0; } +bool StaticANIObject::getPixelAtPos(int x, int y, int *pixel) { + bool res = false; + Picture *pic; + + if (_movement) + pic = _movement->_currDynamicPhase; + else + pic = _statics; + + if (!pic) + return false; + + int ongoing; + int xani, yani; + int oxani, oyani; + Common::Point point; + + if (_movement) + ongoing = _movement->_currMovement != 0; + else + ongoing = _statics->_staticsId & 0x4000; + + if (_movement) { + _movement->getCurrDynamicPhaseXY(point); + xani = point.x; + yani = point.y; + oxani = _movement->_ox; + oyani = _movement->_oy; + } else { + _statics->getSomeXY(point); + xani = point.x; + yani = point.y; + oxani = _ox; + oyani = _oy; + } + + int xtarget = x - (oxani - xani); + int ytarget = y - (oyani - yani); + + if (ongoing && _movement) + xtarget = pic->getDimensions(&point)->x - xtarget; + + x = pic->_x; + y = pic->_y; + pic->_x = 0; + pic->_y = 0; + if (pic->isPixelHitAtPos(xtarget, ytarget)) { + *pixel = pic->getPixelAtPos(xtarget, ytarget); + + res = true; + } else { + res = false; + } + pic->_x = x; + pic->_y = y; + + return res; +} + void Movement::draw(bool flipFlag, int angle) { debug(3, "Movement::draw(%d, %d)", flipFlag, angle); diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 95030180c3..9393612d77 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -230,6 +230,8 @@ class StaticANIObject : public GameObject { MessageQueue *changeStatics1(int msgNum); void changeStatics2(int objId); + + bool getPixelAtPos(int x, int y, int *pixel); }; struct MovTable { -- cgit v1.2.3 From d8d5e2d67f4caa009918b35cb543ea6ab0a408e0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 28 Aug 2013 22:56:36 +0300 Subject: FULLPIPE: Finished Picture::getPixelAtPosEx() --- engines/fullpipe/gfx.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index b43ea9706d..3f32c27615 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -623,17 +623,14 @@ int Picture::getPixelAtPos(int x, int y) { } int Picture::getPixelAtPosEx(int x, int y) { -#if 0 if (x < 0 || y < 0) return 0; - v5 = ictureScale + this->width - 1; - if ( x < v5 / g_fullpipe->_pictureScale - && (v6 = g_fullpipe->_pictureScale + this_->height - 1, y < v6 / (unsigned __int16)getPictureScale()) - && (v7 = this_->memoryObject2) != 0 - && (v8 = v7->rows) != 0 ) - return = *(_WORD *)&v8[x][2 * y]; -#endif + if (x < (g_fullpipe->_pictureScale + _width - 1) / g_fullpipe->_pictureScale && + y < (g_fullpipe->_pictureScale + _height - 1) / g_fullpipe->_pictureScale && + _memoryObject2 != 0 && _memoryObject2->_rows != 0) + return _memoryObject2->_rows[x][2 * y]; + return 0; } -- cgit v1.2.3 From cac623a8219e17a84e032a9c3415538741a65d9e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 29 Aug 2013 00:40:14 +0300 Subject: FULLPIPE: Bugfixes for StaticANIObject::startAnim() --- engines/fullpipe/gfx.cpp | 2 +- engines/fullpipe/messages.cpp | 1 - engines/fullpipe/scene.cpp | 2 +- engines/fullpipe/statics.cpp | 17 +++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 3f32c27615..e368c4b262 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -506,7 +506,7 @@ void Picture::draw(int x, int y, int style, int angle) { return; if ((_alpha & 0xff) < 0xff) { - warning("Picture:draw: alpha = %0x", _alpha); + debug(0, "Picture:draw: alpha = %0x", _alpha); } byte *pal = _paletteData; diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index cc7cd2e942..dcf9a222f8 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -644,7 +644,6 @@ void clearMessageHandlers() { } void processMessages() { - warning("###################### processing"); if (!g_fullpipe->_isProcessingMessages) { g_fullpipe->_isProcessingMessages = true; diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 47a68118df..891b34f196 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -469,7 +469,7 @@ void Scene::draw() { } void Scene::updateScrolling() { - warning("STUB Scene::updateScrolling()"); + debug(0, "STUB Scene::updateScrolling()"); } void Scene::updateScrolling2() { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 7e4c1397ac..ad51b8fa4c 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -907,26 +907,24 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase if (_flags & 0x80) return false; - warning("STUB: StaticANIObject::startAnim(%d, %d, %d)", movementId, messageQueueId, dynPhaseIdx); + debug(0, "StaticANIObject::startAnim(%d, %d, %d)", movementId, messageQueueId, dynPhaseIdx); if (_messageQueueId) { updateGlobalMessageQueue(messageQueueId, _id); return false; } - bool found = false; - Movement *mov; + Movement *mov = 0; for (uint i = 0; i < _movements.size(); i++) { - mov = (Movement *)_movements[i]; - if (mov->_id != movementId) { - found = true; + if (((Movement *)_movements[i])->_id == movementId) { + mov = (Movement *)_movements[i]; break; } } - if (!found) { + if (!mov) { updateGlobalMessageQueue(messageQueueId, _id); return false; } @@ -935,7 +933,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase _flags |= 1; _messageQueueId = messageQueueId; - return 1; + return true; } int newx = _ox; @@ -944,6 +942,9 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase if (_movement) { _movement->getCurrDynamicPhaseXY(point); + + newx -= point.x; + newy -= point.y; } else if (_statics) { _statics->getSomeXY(point); -- cgit v1.2.3 From 638bd3014ef4fb4f33e6520263aa2e6471b0f70a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 29 Aug 2013 14:01:35 +0300 Subject: FULLPIPE: Fix bugs in Movement::updateCurrDynamicPhase() --- engines/fullpipe/gfx.cpp | 3 +++ engines/fullpipe/statics.cpp | 15 +++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index e368c4b262..6627e35a85 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -1054,6 +1054,9 @@ DynamicPhase *Shadows::findSize(int width, int height) { int idx = 0; int min = 1000; + if (!_items.size()) + return 0; + for (uint i = 0; i < _items.size(); i++) { int w = abs(width - _items[i].width); if (w < min) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index ad51b8fa4c..4d13f2908a 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1279,11 +1279,18 @@ void Movement::initStatics(StaticANIObject *ani) { } void Movement::updateCurrDynamicPhase() { - if (_dynamicPhases.size() == 0) - return; + if (_currMovement) { + if (_currMovement->_dynamicPhases.size() == 0) + return; + + if (_currMovement->_dynamicPhases[_currDynamicPhaseIndex]) + _currDynamicPhase = (DynamicPhase *)_currMovement->_dynamicPhases[_currDynamicPhaseIndex]; + } else { + if (_dynamicPhases.size() == 0) + return; - if (_dynamicPhases[_currDynamicPhaseIndex]) { - _currDynamicPhase = (DynamicPhase *)_dynamicPhases[_currDynamicPhaseIndex]; + if (_dynamicPhases[_currDynamicPhaseIndex]) + _currDynamicPhase = (DynamicPhase *)_dynamicPhases[_currDynamicPhaseIndex]; } } -- cgit v1.2.3 From b559257358742c93dd44ef5d0f23d3024bf61ce5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 Aug 2013 00:04:40 +0300 Subject: FULLPIPE: Implement CInventory2::handleLeftClick() --- engines/fullpipe/input.cpp | 3 +- engines/fullpipe/inventory.cpp | 91 ++++++++++++++++++++++++++++++++++++++---- engines/fullpipe/inventory.h | 11 +++-- 3 files changed, 92 insertions(+), 13 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 03a77efdcf..76cb17b0dd 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -100,7 +100,8 @@ void CInputController::drawCursor(int x, int y) { _cursorsArray[_cursorIndex]->picture->draw(_cursorBounds.left, _cursorBounds.top, 0, 0); if (_cursorItemPicture) - _cursorItemPicture->draw(_cursorsArray[_cursorIndex]->itemPictureOffsX, _cursorsArray[_cursorIndex]->itemPictureOffsY, 0, 0); + _cursorItemPicture->draw(_cursorBounds.left + _cursorsArray[_cursorIndex]->itemPictureOffsX, + _cursorBounds.top + _cursorsArray[_cursorIndex]->itemPictureOffsY, 0, 0); } void CInputController::setCursor(int cursorId) { diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index adfbf664a2..41940f4b2d 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -26,6 +26,7 @@ #include "fullpipe/inventory.h" #include "fullpipe/gameloader.h" #include "fullpipe/statics.h" +#include "fullpipe/input.h" namespace Fullpipe { @@ -128,6 +129,15 @@ int CInventory2::getCountItemsWithId(int itemId) { return res; } +int CInventory2::getInventoryItemIndexById(int itemId) { + for (uint i = 0; i < _inventoryItems.size(); i++) { + if (_inventoryItems[i]->itemId == itemId) + return i; + } + + return -1; +} + int CInventory2::getInventoryPoolItemFieldCById(int itemId) { for (uint i = 0; i < _itemsPool.size(); i++) { if (_itemsPool[i]->id == itemId) @@ -137,6 +147,15 @@ int CInventory2::getInventoryPoolItemFieldCById(int itemId) { return 0; } +int CInventory2::getItemFlags(int itemId) { + int idx = getInventoryPoolItemIndexById(itemId); + + if (idx < 0) + return 0; + + return _itemsPool[idx]->flags; +} + void CInventory2::rebuildItemRects() { _scene = g_fullpipe->accessScene(_sceneId); @@ -296,16 +315,72 @@ void CInventory2::slideOut() { ex->postMessage(); } -int CInventory2::handleLeftClick(ExCommand *cmd) { - warning("STUB: CInventory2::handleLeftClick()"); +bool CInventory2::handleLeftClick(ExCommand *cmd) { + if (!_isInventoryOut) + return false; - return 0; + bool res = false; + + for (uint i = 0; i < _inventoryIcons.size(); i++) { + if (cmd->_x >= _inventoryIcons[i]->x1 && cmd->_x <= _inventoryIcons[i]->x2 && + cmd->_y >= _inventoryIcons[i]->y1 && cmd->_y <= _inventoryIcons[i]->y2) { + if (getSelectedItemId()) { + if (getSelectedItemId() != _inventoryIcons[i]->inventoryItemId) + unselectItem(0); + } + if (getItemFlags(_inventoryIcons[i]->inventoryItemId) & 1) { + ExCommand *ex = new ExCommand(0, 17, 65, 0, 0, 0, 1, 0, 0, 0); + ex->_field_2C = 11; + ex->_field_14 = _inventoryIcons[i]->inventoryItemId; + ex->_excFlags |= 3; + ex->postMessage(); + } + if (!(getItemFlags(_inventoryIcons[i]->inventoryItemId) & 2)) { + selectItem(_inventoryIcons[i]->inventoryItemId); + _inventoryIcons[i]->isSelected = true; + } + res = true; + } + } + + if (!res) + unselectItem(this); + + return res; } -int CInventory2::unselectItem(bool flag) { - warning("STUB: CInventory2::unselectItem()"); +int CInventory2::selectItem(int itemId) { + if (getInventoryItemIndexById(itemId) < 0) + return -1; - return 0; + unselectItem(0); + + _selectedId = itemId; + + if (_scene) { + int idx = getInventoryPoolItemIndexById(itemId); + + Picture *pic = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectId1, 0)->_picture; + g_fullpipe->getGameLoaderInputController()->setCursorItemPicture(pic); + } + + return _selectedId; +} + +bool CInventory2::unselectItem(bool flag) { + if (_selectedId < 0) + return false; + + _selectedId = -1; + + for (uint i = 0; i < _inventoryIcons.size(); i++) { + if (_inventoryIcons[i]->isSelected) + _inventoryIcons[i]->isSelected = false; + } + + g_fullpipe->getGameLoaderInputController()->setCursorItemPicture(0); + + return true; } int CInventory2::getHoveredItem(Common::Point *point) { @@ -332,9 +407,9 @@ int CInventory2::getHoveredItem(Common::Point *point) { point->x > icn->x2 || point->y < _topOffset + icn->y1 || point->y > _topOffset + icn->y2) { - icn->isMouseHover = 0; + icn->isMouseHover = false; } else { - icn->isMouseHover = 1; + icn->isMouseHover = true; return icn->inventoryItemId; } } diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index 8d72ffc8be..f84d27dde5 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -76,8 +76,8 @@ struct InventoryIcon { int x2; int y2; int16 inventoryItemId; - int isSelected; - int isMouseHover; + bool isSelected; + bool isMouseHover; }; typedef Common::Array InventoryIcons; @@ -101,8 +101,10 @@ class CInventory2 : public CInventory { void removeItem(int itemId, int count); void removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority); + int getInventoryItemIndexById(int itemId); int getInventoryPoolItemFieldCById(int itemId); int getCountItemsWithId(int itemId); + int getItemFlags(int itemId); void rebuildItemRects(); @@ -116,8 +118,9 @@ class CInventory2 : public CInventory { void slideIn(); void slideOut(); - int handleLeftClick(ExCommand *cmd); - int unselectItem(bool flag); + bool handleLeftClick(ExCommand *cmd); + int selectItem(int itemId); + bool unselectItem(bool flag); void draw(); }; -- cgit v1.2.3 From f43b145ad4ca431f6080bff8cfe655703ca0b197 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 Aug 2013 00:36:34 +0300 Subject: FULLPIPE: Fixed several unitialized members as pointed by Coverity --- engines/fullpipe/statics.cpp | 13 +++++++++++++ engines/fullpipe/statics.h | 1 - 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 4d13f2908a..bb67f9f581 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -98,6 +98,10 @@ StaticANIObject::StaticANIObject() { _callback2 = 0; _sceneId = -1; _someDynamicPhaseIndex = -1; + + _field_32 = 0; + _field_96 = 0; + _messageNum = 0; } StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { @@ -106,6 +110,10 @@ StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { _field_34 = 1; _initialCounter = 0; + _field_32 = 0; + _field_96 = 0; + _messageNum = 0; + _messageQueueId = 0; _animExFlag = 0; _counter = 0; @@ -1097,6 +1105,9 @@ Movement::Movement() { _currMovement = 0; _counter = 0; _counterMax = 83; + + _field_24 = 0; + _field_28 = 0; } Movement::Movement(Movement *src, StaticANIObject *ani) { @@ -1542,12 +1553,14 @@ DynamicPhase::DynamicPhase() { _someX = 0; _rect = 0; _field_7C = 0; + _field_7E = 0; _dynFlags = 0; _someY = 0; } DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) { _field_7C = src->_field_7C; + _field_7E = 0; _rect = new Common::Rect(); if (reverse) { diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 9393612d77..03b8570ed9 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -83,7 +83,6 @@ class DynamicPhase : public StaticPhase { class Statics : public DynamicPhase { public: int16 _staticsId; - int16 _field_86; char *_staticsName; Picture *_picture; -- cgit v1.2.3 From 11cfbe4bc5c97ff6e8568126f22261f834a3943e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 Aug 2013 09:47:51 +0300 Subject: FULLPIPE: Fixe few warnings --- engines/fullpipe/behavior.cpp | 2 +- engines/fullpipe/fullpipe.cpp | 2 +- engines/fullpipe/input.cpp | 2 +- engines/fullpipe/scene.cpp | 5 +---- engines/fullpipe/scenes.cpp | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp index 79ef86e8c5..6bfb400c24 100644 --- a/engines/fullpipe/behavior.cpp +++ b/engines/fullpipe/behavior.cpp @@ -153,7 +153,7 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, B uint runPercent = 0; for (int i = 0; i < bhe->_itemsCount; i++) { if (!(bhe->_items[i]->_flags & 1) && bhe->_items[i]->_percent) { - if (rnd >= runPercent && rnd <= runPercent + bhe->_items[i]->_percent || i == bhe->_itemsCount - 1) { + if ((rnd >= runPercent && rnd <= runPercent + bhe->_items[i]->_percent) || i == bhe->_itemsCount - 1) { mq = new MessageQueue(bhe->_items[i]->_messageQueue, 0, 1); break; } diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 49abbabd26..5c1d19ba7b 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -347,7 +347,7 @@ void FullpipeEngine::updateScreen() { //if (inputArFlag) // updateGame_inputArFlag(); - if (_modalObject || _flgGameIsRunning && (_gameLoader->updateSystems(42), _modalObject != 0)) { + if (_modalObject || (_flgGameIsRunning && (_gameLoader->updateSystems(42), _modalObject != 0))) { if (_flgGameIsRunning) { if (_modalObject->init(42)) { _modalObject->update(); diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 76cb17b0dd..9a25dc669c 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -152,7 +152,7 @@ void FullpipeEngine::updateCursorsCommon() { GameObject *ani = _currentScene->getStaticANIObjectAtPos(_mouseVirtX, _mouseVirtY); GameObject *pic = _currentScene->getPictureObjectAtPos(_mouseVirtX, _mouseVirtY); - if (!ani || pic && pic->_priority < ani->_priority ) + if (!ani || (pic && pic->_priority < ani->_priority)) ani = pic; int selId = getGameLoaderInventory()->getSelectedItemId(); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 891b34f196..b92b66ded6 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -337,7 +337,7 @@ PictureObject *Scene::getPictureObjectById(int objId, int flags) { PictureObject *Scene::getPictureObjectByName(const char *objName, int flags) { for (uint i = 0; i < _picObjList.size(); i++) { - if (!strcmp(((PictureObject *)_picObjList[i])->_objectName, objName) && ((PictureObject *)_picObjList[i])->_okeyCode == flags || flags == -1) + if (!strcmp(((PictureObject *)_picObjList[i])->_objectName, objName) && (((PictureObject *)_picObjList[i])->_okeyCode == flags || flags == -1)) return (PictureObject *)_picObjList[i]; } @@ -587,8 +587,6 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { int bgPosX = g_fullpipe->_sceneRect.left - bgOffsetX; if (bgPosX < g_fullpipe->_sceneRect.right - 1) { - int v24 = height * bgNumY; - int v51 = height * bgNumY; while (1) { int v25 = bgNumY; for (int y = g_fullpipe->_sceneRect.top - bgOffsetY; y < g_fullpipe->_sceneRect.bottom - 1;) { @@ -615,7 +613,6 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { } if (v32 >= g_fullpipe->_sceneRect.right - 1) break; - v24 = v51; } } } diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index c3cf810345..9054c4c7a7 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -980,7 +980,7 @@ int global_messageHandler3(ExCommand *cmd) { return result; } if (ani2->canInteractAny(pic, cmd->_keyCode)) { - if (!ani2 || ani2->isIdle() && !(ani2->_flags & 0x80) && !(ani2->_flags & 0x100)) + if (!ani2 || (ani2->isIdle() && !(ani2->_flags & 0x80) && !(ani2->_flags & 0x100))) handleObjectInteraction(ani2, pic, cmd->_keyCode); return 1; } @@ -990,7 +990,7 @@ int global_messageHandler3(ExCommand *cmd) { if (getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->_isEnabled && cmd->_keyCode <= 0) { if (g_fullpipe->_msgX != cmd->_sceneClickX || g_fullpipe->_msgY != cmd->_sceneClickY) { ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1); - if (!ani || ani->isIdle() && !(ani->_flags & 0x80) && !(ani->_flags & 0x100)) { + if (!ani || (ani->isIdle() && !(ani->_flags & 0x80) && !(ani->_flags & 0x100))) { result = startWalkTo(g_fullpipe->_gameLoader->_field_FA, -1, cmd->_sceneClickX, cmd->_sceneClickY, 0); if (result) { ExCommand *ex = new ExCommand(g_fullpipe->_gameLoader->_field_FA, 17, 64, 0, 0, 0, 1, 0, 0, 0); -- cgit v1.2.3 From d6309755fc8b67e2ade20008e6f9d1fc911095c9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 Aug 2013 18:34:30 +0300 Subject: FULLPIPE: Bugfixes to StaticANIObject::update() --- engines/fullpipe/statics.cpp | 71 ++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 33 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index bb67f9f581..0d56125a3d 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -639,7 +639,7 @@ void StaticANIObject::update(int counterdiff) { if (dyn->_initialCountdown == dyn->_countdown) { ex = dyn->getExCommand(); - if (ex && ex->_messageKind == 35) { + if (ex && ex->_messageKind != 35) { newex = new ExCommand(ex); newex->_excFlags |= 2; if (newex->_messageKind == 17) { @@ -651,42 +651,42 @@ void StaticANIObject::update(int counterdiff) { if (!_movement) return; } + } - if (dyn->_initialCountdown == dyn->_countdown && dyn->_field_68 == 0) { - newex = new ExCommand(_id, 17, dyn->_field_68, 0, 0, 0, 1, 0, 0, 0); - newex->_excFlags = 2; - newex->_keyCode = _okeyCode; - newex->sendMessage(); + if (dyn->_initialCountdown != dyn->_countdown || dyn->_field_68 == 0) { + newex = new ExCommand(_id, 17, dyn->_field_68, 0, 0, 0, 1, 0, 0, 0); + newex->_excFlags = 2; + newex->_keyCode = _okeyCode; + newex->sendMessage(); - if (!_movement) - return; - } + if (!_movement) + return; + } - if (!_movement->gotoNextFrame(_callback1, _callback2)) { - stopAnim_maybe(); - } else { - setOXY(_movement->_ox, _movement->_oy); - _counter = _initialCounter; - - if (dyn->_initialCountdown == dyn->_countdown) { - ex = dyn->getExCommand(); - if (ex) { - if (ex->_messageKind == 35) { - newex = new ExCommand(ex); - newex->_excFlags |= 2; - newex->sendMessage(); - } + if (!_movement->gotoNextFrame(_callback1, _callback2)) { + stopAnim_maybe(); + } else { + setOXY(_movement->_ox, _movement->_oy); + _counter = _initialCounter; + + if (dyn->_initialCountdown == dyn->_countdown) { + ex = dyn->getExCommand(); + if (ex) { + if (ex->_messageKind == 35) { + newex = new ExCommand(ex); + newex->_excFlags |= 2; + newex->sendMessage(); } } - if (!_movement) - return; - - _stepArray.getCurrPoint(&point); - setOXY(point.x + _ox, point.y + _oy); - _stepArray.gotoNextPoint(); - if (_someDynamicPhaseIndex == _movement->_currDynamicPhaseIndex) - adjustSomeXY(); } + if (!_movement) + return; + + _stepArray.getCurrPoint(&point); + setOXY(point.x + _ox, point.y + _oy); + _stepArray.gotoNextPoint(); + if (_someDynamicPhaseIndex == _movement->_currDynamicPhaseIndex) + adjustSomeXY(); } } else if (_flags & 0x20) { _flags ^= 0x20; @@ -696,8 +696,8 @@ void StaticANIObject::update(int counterdiff) { Common::Point pointS; _statics->getSomeXY(pointS); - setOXY(_ox + point.x + _movement->_mx - pointS.x, - _oy + point.y + _movement->_my - pointS.y); + _movement->setOXY(_ox + point.x + _movement->_mx - pointS.x, + _oy + point.y + _movement->_my - pointS.y); } } else { if (_statics) { @@ -1265,6 +1265,8 @@ void Movement::initStatics(StaticANIObject *ani) { if (!_currMovement) return; + debug(7, "Movement::initStatics()"); + _staticsObj2 = ani->addReverseStatics(_currMovement->_staticsObj2); _staticsObj1 = ani->addReverseStatics(_currMovement->_staticsObj1); @@ -1290,6 +1292,8 @@ void Movement::initStatics(StaticANIObject *ani) { } void Movement::updateCurrDynamicPhase() { + debug(7, "Movement::updateCurrDynamicPhase()"); + if (_currMovement) { if (_currMovement->_dynamicPhases.size() == 0) return; @@ -1306,6 +1310,7 @@ void Movement::updateCurrDynamicPhase() { } void Movement::setDynamicPhaseIndex(int index) { + debug(7, "Movement::setDynamicPhaseIndex(%d)", index); while (_currDynamicPhaseIndex < index) gotoNextFrame(0, 0); -- cgit v1.2.3 From 9abf4f6f890ae8b93c940e8191f5461e500a1c6a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Sep 2013 01:41:26 +0300 Subject: FULLPIPE: Added more debug output --- engines/fullpipe/fullpipe.cpp | 3 ++- engines/fullpipe/scenes.cpp | 5 ++--- engines/fullpipe/statics.cpp | 20 ++++++++++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 5c1d19ba7b..6bd8c82eb6 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -341,6 +341,8 @@ void FullpipeEngine::cleanup() { } void FullpipeEngine::updateScreen() { + debug(4, "FullpipeEngine::updateScreen()"); + _mouseVirtX = _mouseScreenPos.x + _sceneRect.left; _mouseVirtY = _mouseScreenPos.y + _sceneRect.top; @@ -361,7 +363,6 @@ void FullpipeEngine::updateScreen() { } } } else if (_currentScene) { - //_currentScene->update(42); // HACK. FIXME _currentScene->draw(); if (_inventoryScene) diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 9054c4c7a7..4f2f7c34d1 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -667,6 +667,8 @@ void global_messageHandler_KickMetal() { } int global_messageHandler1(ExCommand *cmd) { + debug(0, "global_messageHandler1: %d %d", cmd->_messageKind, cmd->_messageNum); + if (cmd->_excFlags & 0x10000) { if (cmd->_messageNum == MV_MAN_TOLADDER) cmd->_messageNum = MV_MAN_TOLADDER2; @@ -837,8 +839,6 @@ void staticANIObjectCallback(int *arg) { } int global_messageHandler2(ExCommand *cmd) { - debug(0, "global_messageHandler2()"); - if (cmd->_messageKind != 17) return 0; @@ -1082,7 +1082,6 @@ int global_messageHandler3(ExCommand *cmd) { int global_messageHandler4(ExCommand *cmd) { StaticANIObject *ani = 0; - debug(0, "global_messageHandler4: %d %d", cmd->_messageKind, cmd->_messageNum); switch (cmd->_messageKind) { case 18: { MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(cmd->_messageNum), cmd->_parId, 0); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 0d56125a3d..5369042cce 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -467,7 +467,7 @@ void StaticANIObject::draw() { Common::Point point; Common::Rect rect; - debug(0, "StaticANIObject::draw() (%s) [%d]", transCyrillic((byte *)_objectName), _id); + debug(0, "StaticANIObject::draw() (%s) [%d] [%d, %d]", transCyrillic((byte *)_objectName), _id, _ox, _oy); if (_shadowsOn && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_shadows && (getCurrDimensions(point)->x != 1 || getCurrDimensions(point)->y != 1)) { @@ -527,7 +527,7 @@ void StaticANIObject::draw() { } void StaticANIObject::draw2() { - debug(0, "StatciANIObject::draw2()"); + debug(0, "StatciANIObject::draw2(): id: (%s) %d [%d, %d]", transCyrillic((byte *)_objectName), _id, _ox, _oy); if ((_flags & 4) && (_flags & 0x10)) { if (_movement) { @@ -602,7 +602,7 @@ Common::Point *StaticANIObject::getCurrDimensions(Common::Point &p) { void StaticANIObject::update(int counterdiff) { int mqid; - debug(0, "StaticANIObject::update() (%x)", _flags); + debug(0, "StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); if (_flags & 2) { _messageNum--; @@ -712,6 +712,8 @@ void StaticANIObject::update(int counterdiff) { } } } + + debug(0, " StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); } void StaticANIObject::stopAnim_maybe() { @@ -915,7 +917,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase if (_flags & 0x80) return false; - debug(0, "StaticANIObject::startAnim(%d, %d, %d)", movementId, messageQueueId, dynPhaseIdx); + debug(0, "StaticANIObject::startAnim(%d, %d, %d) (%s [%d]) [%d, %d]", movementId, messageQueueId, dynPhaseIdx, transCyrillic((byte *)_objectName), _id, _ox, _oy); if (_messageQueueId) { updateGlobalMessageQueue(messageQueueId, _id); @@ -948,16 +950,20 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase int newy = _oy; Common::Point point; + debug(0, "0 %d %d", newx, newy); if (_movement) { _movement->getCurrDynamicPhaseXY(point); newx -= point.x; newy -= point.y; + + debug(0, "1 %d %d", newx, newy); } else if (_statics) { _statics->getSomeXY(point); newx -= point.x; newy -= point.y; + debug(0, "2 %d %d", newx, newy); } _movement = mov; @@ -975,6 +981,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase newx += point.x + _movement->_mx; newy += point.y + _movement->_my; + debug(0, "3 %d %d", newx, newy); _stepArray.gotoNextPoint(); ExCommand *ex = _movement->_currDynamicPhase->getExCommand(); @@ -988,9 +995,12 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase } } + debug(0, "4 %d %d", newx, newy); _movement->getCurrDynamicPhaseXY(point); setOXY(point.x + newx, point.y + newy); + debug(0, " StaticANIObject::startAnim(%d, %d, %d) (%s [%d]) [%d, %d]", movementId, messageQueueId, dynPhaseIdx, transCyrillic((byte *)_objectName), _id, _ox, _oy); + if (_movement->_staticsObj2->_staticsId & 0x4000) _flags |= 8; else @@ -1568,6 +1578,8 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) { _field_7E = 0; _rect = new Common::Rect(); + debug(0, "DynamicPhase::DynamicPhase(src, %d)", reverse); + if (reverse) { if (!src->_bitmap) src->init(); -- cgit v1.2.3 From b457771b7d6645791a4ae1f44be8e42b9f3cf7eb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Sep 2013 00:37:27 +0300 Subject: FULLPIPE: Implemented setAlpha() functions --- engines/fullpipe/statics.cpp | 23 ++++++++++++++++++++++- engines/fullpipe/statics.h | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 5369042cce..efc5c24fa5 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -572,6 +572,14 @@ void StaticANIObject::setSpeed(int speed) { warning("STUB: StaticANIObject::setSpeed(%d)", speed); } +void StaticANIObject::setAlpha(int alpha) { + for (uint i = 0; i < _movements.size(); i++) + ((Movement *)_movements[i])->setAlpha(alpha); + + for (uint i = 0; i < _staticsList.size(); i++) + ((Statics *)_staticsList[i])->setAlpha(alpha); +} + void StaticANIObject::initMovements() { for (uint i = 0; i < _movements.size(); i++) ((Movement *)_movements[i])->removeFirstPhase(); @@ -684,6 +692,7 @@ void StaticANIObject::update(int counterdiff) { _stepArray.getCurrPoint(&point); setOXY(point.x + _ox, point.y + _oy); + warning("%d %d %d %d", _ox, point.x, _oy, point.y); _stepArray.gotoNextPoint(); if (_someDynamicPhaseIndex == _movement->_currDynamicPhaseIndex) adjustSomeXY(); @@ -963,7 +972,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase newx -= point.x; newy -= point.y; - debug(0, "2 %d %d", newx, newy); + debug(0, "2 %d %d - %d %d assa", newx, newy, point.x, point.y); } _movement = mov; @@ -1160,6 +1169,7 @@ bool Movement::load(MfcArchive &file) { warning("STUB: Movement::load"); return true; } + bool Movement::load(MfcArchive &file, StaticANIObject *ani) { GameObject::load(file); @@ -1249,6 +1259,17 @@ Common::Point *Movement::getCurrDynamicPhaseXY(Common::Point &p) { return &p; } +void Movement::setAlpha(int alpha) { + if (_currMovement) + for (uint i = 0; i < _currMovement->_dynamicPhases.size(); i++) { + ((DynamicPhase *)_currMovement->_dynamicPhases[i])->setAlpha(alpha); + } + else + for (uint i = 0; i < _dynamicPhases.size(); i++) { + ((DynamicPhase *)_dynamicPhases[i])->setAlpha(alpha); + } +} + Common::Point *Movement::getDimensionsOfPhase(Common::Point *p, int phaseIndex) { int idx = phaseIndex; diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 03b8570ed9..5ae4a1c2d5 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -140,6 +140,8 @@ class Movement : public GameObject { void initStatics(StaticANIObject *ani); void updateCurrDynamicPhase(); + void setAlpha(int alpha); + void setDynamicPhaseIndex(int index); void removeFirstPhase(); @@ -194,6 +196,7 @@ class StaticANIObject : public GameObject { void clearFlags(); void setFlags40(bool state); bool isIdle(); + void setAlpha(int alpha); void deleteFromGlobalMessageQueue(); void queueMessageQueue(MessageQueue *msg); -- cgit v1.2.3 From 7c3640b2b7017389e23a81f2f06a3ea9161b8ea2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Sep 2013 09:05:18 +0300 Subject: FULLPIPE: Some WIP debugging --- engines/fullpipe/fullpipe.cpp | 2 ++ engines/fullpipe/gfx.cpp | 2 ++ engines/fullpipe/statics.cpp | 20 ++++++++++++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 6bd8c82eb6..46457685fe 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -204,6 +204,8 @@ Common::Error FullpipeEngine::run() { _system->delayMillis(10); _system->updateScreen(); + _system->delayMillis(300); // HACK + } freeGameLoader(); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 6627e35a85..6ccf661986 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -312,6 +312,8 @@ bool GameObject::load(MfcArchive &file) { } void GameObject::setOXY(int x, int y) { + warning("GameObject::setOXY(%d, %d) %s", x, y, transCyrillic((byte *)_objectName)); + _ox = x; _oy = y; } diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index efc5c24fa5..cb4ca75689 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -184,6 +184,7 @@ bool StaticANIObject::load(MfcArchive &file) { pt.x = pt.y = 100; } + warning("%s %d", __FILE__, __LINE__); setOXY(pt.x, pt.y); return true; @@ -193,8 +194,10 @@ void StaticANIObject::setOXY(int x, int y) { _ox = x; _oy = y; - if (_movement) + if (_movement) { + warning("%s %d", __FILE__, __LINE__); _movement->setOXY(x, y); + } } void StaticANIObject::clearFlags() { @@ -674,6 +677,7 @@ void StaticANIObject::update(int counterdiff) { if (!_movement->gotoNextFrame(_callback1, _callback2)) { stopAnim_maybe(); } else { + warning("%s %d", __FILE__, __LINE__); setOXY(_movement->_ox, _movement->_oy); _counter = _initialCounter; @@ -691,8 +695,8 @@ void StaticANIObject::update(int counterdiff) { return; _stepArray.getCurrPoint(&point); + warning("%s %d", __FILE__, __LINE__); setOXY(point.x + _ox, point.y + _oy); - warning("%d %d %d %d", _ox, point.x, _oy, point.y); _stepArray.gotoNextPoint(); if (_someDynamicPhaseIndex == _movement->_currDynamicPhaseIndex) adjustSomeXY(); @@ -705,6 +709,7 @@ void StaticANIObject::update(int counterdiff) { Common::Point pointS; _statics->getSomeXY(pointS); + warning("%s %d", __FILE__, __LINE__); _movement->setOXY(_ox + point.x + _movement->_mx - pointS.x, _oy + point.y + _movement->_my - pointS.y); } @@ -738,6 +743,7 @@ void StaticANIObject::stopAnim_maybe() { Common::Point point; if (_movement) { + warning("%s %d", __FILE__, __LINE__); setOXY(_movement->_ox, _movement->_oy); if (_flags & 0x40) { @@ -806,6 +812,7 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { debug(0, "StaticANIObject::setPicAniInfo() (%s [%d]) type: %d, statid: %d, movid: %d", transCyrillic((byte *)_objectName), _id, picAniInfo->type, picAniInfo->staticsId, picAniInfo->movementId); if (picAniInfo->type & 3) { + warning("%s %d", __FILE__, __LINE__); setOXY(picAniInfo->ox, picAniInfo->oy); _priority = picAniInfo->priority; _okeyCode = picAniInfo->field_8; @@ -861,8 +868,10 @@ void StaticANIObject::show1(int x, int y, int movId, int mqId) { if (movId == -1) { _flags |= 4u; - if (x != -1 && y != -1) + if (x != -1 && y != -1) { + warning("%s %d", __FILE__, __LINE__); setOXY(x, y); + } return; } @@ -871,8 +880,10 @@ void StaticANIObject::show1(int x, int y, int movId, int mqId) { if (!mov) return; - if (x != -1 && y != -1) + if (x != -1 && y != -1) { + warning("%s %d", __FILE__, __LINE__); setOXY(x, y); + } _statics = mov->_staticsObj1; @@ -1006,6 +1017,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase debug(0, "4 %d %d", newx, newy); _movement->getCurrDynamicPhaseXY(point); + warning("%s %d", __FILE__, __LINE__); setOXY(point.x + newx, point.y + newy); debug(0, " StaticANIObject::startAnim(%d, %d, %d) (%s [%d]) [%d, %d]", movementId, messageQueueId, dynPhaseIdx, transCyrillic((byte *)_objectName), _id, _ox, _oy); -- cgit v1.2.3 From 0dc4914cc4305174102936dc94d27fd192414837 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Sep 2013 11:15:17 +0300 Subject: FULLPIPE: Remove redundant debug info --- engines/fullpipe/fullpipe.cpp | 3 --- engines/fullpipe/gfx.cpp | 2 -- engines/fullpipe/gfx.h | 7 +------ engines/fullpipe/statics.cpp | 20 +++----------------- 4 files changed, 4 insertions(+), 28 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 46457685fe..bc8a4ae320 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -203,9 +203,6 @@ Common::Error FullpipeEngine::run() { _system->delayMillis(10); _system->updateScreen(); - - _system->delayMillis(300); // HACK - } freeGameLoader(); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 6ccf661986..6627e35a85 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -312,8 +312,6 @@ bool GameObject::load(MfcArchive &file) { } void GameObject::setOXY(int x, int y) { - warning("GameObject::setOXY(%d, %d) %s", x, y, transCyrillic((byte *)_objectName)); - _ox = x; _oy = y; } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 640b888636..6818fe6b2d 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -65,12 +65,7 @@ struct Bitmap { }; class Picture : public MemoryObject { - friend class Movement; - friend class DynamicPhase; - friend class PictureObject; - friend class CInputController; - friend class StaticANIObject; - + public: Common::Rect _rect; Bitmap *_convertedBitmap; int _x; diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index cb4ca75689..db15ee4cf3 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -184,7 +184,6 @@ bool StaticANIObject::load(MfcArchive &file) { pt.x = pt.y = 100; } - warning("%s %d", __FILE__, __LINE__); setOXY(pt.x, pt.y); return true; @@ -194,10 +193,8 @@ void StaticANIObject::setOXY(int x, int y) { _ox = x; _oy = y; - if (_movement) { - warning("%s %d", __FILE__, __LINE__); + if (_movement) _movement->setOXY(x, y); - } } void StaticANIObject::clearFlags() { @@ -677,7 +674,6 @@ void StaticANIObject::update(int counterdiff) { if (!_movement->gotoNextFrame(_callback1, _callback2)) { stopAnim_maybe(); } else { - warning("%s %d", __FILE__, __LINE__); setOXY(_movement->_ox, _movement->_oy); _counter = _initialCounter; @@ -695,7 +691,6 @@ void StaticANIObject::update(int counterdiff) { return; _stepArray.getCurrPoint(&point); - warning("%s %d", __FILE__, __LINE__); setOXY(point.x + _ox, point.y + _oy); _stepArray.gotoNextPoint(); if (_someDynamicPhaseIndex == _movement->_currDynamicPhaseIndex) @@ -709,7 +704,6 @@ void StaticANIObject::update(int counterdiff) { Common::Point pointS; _statics->getSomeXY(pointS); - warning("%s %d", __FILE__, __LINE__); _movement->setOXY(_ox + point.x + _movement->_mx - pointS.x, _oy + point.y + _movement->_my - pointS.y); } @@ -743,7 +737,6 @@ void StaticANIObject::stopAnim_maybe() { Common::Point point; if (_movement) { - warning("%s %d", __FILE__, __LINE__); setOXY(_movement->_ox, _movement->_oy); if (_flags & 0x40) { @@ -812,7 +805,6 @@ bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { debug(0, "StaticANIObject::setPicAniInfo() (%s [%d]) type: %d, statid: %d, movid: %d", transCyrillic((byte *)_objectName), _id, picAniInfo->type, picAniInfo->staticsId, picAniInfo->movementId); if (picAniInfo->type & 3) { - warning("%s %d", __FILE__, __LINE__); setOXY(picAniInfo->ox, picAniInfo->oy); _priority = picAniInfo->priority; _okeyCode = picAniInfo->field_8; @@ -869,7 +861,6 @@ void StaticANIObject::show1(int x, int y, int movId, int mqId) { if (movId == -1) { _flags |= 4u; if (x != -1 && y != -1) { - warning("%s %d", __FILE__, __LINE__); setOXY(x, y); } @@ -881,7 +872,6 @@ void StaticANIObject::show1(int x, int y, int movId, int mqId) { return; if (x != -1 && y != -1) { - warning("%s %d", __FILE__, __LINE__); setOXY(x, y); } @@ -1015,13 +1005,9 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase } } - debug(0, "4 %d %d", newx, newy); _movement->getCurrDynamicPhaseXY(point); - warning("%s %d", __FILE__, __LINE__); setOXY(point.x + newx, point.y + newy); - debug(0, " StaticANIObject::startAnim(%d, %d, %d) (%s [%d]) [%d, %d]", movementId, messageQueueId, dynPhaseIdx, transCyrillic((byte *)_objectName), _id, _ox, _oy); - if (_movement->_staticsObj2->_staticsId & 0x4000) _flags |= 8; else @@ -1338,13 +1324,13 @@ void Movement::updateCurrDynamicPhase() { debug(7, "Movement::updateCurrDynamicPhase()"); if (_currMovement) { - if (_currMovement->_dynamicPhases.size() == 0) + if (_currMovement->_dynamicPhases.size() == 0 || (uint)_currDynamicPhaseIndex >= _currMovement->_dynamicPhases.size()) return; if (_currMovement->_dynamicPhases[_currDynamicPhaseIndex]) _currDynamicPhase = (DynamicPhase *)_currMovement->_dynamicPhases[_currDynamicPhaseIndex]; } else { - if (_dynamicPhases.size() == 0) + if (_dynamicPhases.size() == 0 || (uint)_currDynamicPhaseIndex >= _dynamicPhases.size()) return; if (_dynamicPhases[_currDynamicPhaseIndex]) -- cgit v1.2.3 From 5c759da7a3476ad0bf6af09887b7ded248950cbd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Sep 2013 11:16:28 +0300 Subject: FULLPIPE: Fix long standing bug with animation --- engines/fullpipe/statics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index db15ee4cf3..cb23b60c24 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1251,8 +1251,8 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) { } Common::Point *Movement::getCurrDynamicPhaseXY(Common::Point &p) { - p.x = _currDynamicPhase->_x; - p.y = _currDynamicPhase->_y; + p.x = _currDynamicPhase->_someX; + p.y = _currDynamicPhase->_someY; return &p; } -- cgit v1.2.3 From a522f5bc157e250cfb2bfb0093afd26a4de7fbcf Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Sep 2013 18:59:52 +0300 Subject: FULLPIPE: WIP debug output --- engines/fullpipe/scenes.cpp | 4 ++-- engines/fullpipe/statics.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 4f2f7c34d1..0c06e03b75 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -1370,10 +1370,10 @@ void scene01_initScene(Scene *sc, int entrance) { pic->_flags &= 0xFFFB; } - if (entrance != TrubaLeft ) { + if (entrance != TrubaLeft) { StaticANIObject *bootAnim = sc->getStaticANIObject1ById(ANI_BOOT_1, -1); if (bootAnim) - bootAnim->_flags &= 0xFFFB; + bootAnim->_flags &= ~0x04; } setElevatorButton(sO_Level2, ST_LBN_2N); diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index cb23b60c24..8fe119e2ba 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -217,6 +217,7 @@ void StaticANIObject::setFlags40(bool state) { if (_flags & 0x40) _flags ^= 0x40; } + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); } void StaticANIObject::deleteFromGlobalMessageQueue() { @@ -239,6 +240,7 @@ void StaticANIObject::queueMessageQueue(MessageQueue *mq) { _messageNum = 0; if (_flags & 2) { _flags ^= 2; + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); } if (mq) { _animExFlag = 0; @@ -266,6 +268,7 @@ bool StaticANIObject::trySetMessageQueue(int msgNum, int qId) { } _flags |= 2; + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); _messageNum = msgNum; _messageQueueId = qId; @@ -611,6 +614,7 @@ void StaticANIObject::update(int counterdiff) { int mqid; debug(0, "StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); + if (_id == 322 && _oy != 100) warning("StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); if (_flags & 2) { _messageNum--; @@ -620,6 +624,7 @@ void StaticANIObject::update(int counterdiff) { mqid = _messageQueueId; _messageQueueId = 0; _flags ^= 2; + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); updateGlobalMessageQueue(mqid, _id); return; @@ -699,6 +704,7 @@ void StaticANIObject::update(int counterdiff) { } else if (_flags & 0x20) { _flags ^= 0x20; _flags |= 1; + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); _movement->gotoFirstFrame(); _movement->getCurrDynamicPhaseXY(point); @@ -722,6 +728,8 @@ void StaticANIObject::update(int counterdiff) { } debug(0, " StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); + if (_id == 322 && _oy != 100) + warning(" StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); } void StaticANIObject::stopAnim_maybe() { @@ -731,6 +739,7 @@ void StaticANIObject::stopAnim_maybe() { return; _flags ^= 1; + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); int oid = 0; int oldmqid = _messageQueueId; @@ -897,6 +906,7 @@ void StaticANIObject::show1(int x, int y, int movId, int mqId) { if (_flags & 1) _flags ^= 1; + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); _messageQueueId = mqId; } @@ -951,6 +961,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase if (mov == _movement) { _flags |= 1; + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); _messageQueueId = messageQueueId; return true; @@ -1014,6 +1025,7 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase _flags &= 0xFFF7; _flags |= 1; + if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); _messageQueueId = messageQueueId; _movement->_currDynamicPhase->_countdown = _movement->_currDynamicPhase->_initialCountdown; -- cgit v1.2.3 From 0b4318267424f6220948c122d0db73e93deef39e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Sep 2013 22:19:59 +0300 Subject: FULLPIPE: Remove rdundant debug output --- engines/fullpipe/statics.cpp | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 8fe119e2ba..c4ceaf2439 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -217,7 +217,6 @@ void StaticANIObject::setFlags40(bool state) { if (_flags & 0x40) _flags ^= 0x40; } - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); } void StaticANIObject::deleteFromGlobalMessageQueue() { @@ -238,10 +237,10 @@ void StaticANIObject::queueMessageQueue(MessageQueue *mq) { deleteFromGlobalMessageQueue(); _messageQueueId = 0; _messageNum = 0; - if (_flags & 2) { + + if (_flags & 2) _flags ^= 2; - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); - } + if (mq) { _animExFlag = 0; if (_movement) @@ -268,7 +267,7 @@ bool StaticANIObject::trySetMessageQueue(int msgNum, int qId) { } _flags |= 2; - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); + _messageNum = msgNum; _messageQueueId = qId; @@ -613,8 +612,7 @@ Common::Point *StaticANIObject::getCurrDimensions(Common::Point &p) { void StaticANIObject::update(int counterdiff) { int mqid; - debug(0, "StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); - if (_id == 322 && _oy != 100) warning("StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); + debug(6, "StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); if (_flags & 2) { _messageNum--; @@ -624,7 +622,6 @@ void StaticANIObject::update(int counterdiff) { mqid = _messageQueueId; _messageQueueId = 0; _flags ^= 2; - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); updateGlobalMessageQueue(mqid, _id); return; @@ -704,7 +701,7 @@ void StaticANIObject::update(int counterdiff) { } else if (_flags & 0x20) { _flags ^= 0x20; _flags |= 1; - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); + _movement->gotoFirstFrame(); _movement->getCurrDynamicPhaseXY(point); @@ -726,20 +723,15 @@ void StaticANIObject::update(int counterdiff) { } } } - - debug(0, " StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); - if (_id == 322 && _oy != 100) - warning(" StaticANIObject::update() (%s) [%d] [%d, %d] fl: %x", transCyrillic((byte *)_objectName), _id, _ox, _oy, _flags); } void StaticANIObject::stopAnim_maybe() { - debug(0, "StaticANIObject::stopAnim_maybe()"); + debug(6, "StaticANIObject::stopAnim_maybe()"); if (!(_flags & 1)) return; _flags ^= 1; - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); int oid = 0; int oldmqid = _messageQueueId; @@ -906,7 +898,6 @@ void StaticANIObject::show1(int x, int y, int movId, int mqId) { if (_flags & 1) _flags ^= 1; - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); _messageQueueId = mqId; } @@ -961,7 +952,6 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase if (mov == _movement) { _flags |= 1; - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); _messageQueueId = messageQueueId; return true; @@ -1025,7 +1015,6 @@ bool StaticANIObject::startAnim(int movementId, int messageQueueId, int dynPhase _flags &= 0xFFF7; _flags |= 1; - if (_id == 322) warning("%d [%d, %d] fl: %x", __LINE__, _ox, _oy, _flags); _messageQueueId = messageQueueId; _movement->_currDynamicPhase->_countdown = _movement->_currDynamicPhase->_initialCountdown; -- cgit v1.2.3 From 0bc0aa16581a251a628c93125f3209aa8fcd1ddb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Sep 2013 22:20:15 +0300 Subject: FULLPIPE: Implement GlobalMessageQueueList::compact() --- engines/fullpipe/messages.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index dcf9a222f8..96ed389527 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -465,9 +465,16 @@ void GlobalMessageQueueList::disableQueueById(int id) { } int GlobalMessageQueueList::compact() { - warning("STUB: GlobalMessageQueueList::compact()"); + for (uint i = 0; i < size();) { + if (((MessageQueue *)((*this).operator[](i)))->_isFinished) { + disableQueueById(((MessageQueue *)((*this).operator[](i)))->_id); + remove_at(i); + } else { + i++; + } + } - return 0; + return size() + 1; } void GlobalMessageQueueList::addMessageQueue(MessageQueue *msg) { -- cgit v1.2.3 From 1b057ba3465ac27a1ec855d2ddfbbd730edfa9f0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Sep 2013 22:31:40 +0300 Subject: FULLPIPE: Implement MessageQueue::finish() --- engines/fullpipe/messages.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 96ed389527..c24dee47c8 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -414,7 +414,25 @@ bool MessageQueue::checkGlobalExCommandList2() { } void MessageQueue::finish() { - warning("STUB: MessageQueue::finish()"); + if (!_parId) + return; + + MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_parId); + + _parId = 0; + + if (!mq) + return; + + if (!_flag1) { + mq->update(); + return; + } + + mq->_counter--; + + if (!mq->_counter && !mq->_exCommands.size()) + mq->update(); } void MessageQueue::replaceKeyCode(int key1, int key2) { -- cgit v1.2.3 From eea48b4f12f819a2bd595f3750a23998e96ee560 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 3 Sep 2013 00:21:34 +0300 Subject: FULLPIPE: Implement Shadows::initMovement() --- engines/fullpipe/gfx.cpp | 24 +++++++++++++++++++++++- engines/fullpipe/statics.cpp | 16 ++++++++++++++++ engines/fullpipe/statics.h | 1 + 3 files changed, 40 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 6627e35a85..d680d32790 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -1047,7 +1047,29 @@ void Shadows::init() { } void Shadows::initMovement(Movement *mov) { - warning("STUB: Shadows::initMovement()"); + uint num; + + if (mov->_currMovement) + num = mov->_currMovement->_dynamicPhases.size(); + else + num = mov->_dynamicPhases.size(); + + _items.clear(); + _items.resize(num); + + Common::Point point; + + _items[0].dynPhase = (DynamicPhase *)mov->_staticsObj1; + _items[0].dynPhase->getDimensions(&point); + _items[0].width = point.x; + _items[0].height = point.y; + + for (uint i = 1; i < num; i++) { + _items[i].dynPhase = mov->getDynamicPhaseByIndex(i); + _items[i].dynPhase->getDimensions(&point); + _items[i].width = point.x; + _items[i].height = point.y; + } } DynamicPhase *Shadows::findSize(int width, int height) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index c4ceaf2439..46d48d5d29 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1348,6 +1348,22 @@ void Movement::setDynamicPhaseIndex(int index) { gotoPrevFrame(); } +DynamicPhase *Movement::getDynamicPhaseByIndex(int idx) { + debug(7, "Movement::updateCurrDynamicPhase()"); + + if (_currMovement) { + if (_currMovement->_dynamicPhases.size() == 0 || (uint)idx >= _currMovement->_dynamicPhases.size()) + return 0; + + return (DynamicPhase *)_currMovement->_dynamicPhases[idx]; + } else { + if (_dynamicPhases.size() == 0 || (uint)idx >= _dynamicPhases.size()) + return 0; + + return (DynamicPhase *)_dynamicPhases[idx]; + } +} + void Movement::loadPixelData() { Movement *mov = this; for (Movement *i = _currMovement; i; i = i->_currMovement) diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 5ae4a1c2d5..295da9b676 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -143,6 +143,7 @@ class Movement : public GameObject { void setAlpha(int alpha); void setDynamicPhaseIndex(int index); + DynamicPhase *getDynamicPhaseByIndex(int idx); void removeFirstPhase(); bool gotoNextFrame(int callback1, void (*callback2)(int *)); -- cgit v1.2.3 From 8ffbbccbfc70ed0ce17e594b25c5b9efae248013 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 3 Sep 2013 16:47:50 +0300 Subject: FULLPIPE: Bugfix shadow drawing --- engines/fullpipe/gfx.cpp | 2 +- engines/fullpipe/statics.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index d680d32790..131396c7f7 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -1065,7 +1065,7 @@ void Shadows::initMovement(Movement *mov) { _items[0].height = point.y; for (uint i = 1; i < num; i++) { - _items[i].dynPhase = mov->getDynamicPhaseByIndex(i); + _items[i].dynPhase = mov->getDynamicPhaseByIndex(i - 1); _items[i].dynPhase->getDimensions(&point); _items[i].width = point.x; _items[i].height = point.y; diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 46d48d5d29..a44093b135 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -492,18 +492,18 @@ void StaticANIObject::draw() { DynamicPhase *shd = g_fullpipe->_currentScene->_shadows->findSize(rect.width(), rect.height()); if (shd) { shd->getDimensions(&point); - int midx = _ox - shd->_x / 2 - dyn->_someX; - int midy = _oy - shd->_y / 2 - dyn->_someY + rect.bottom - 3; - int shdy = shd->_y; + int midx = _ox - point.x / 2 - dyn->_someX; + int midy = _oy - point.y / 2 - dyn->_someY + rect.bottom - 3; + int shdw = point.y; int px; - if (!_movement || _flags & 0x20 ) + if (!_movement || (_flags & 0x20)) px = _statics->getCenter(&point)->x; else px = _movement->getCenter(&point)->x; if (_shadowsOn != 1) - midy = _shadowsOn - shdy / 2; + midy = _shadowsOn - shdw / 2; shd->draw(px + midx, midy, 0, 0); } @@ -1589,7 +1589,7 @@ Common::Point *Movement::getCenter(Common::Point *p) { if (_currMovement) { Common::Point point; - getDimensionsOfPhase(&point, _currDynamicPhaseIndex); + _currMovement->getDimensionsOfPhase(&point, _currDynamicPhaseIndex); rect.moveTo(point.x - _currDynamicPhase->_rect->right, _currDynamicPhase->_rect->top); } -- cgit v1.2.3 From b3abc58675001313f809bcd5f7a3f86488f67e7d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 3 Sep 2013 21:10:48 +0300 Subject: FULLPIPE: Hid noisy stub message --- engines/fullpipe/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 442db7a642..7f34412334 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -132,7 +132,7 @@ void FullpipeEngine::playSound(int id, int flag) { } void global_messageHandler_handleSound(ExCommand *cmd) { - warning("STUB: global_messageHandler_handleSound()"); + debug(0, "STUB: global_messageHandler_handleSound()"); } -- cgit v1.2.3 From 0814826f12960a03f0c9a32316c9449982bd14cb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 3 Sep 2013 21:33:38 +0300 Subject: FULLPIPE: Implement StaticANIObject::setSpeed() --- engines/fullpipe/statics.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index a44093b135..c54c6df25d 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -571,7 +571,24 @@ MovTable *StaticANIObject::countMovements() { } void StaticANIObject::setSpeed(int speed) { - warning("STUB: StaticANIObject::setSpeed(%d)", speed); + CGameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("SpeedUp"); + + if (!var) + return; + + for (var = var->_subVars; var; var = var->_nextVarObj) { + Movement *mov = getMovementById(var->_value.intValue); + + if (mov) { + if (speed) { + if (mov->_counterMax == 83) + mov->_counterMax = 41; + } else if (mov->_counterMax == 41) { + mov->_counterMax = 83; + } + } + } + } void StaticANIObject::setAlpha(int alpha) { -- cgit v1.2.3 From ff9cd54fd15c07db4c31f81bff318db26a47297f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 4 Sep 2013 22:03:16 +0300 Subject: FULLPIPE: Fix default cursor --- engines/fullpipe/input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 9a25dc669c..eb528f0ac1 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -208,7 +208,7 @@ void FullpipeEngine::updateCursorsCommon() { } } - _cursorId = PIC_CSR_DEFAULT_INV; + _cursorId = PIC_CSR_DEFAULT; } } // End of namespace Fullpipe -- cgit v1.2.3 From d0484467688e896937f232766e9104bbd3377144 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 4 Sep 2013 22:13:44 +0300 Subject: FULLPIPE: Implement Bitmap::isPixelHitAtPos() --- engines/fullpipe/gfx.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/gfx.h | 2 ++ 2 files changed, 45 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 131396c7f7..629e8e5b0e 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -53,6 +53,11 @@ Bitmap::Bitmap(Bitmap *src) { _pixels = src->_pixels; } +Bitmap::~Bitmap() { + if (_pixels) + free(_pixels); +} + void Bitmap::load(Common::ReadStream *s) { debug(5, "Bitmap::load()"); @@ -635,7 +640,44 @@ int Picture::getPixelAtPosEx(int x, int y) { } bool Bitmap::isPixelHitAtPos(int x, int y) { - debug(0, "STUB: Bitmap::isPixelHitAtPos(%d, %d)", x, y); + if (x < _x || x >= _width + _x || y < _y || y >= _y + _height) + return false; + + int off; + + if (_type == 'CB\x05e') + off = 2 * ((_width + 1) / 2); + else + off = 4 * ((_width + 3) / 4); + + off = x + off * (_y + _height - y - 1) - _x; + + if (_flags & 0x1000000) { + switch (_type) { + case 'CB\0\0': + if (_pixels[off] == _flags & 0xff) + return false; + break; + case 'CB\x05e': + if (!*(int16 *)&_pixels[2 * off]) + return false; + break; + case 'RB\0\0': + { + Bitmap bmp; + + if (decompressRle2(&bmp)) + return bmp._pixels[off] != bmp._flags; + + return false; + } + } + } + return true; +} + +bool Bitmap::decompressRle2(Bitmap *res) { + warning("STUB: Bitmap::decompressRle2()"); return false; } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 6818fe6b2d..ccfc72f96f 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -41,6 +41,7 @@ struct Bitmap { Bitmap(); Bitmap(Bitmap *src); + ~Bitmap(); void load(Common::ReadStream *s); void putDib(int x, int y, int32 *palette); @@ -62,6 +63,7 @@ struct Bitmap { void drawRotated(int x, int y, int angle, byte *palette); bool isPixelHitAtPos(int x, int y); + bool decompressRle2(Bitmap *res); }; class Picture : public MemoryObject { -- cgit v1.2.3 From 8ea65ec40f5ab3422a415be8c1e08185ea60ed05 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 4 Sep 2013 22:13:55 +0300 Subject: FULLPIPE: Fix *AtPos() functions --- engines/fullpipe/scene.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index b92b66ded6..66e5ee3f80 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -483,7 +483,7 @@ StaticANIObject *Scene::getStaticANIObjectAtPos(int x, int y) { StaticANIObject *p = (StaticANIObject *)_staticANIObjectList1[i]; int pixel; - if ((p->_field_8 & 1) && (p->_flags & 4) && + if ((p->_field_8 & 0x100) && (p->_flags & 4) && p->getPixelAtPos(x, y, &pixel) && (!res || res->_priority >= p->_priority)) res = p; @@ -497,7 +497,7 @@ PictureObject *Scene::getPictureObjectAtPos(int x, int y) { for (uint i = 0; i < _picObjList.size(); i++) { PictureObject *p = (PictureObject *)_picObjList[i]; - if ((p->_field_8 & 1) && (p->_flags & 4) && + if ((p->_field_8 & 0x100) && (p->_flags & 4) && p->isPixelHitAtPos(x, y) && (!res || res->_priority >= p->_priority)) res = p; @@ -512,7 +512,7 @@ int Scene::getPictureObjectIdAtPos(int x, int y) { for (uint i = 0; i < _picObjList.size(); i++) { PictureObject *p = (PictureObject *)_picObjList[i]; - if ((p->_field_8 & 1) && (p->_flags & 4) && + if ((p->_field_8 & 0x100) && (p->_flags & 4) && p->isPixelHitAtPos(x, y) && (!res || resp->_priority >= p->_priority)) { resp = p; -- cgit v1.2.3 From f61b77e07e032b8ec672eb4daabe625b59d9292f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 4 Sep 2013 22:40:00 +0300 Subject: FULLPIPE: Implement Bitmap::isPixelHitAtPos() --- engines/fullpipe/gfx.cpp | 64 +++++++++++++++++++++++++++++------------------- engines/fullpipe/gfx.h | 4 +-- 2 files changed, 41 insertions(+), 27 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 629e8e5b0e..a38203375b 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -663,23 +663,23 @@ bool Bitmap::isPixelHitAtPos(int x, int y) { return false; break; case 'RB\0\0': - { - Bitmap bmp; - - if (decompressRle2(&bmp)) - return bmp._pixels[off] != bmp._flags; - - return false; - } + return isPixelAtHitPosRB(x, y); } } return true; } -bool Bitmap::decompressRle2(Bitmap *res) { - warning("STUB: Bitmap::decompressRle2()"); +bool Bitmap::isPixelAtHitPosRB(int x, int y) { + int ox = _x; + int oy = _y; - return false; + _x = _y = 0; + + bool res = putDibRB(0, x, y); + _x = ox; + _y = oy; + + return res; } void Bitmap::putDib(int x, int y, int32 *palette) { @@ -694,7 +694,7 @@ void Bitmap::putDib(int x, int y, int32 *palette) { putDibCB(palette); } -void Bitmap::putDibRB(int32 *palette) { +bool Bitmap::putDibRB(int32 *palette, int pX, int pY) { uint16 *curDestPtr; int endy; int x; @@ -706,7 +706,7 @@ void Bitmap::putDibRB(int32 *palette) { uint16 *srcPtr2; uint16 *srcPtr; - if (!palette) + if (!palette && pX == -1) error("Bitmap::putDibRB(): Both global and local palettes are empty"); debug(8, "Bitmap::putDibRB()"); @@ -715,13 +715,15 @@ void Bitmap::putDibRB(int32 *palette) { endy = _height + _y - 1; if (_x > 799 || endx < 0 || _y > 599 || endy < 0) - return; + return false; - if (endy > 599) - endy = 599; + if (pX == -1) { + if (endy > 599) + endy = 599; - if (endx > 799) - endx = 799; + if (endx > 799) + endx = 799; + } int startx = _x; if (startx < 0) @@ -773,10 +775,14 @@ void Bitmap::putDibRB(int32 *palette) { if (fillLen > 0 || start1 >= 0) { if (x <= 799 + 1 || (fillLen += 799 - x + 1, fillLen > 0)) { if (y <= endy) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y); - - int bgcolor = palette[(pixel >> 8) & 0xff]; - colorFill(curDestPtr, fillLen, bgcolor); + if (pX == -1) { + int bgcolor = palette[(pixel >> 8) & 0xff]; + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y); + colorFill(curDestPtr, fillLen, bgcolor); + } else { + if (y == pY && pX >= start1 && pX < start1 + fillLen) + return true; + } } } } @@ -801,14 +807,22 @@ void Bitmap::putDibRB(int32 *palette) { } if (y <= endy) { - curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y); - paletteFill(curDestPtr, (byte *)srcPtr2, fillLen, (int32 *)palette); + if (pX == -1) { + curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y); + paletteFill(curDestPtr, (byte *)srcPtr2, fillLen, (int32 *)palette); + } else { + if (y == pY && pX >= start1 && pX < start1 + fillLen) + return true; + } } } } } - g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty); + if (pX == -1) + g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty); + + return false; } void Bitmap::putDibCB(int32 *palette) { diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index ccfc72f96f..f4b13d6fbf 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -45,7 +45,7 @@ struct Bitmap { void load(Common::ReadStream *s); void putDib(int x, int y, int32 *palette); - void putDibRB(int32 *palette); + bool putDibRB(int32 *palette, int x = -1, int y = -1); void putDibCB(int32 *palette); void colorFill(uint16 *dest, int len, int color); @@ -63,7 +63,7 @@ struct Bitmap { void drawRotated(int x, int y, int angle, byte *palette); bool isPixelHitAtPos(int x, int y); - bool decompressRle2(Bitmap *res); + bool isPixelAtHitPosRB(int x, int y); }; class Picture : public MemoryObject { -- cgit v1.2.3 From 6b242c0f9f02332697d36c6706df86cd674408ed Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 5 Sep 2013 00:13:16 +0300 Subject: FULLPIPE: Implement GameObject::canInteractAny() --- engines/fullpipe/gfx.cpp | 25 ++++++++++++++++++++++-- engines/fullpipe/gfx.h | 2 +- engines/fullpipe/interaction.cpp | 41 +++++++++++++++++++++++++++++++++++++++- engines/fullpipe/interaction.h | 5 +++++ engines/fullpipe/statics.cpp | 2 ++ engines/fullpipe/utils.cpp | 2 +- engines/fullpipe/utils.h | 6 ++++-- 7 files changed, 76 insertions(+), 7 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index a38203375b..1cb6b85b34 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -26,6 +26,8 @@ #include "fullpipe/gfx.h" #include "fullpipe/statics.h" #include "fullpipe/scene.h" +#include "fullpipe/interaction.h" +#include "fullpipe/gameloader.h" #include "common/memstream.h" @@ -147,6 +149,7 @@ PictureObject::PictureObject() { _ox2 = 0; _oy2 = 0; _pictureObject2List = 0; + _objtype = kObjTypePictureObject; } PictureObject::PictureObject(PictureObject *src) : GameObject(src) { @@ -154,6 +157,7 @@ PictureObject::PictureObject(PictureObject *src) : GameObject(src) { _ox2 = _ox; _oy2 = _oy; _pictureObject2List = src->_pictureObject2List; + _objtype = kObjTypePictureObject; } bool PictureObject::load(MfcArchive &file, bool bigPicture) { @@ -339,8 +343,25 @@ void GameObject::renumPictures(CPtrList *lst) { free(buf); } -bool GameObject::canInteractAny(GameObject *obj2, int a3) { - warning("STUB: GameObject::canInteractAny()"); +bool GameObject::canInteractAny(GameObject *obj2, int invId) { + int sceneId = 0; + + if (g_fullpipe->_currentScene) + sceneId = g_fullpipe->_currentScene->_sceneId; + + CInteractionController *intC = getGameLoaderInteractionController(); + for (CObList::iterator i = intC->_interactions.begin(); i != intC->_interactions.end(); ++i) { + CInteraction *intr = (CInteraction *)*i; + + if (intr->_sceneId > 0 && intr->_sceneId != sceneId) + break; + + if (invId == -3) { + invId = getGameLoaderInventory()->getSelectedItemId(); + } + if (intr->canInteract(this, obj2, invId)) + return true; + } return false; } diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index f4b13d6fbf..d09a589704 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -142,7 +142,7 @@ class GameObject : public CObject { void clearFlags() { _flags = 0; } const char *getName() { return _objectName; } - bool canInteractAny(GameObject *obj2, int a3); + bool canInteractAny(GameObject *obj2, int invId); }; class PictureObject : public GameObject { diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index b25a20949f..53dc50f2cf 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -37,8 +37,42 @@ bool CInteractionController::load(MfcArchive &file) { return _interactions.load(file); } +int static_compSceneId = 0; + +bool CInteractionController::compareInteractions(const void *p1, const void *p2) { + CInteraction *i1 = (CInteraction *)p1; + CInteraction *i2 = (CInteraction *)p2; + + if ( i2->_sceneId < i1->_sceneId) { + if ( i1->_sceneId != static_compSceneId) + return false; + } + if (i2->_sceneId != i1->_sceneId) { + if (i1->_sceneId > 0 && i2->_sceneId == static_compSceneId) + return false; + if (i2->_sceneId != i1->_sceneId) + return true; + } + if (i2->_objectId3 == -1) + goto LABEL_17; + if (i2->_objectId3 == -2) + goto LABEL_18; + if (i1->_objectId3 != -1 && i1->_objectId3 != -2) { +LABEL_17: + if (i2->_objectId3 != -2 ) + return true; +LABEL_18: + if (i1->_objectId3 != -1) + return true; + } + + return false; +} + void CInteractionController::sortInteractions(int sceneId) { - warning("STUB: CInteractionController::sortInteractions(%d)", sceneId); + static_compSceneId = sceneId; + + Common::sort(_interactions.begin(), _interactions.end(), CInteractionController::compareInteractions); } int CInteractionController::handleInteraction(GameObject *subject, GameObject *object, int invId) { @@ -85,6 +119,11 @@ bool CInteraction::load(MfcArchive &file) { return true; } +bool CInteraction::canInteract(GameObject *obj1, GameObject *obj2, int invId) { + warning("STUB: CInteraction::canInteract()"); + return true; +} + bool EntranceInfo::load(MfcArchive &file) { debug(5, "EntranceInfo::load()"); diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h index a0bd54b704..b336641dc1 100644 --- a/engines/fullpipe/interaction.h +++ b/engines/fullpipe/interaction.h @@ -34,6 +34,7 @@ class StaticANIObject; int handleObjectInteraction(GameObject *subject, GameObject *object, int invId); class CInteraction : public CObject { + public: int16 _objectId1; int16 _objectId2; int16 _objectId3; @@ -52,6 +53,7 @@ class CInteraction : public CObject { public: CInteraction(); virtual bool load(MfcArchive &file); + bool canInteract(GameObject *obj1, GameObject *obj2, int invId); }; class CInteractionController : public CObject { @@ -60,6 +62,9 @@ class CInteractionController : public CObject { int16 _field_20; bool _flag24; + private: + static bool compareInteractions(const void *p1, const void *p2); + public: CInteractionController() : _field_20(0), _flag24(true) {} diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index c54c6df25d..08e848274e 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -102,6 +102,7 @@ StaticANIObject::StaticANIObject() { _field_32 = 0; _field_96 = 0; _messageNum = 0; + _objtype = kObjTypeStaticANIObject; } StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { @@ -121,6 +122,7 @@ StaticANIObject::StaticANIObject(StaticANIObject *src) : GameObject(src) { _sceneId = src->_sceneId; _callback1 = src->_callback1; _callback2 = src->_callback2; + _objtype = kObjTypeStaticANIObject; for (uint i = 0; i < src->_staticsList.size(); i++) _staticsList.push_back(new Statics((Statics *)src->_staticsList[i], 0)); diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp index fb777cc4f2..ee73aeaa64 100644 --- a/engines/fullpipe/utils.cpp +++ b/engines/fullpipe/utils.cpp @@ -54,7 +54,7 @@ bool CObList::load(MfcArchive &file) { debug(9, "CObList::[%d]", i); CObject *t = file.readClass(); - push_back(*t); + push_back(t); } return true; diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index 9ebbe887f0..f828a21f5d 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -66,7 +66,9 @@ class MfcArchive : public Common::SeekableReadStream { enum ObjType { kObjTypeDefault, - kObjTypeObjstateCommand + kObjTypeObjstateCommand, + kObjTypeStaticANIObject, + kObjTypePictureObject }; class CObject { @@ -80,7 +82,7 @@ class CObject { bool loadFile(const char *fname); }; -class CObList : public Common::List, public CObject { +class CObList : public Common::List, public CObject { public: virtual bool load(MfcArchive &file); }; -- cgit v1.2.3 From 39e126f3c42b6326cb7b42759dc60289f7d2ff97 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 5 Sep 2013 22:59:39 +0300 Subject: FULLPIPE: Implement CInteraction::canInteract() --- engines/fullpipe/interaction.cpp | 54 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index 53dc50f2cf..b3cdeba63d 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -24,6 +24,7 @@ #include "fullpipe/interaction.h" #include "fullpipe/gameloader.h" +#include "fullpipe/statics.h" namespace Fullpipe { @@ -120,7 +121,58 @@ bool CInteraction::load(MfcArchive &file) { } bool CInteraction::canInteract(GameObject *obj1, GameObject *obj2, int invId) { - warning("STUB: CInteraction::canInteract()"); + if (_sceneId > 0 && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_sceneId != _sceneId) + return false; + + if (_flags & 0x20000) + return false; + + if (!obj2) + return false; + if (obj2->_id != _objectId1) + return false; + + if ((_flags & 8) && (_flags & 1)) { + if (!obj2->_objtype != kObjTypeStaticANIObject) + return false; + + StaticANIObject *st = (StaticANIObject *)obj2; + + if (!st->_statics) + return false; + + if (st->_statics->_staticsId != _staticsId1) { + if (_staticsId1) + return false; + } + } + + if ((_objectId3 != invId && _objectId3 != -1 && _objectId3 != -2) || (!invId && _objectId3 == -2)) + return false; + + if (_objectState1) { + if (_flags & 0x10) { + if ((g_fullpipe->getObjectState(obj1->getName()) & _objectState1) == 0) + return false; + } else { + if (g_fullpipe->getObjectState(obj1->getName()) != _objectState1) + return false; + } + } + + if (_objectState2) { + if (_flags & 0x10) { + if ((g_fullpipe->getObjectState(obj2->getName()) & _objectState2) == 0) + return false; + } else { + if (g_fullpipe->getObjectState(obj2->getName()) != _objectState2) + return false; + } + } + + if (_objectId2 && (!obj1 || _objectId2 != obj1->_id)) + return false; + return true; } -- cgit v1.2.3 From 8b885d4c7e662699e7377e0cadb48ebf7f177d0d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 14:56:29 +0300 Subject: FULLPIPE: Make engine conditionally compilable as dynamic plugin --- engines/fullpipe/module.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/module.mk b/engines/fullpipe/module.mk index 41ed3e31f6..380f582c08 100644 --- a/engines/fullpipe/module.mk +++ b/engines/fullpipe/module.mk @@ -23,7 +23,7 @@ MODULE_OBJS = \ utils.o # This module can be built as a plugin -ifdef BUILD_PLUGINS +ifeq ($(ENABLE_FULLPIPE), DYNAMIC_PLUGIN) PLUGIN := 1 endif -- cgit v1.2.3 From 0f1cc868966bc6f6bcd135a3b0b79fbab0d4edbe Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 14:57:49 +0300 Subject: FULLPIPE: Use consistent include guard --- engines/fullpipe/fullpipe.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 5b0ea4437c..5d9bdcc045 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -20,8 +20,8 @@ * */ -#ifndef FULLPIPE_H -#define FULLPIPE_H +#ifndef FULLPIPE_FULLPIPE_H +#define FULLPIPE_FULLPIPE_H #include "common/scummsys.h" #include "common/events.h" @@ -238,4 +238,4 @@ extern Vars *g_vars; } // End of namespace Fullpipe -#endif /* FULLPIPE_H */ +#endif /* FULLPIPE_FULLPIPE_H */ -- cgit v1.2.3 From 7c8570d4990b4ac56048399df31b116e9fe14808 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 15:25:53 +0300 Subject: FULLPIPE: Remove unused class --- engines/fullpipe/utils.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/utils.h b/engines/fullpipe/utils.h index f828a21f5d..76a1ae944c 100644 --- a/engines/fullpipe/utils.h +++ b/engines/fullpipe/utils.h @@ -144,12 +144,6 @@ class CDWordArray : public Common::Array, public CObject { virtual bool load(MfcArchive &file); }; -struct CNode { - CNode *pNext; - CNode *pPrev; - void *data; -}; - typedef Common::Array CPtrList; char *genFileName(int superId, int sceneId, const char *ext); -- cgit v1.2.3 From 1ed2069f86ce94e91232962fa6958d0bc5ba70c9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 15:36:02 +0300 Subject: FULLPIPE: Inherit GlobalMessageQueueList from Common::Array --- engines/fullpipe/messages.cpp | 22 +++++++++++----------- engines/fullpipe/messages.h | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index c24dee47c8..e4dfcf558f 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -446,9 +446,9 @@ void MessageQueue::replaceKeyCode(int key1, int key2) { } MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { - for (CPtrList::iterator s = begin(); s != end(); ++s) { - if (((MessageQueue *)*s)->_id == id) - return (MessageQueue *)*s; + for (Common::Array::iterator s = begin(); s != end(); ++s) { + if ((*s)->_id == id) + return *s; } return 0; @@ -456,7 +456,7 @@ MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { void GlobalMessageQueueList::deleteQueueById(int id) { for (uint i = 0; i < size(); i++) - if (((MessageQueue *)((*this).operator[](i)))->_id == id) { + if (_storage[i]->_id == id) { remove_at(i); disableQueueById(id); @@ -466,8 +466,8 @@ void GlobalMessageQueueList::deleteQueueById(int id) { void GlobalMessageQueueList::removeQueueById(int id) { for (uint i = 0; i < size(); i++) - if (((MessageQueue *)((*this).operator[](i)))->_id == id) { - ((MessageQueue *)((*this).operator[](i)))->_flags &= 0xFD; // It is quite pointless + if (_storage[i]->_id == id) { + _storage[i]->_flags &= 0xFD; // It is quite pointless remove_at(i); disableQueueById(id); @@ -476,16 +476,16 @@ void GlobalMessageQueueList::removeQueueById(int id) { } void GlobalMessageQueueList::disableQueueById(int id) { - for (CPtrList::iterator s = begin(); s != end(); ++s) { - if (((MessageQueue *)*s)->_parId == id) - ((MessageQueue *)*s)->_parId = 0; + for (Common::Array::iterator s = begin(); s != end(); ++s) { + if ((*s)->_parId == id) + (*s)->_parId = 0; } } int GlobalMessageQueueList::compact() { for (uint i = 0; i < size();) { - if (((MessageQueue *)((*this).operator[](i)))->_isFinished) { - disableQueueById(((MessageQueue *)((*this).operator[](i)))->_id); + if (((MessageQueue *)_storage[i])->_isFinished) { + disableQueueById(_storage[i]->_id); remove_at(i); } else { i++; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 3611ae0127..676432574b 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -135,7 +135,7 @@ class MessageQueue : public CObject { bool checkGlobalExCommandList2(); }; -class GlobalMessageQueueList : public CPtrList { +class GlobalMessageQueueList : public Common::Array { public: MessageQueue *getMessageQueueById(int id); void deleteQueueById(int id); -- cgit v1.2.3 From e672452462efed37c244b38210a958858ca156cd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 15:37:57 +0300 Subject: FULLPIPE: Added guard #define --- engines/fullpipe/objectnames.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objectnames.h b/engines/fullpipe/objectnames.h index 3eaaf7046f..015df727e9 100644 --- a/engines/fullpipe/objectnames.h +++ b/engines/fullpipe/objectnames.h @@ -22,6 +22,11 @@ // This file is used in order to avoid usage of constants in Russian accross the code +#ifndef FULLPIPE_OBJECTNAMES_H +#define FULLPIPE_OBJECTNAMES_H + +namespace Fullpipe { + #define sO_Grandma "\xc1\xe0\xe1\xf3\xeb\xff" // "Бабуля" #define sO_Jar_4 "\xc1\xe0\xed\xea\xe0_4" // "Банка_4" #define sO_Pool "\xc1\xe0\xf1\xf1\xe5\xe9\xed" // "Бассейн" @@ -239,3 +244,7 @@ #define sO_Egg1 "\xdf\xe9\xf6\xee\x31" // "Яйцо1" #define sO_Egg2 "\xdf\xe9\xf6\xee\x32" // "Яйцо2" #define sO_Egg3 "\xdf\xe9\xf6\xee\x33" // "Яйцо3" + +} // End of namespace Fullpipe + +#endif /* FULLPIPE_OBJECTNAMES_H */ -- cgit v1.2.3 From f7d10b5b8f08d2b13db0c1db8263ac4f67433c86 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 15:40:41 +0300 Subject: FULLPIPE: Turn Sc2Array into typedef --- engines/fullpipe/objects.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index dd1545ffb0..55686acaec 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -86,8 +86,7 @@ class Sc2 : public CObject { virtual bool load(MfcArchive &file); }; -class Sc2Array : public Common::Array { -}; +typedef Common::Array Sc2Array; union VarValue { float floatValue; -- cgit v1.2.3 From a5800dfe1a34f040d6cef9d0b7a8d7213ebafe5e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 15:49:13 +0300 Subject: FULLPIPE: Fixed compiler warning --- engines/fullpipe/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 1cb6b85b34..5f77f76310 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -676,7 +676,7 @@ bool Bitmap::isPixelHitAtPos(int x, int y) { if (_flags & 0x1000000) { switch (_type) { case 'CB\0\0': - if (_pixels[off] == _flags & 0xff) + if (_pixels[off] == (_flags & 0xff)) return false; break; case 'CB\x05e': -- cgit v1.2.3 From 0b88635ef44998d6594b70f71163adb6f950ed76 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 15:50:49 +0300 Subject: FULLPIPE: Fix const'ness --- engines/fullpipe/interaction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index b3cdeba63d..9b480dfeb1 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -41,8 +41,8 @@ bool CInteractionController::load(MfcArchive &file) { int static_compSceneId = 0; bool CInteractionController::compareInteractions(const void *p1, const void *p2) { - CInteraction *i1 = (CInteraction *)p1; - CInteraction *i2 = (CInteraction *)p2; + const CInteraction *i1 = (const CInteraction *)p1; + const CInteraction *i2 = (const CInteraction *)p2; if ( i2->_sceneId < i1->_sceneId) { if ( i1->_sceneId != static_compSceneId) -- cgit v1.2.3 From c55862a378f3c8d76fcfafaad1c2e993e663da46 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 15:51:36 +0300 Subject: FULLPIPE: Fix const'ness --- engines/fullpipe/scene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 66e5ee3f80..18d6a888b7 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -435,7 +435,7 @@ void Scene::initObjectCursors(const char *varname) { } bool Scene::compareObjPriority(const void *p1, const void *p2) { - if (((StaticANIObject *)p1)->_priority > ((StaticANIObject *)p2)->_priority) + if (((const StaticANIObject *)p1)->_priority > ((const StaticANIObject *)p2)->_priority) return true; return false; -- cgit v1.2.3 From af91d2a5ce61f395b207854e589ae917c623818f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 15:58:05 +0300 Subject: FULLPIPE: Whitespace fix --- engines/fullpipe/gameloader.cpp | 2 +- engines/fullpipe/gfx.cpp | 2 +- engines/fullpipe/input.cpp | 2 +- engines/fullpipe/interaction.cpp | 6 +++--- engines/fullpipe/inventory.cpp | 2 +- engines/fullpipe/modal.cpp | 2 +- engines/fullpipe/statics.cpp | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index a91065fe87..f48c407a57 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -170,7 +170,7 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { return true; } - if (_sc2array[sc2idx]._entranceDataCount <= 0 ) + if (_sc2array[sc2idx]._entranceDataCount <= 0) return false; int entranceIdx; diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 5f77f76310..c46bdfab55 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -633,7 +633,7 @@ bool Picture::isPixelHitAtPos(int x, int y) { if (x < _x || y < _y || x >= _x + _width || y >= _y + _height) return false; - if (!_bitmap ) + if (!_bitmap) init(); _bitmap->_x = _x; diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index eb528f0ac1..f71a524c48 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -202,7 +202,7 @@ void FullpipeEngine::updateCursorsCommon() { _cursorId = PIC_CSR_GOFAR_R; return; } - if (_mouseVirtX - _sceneRect.left < 47 && _sceneRect.left > 0 ) { + if (_mouseVirtX - _sceneRect.left < 47 && _sceneRect.left > 0) { _cursorId = PIC_CSR_GOFAR_L; return; } diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index 9b480dfeb1..a5977c04bc 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -44,8 +44,8 @@ bool CInteractionController::compareInteractions(const void *p1, const void *p2) const CInteraction *i1 = (const CInteraction *)p1; const CInteraction *i2 = (const CInteraction *)p2; - if ( i2->_sceneId < i1->_sceneId) { - if ( i1->_sceneId != static_compSceneId) + if (i2->_sceneId < i1->_sceneId) { + if (i1->_sceneId != static_compSceneId) return false; } if (i2->_sceneId != i1->_sceneId) { @@ -60,7 +60,7 @@ bool CInteractionController::compareInteractions(const void *p1, const void *p2) goto LABEL_18; if (i1->_objectId3 != -1 && i1->_objectId3 != -2) { LABEL_17: - if (i2->_objectId3 != -2 ) + if (i2->_objectId3 != -2) return true; LABEL_18: if (i1->_objectId3 != -1) diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 41940f4b2d..1abd369e7b 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -386,7 +386,7 @@ bool CInventory2::unselectItem(bool flag) { int CInventory2::getHoveredItem(Common::Point *point) { int selId = getSelectedItemId(); - if (point->y <= 20 && !_isInventoryOut && !_isLocked ) + if (point->y <= 20 && !_isInventoryOut && !_isLocked) slideOut(); if (!selId && point->y >= 55) { diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp index f7bc633ca6..6f1bc0cc1f 100644 --- a/engines/fullpipe/modal.cpp +++ b/engines/fullpipe/modal.cpp @@ -75,7 +75,7 @@ bool CModalIntro::handleMessage(ExCommand *message) { if (message->_messageNum != 36) return false; - if (message->_keyCode != 13 && message->_keyCode != 27 && message->_keyCode != 32 ) + if (message->_keyCode != 13 && message->_keyCode != 27 && message->_keyCode != 32) return false; if (_needRedraw) { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 08e848274e..7f083101f9 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -256,7 +256,7 @@ void StaticANIObject::queueMessageQueue(MessageQueue *mq) { } MessageQueue *StaticANIObject::getMessageQueue() { - if (this->_messageQueueId <= 0 ) + if (this->_messageQueueId <= 0) return 0; return g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId); @@ -1389,7 +1389,7 @@ void Movement::loadPixelData() { mov = i; for (uint i = 0; i < _dynamicPhases.size(); i++) { - if ((Statics *)_dynamicPhases[i] != mov->_staticsObj2 || !(mov->_staticsObj2->_staticsId & 0x4000) ) + if ((Statics *)_dynamicPhases[i] != mov->_staticsObj2 || !(mov->_staticsObj2->_staticsId & 0x4000)) ((Statics *)_dynamicPhases[i])->getPixelData(); } -- cgit v1.2.3 From 6226b5862d2d3800a88985ed83946ea9e941a556 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 16:17:37 +0300 Subject: FULLPIPE: Replace goto usage --- engines/fullpipe/interaction.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index a5977c04bc..231fe57afa 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -55,19 +55,15 @@ bool CInteractionController::compareInteractions(const void *p1, const void *p2) return true; } if (i2->_objectId3 == -1) - goto LABEL_17; - if (i2->_objectId3 == -2) - goto LABEL_18; - if (i1->_objectId3 != -1 && i1->_objectId3 != -2) { -LABEL_17: - if (i2->_objectId3 != -2) - return true; -LABEL_18: - if (i1->_objectId3 != -1) - return true; - } + return true; + + if (i1->_objectId3 == i2->_objectId3) + return true; - return false; + if (i1->_objectId3 == -1 || i1->_objectId3 == -2) + return false; + + return true; } void CInteractionController::sortInteractions(int sceneId) { -- cgit v1.2.3 From ec650efb477d9b5df159d37a6b16d628166bab9c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Sep 2013 21:40:02 +0300 Subject: FULLPIPE: Fix mouse event handling --- engines/fullpipe/fullpipe.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index bc8a4ae320..11808e95c2 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -279,7 +279,7 @@ void FullpipeEngine::updateEvents() { break; case Common::EVENT_MOUSEMOVE: if (_recordEvents) { - ex = new ExCommand(0, 17, 31, event.mouse.x, event.mouse.x, 0, 1, 0, 0, 0); + ex = new ExCommand(0, 17, 31, event.mouse.x, event.mouse.y, 0, 1, 0, 0, 0); ex->_excFlags |= 3; ex->handle(); } @@ -291,7 +291,7 @@ void FullpipeEngine::updateEvents() { break; case Common::EVENT_RBUTTONDOWN: if (!_inputArFlag && (_updateTicks - _lastInputTicks) >= 2) { - ex = new ExCommand(0, 17, 107, event.mouse.x, event.mouse.x, 0, 1, 0, 0, 0); + ex = new ExCommand(0, 17, 107, event.mouse.x, event.mouse.y, 0, 1, 0, 0, 0); ex->_excFlags |= 3; _lastInputTicks = _updateTicks; ex->handle(); @@ -299,7 +299,7 @@ void FullpipeEngine::updateEvents() { break; case Common::EVENT_LBUTTONDOWN: if (!_inputArFlag && (_updateTicks - _lastInputTicks) >= 2) { - ex = new ExCommand(0, 17, 29, event.mouse.x, event.mouse.x, 0, 1, 0, 0, 0); + ex = new ExCommand(0, 17, 29, event.mouse.x, event.mouse.y, 0, 1, 0, 0, 0); ex->_sceneClickX = _sceneRect.left + ex->_x; ex->_sceneClickY = _sceneRect.top + ex->_y; -- cgit v1.2.3 From 940c686858d9a0bf92c1473b9a81653a9937b88a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Sep 2013 22:57:56 +0300 Subject: FULLPIPE: Implement CInteraction::isOverlapping() --- engines/fullpipe/interaction.cpp | 17 +++++++++++++---- engines/fullpipe/interaction.h | 3 ++- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index 231fe57afa..f9ea41b2ae 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -72,10 +72,8 @@ void CInteractionController::sortInteractions(int sceneId) { Common::sort(_interactions.begin(), _interactions.end(), CInteractionController::compareInteractions); } -int CInteractionController::handleInteraction(GameObject *subject, GameObject *object, int invId) { - warning("STUB: CInteractionController::handleInteraction()"); - - return 0; +bool CInteractionController::handleInteraction(GameObject *subj, GameObject *obj, int invId) { + return true; } CInteraction::CInteraction() { @@ -172,6 +170,17 @@ bool CInteraction::canInteract(GameObject *obj1, GameObject *obj2, int invId) { return true; } +bool CInteraction::isOverlapping(StaticANIObject *subj, StaticANIObject *obj) { + if (abs(_xOffs + obj->_ox - subj->_ox) <= 1 + && abs(obj->_oy + _yOffs - subj->_oy) <= 1) { + if (!this->_staticsId2 || subj->_statics != 0 && subj->_statics->_staticsId == _staticsId2) { + if (!_staticsId1 || !(_flags & 1) || obj->_statics != 0 && obj->_statics->_staticsId == _staticsId1) + return true; + } + } + return false; +} + bool EntranceInfo::load(MfcArchive &file) { debug(5, "EntranceInfo::load()"); diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h index b336641dc1..d5ea5eaf9c 100644 --- a/engines/fullpipe/interaction.h +++ b/engines/fullpipe/interaction.h @@ -54,6 +54,7 @@ class CInteraction : public CObject { CInteraction(); virtual bool load(MfcArchive &file); bool canInteract(GameObject *obj1, GameObject *obj2, int invId); + bool isOverlapping(StaticANIObject *subj, StaticANIObject *obj); }; class CInteractionController : public CObject { @@ -75,7 +76,7 @@ class CInteractionController : public CObject { void sortInteractions(int sceneId); - int handleInteraction(GameObject *subject, GameObject *object, int invId); + bool handleInteraction(GameObject *subj, GameObject *obj, int invId); }; struct EntranceInfo { -- cgit v1.2.3 From 747e70a38ebd08450714fdb01dd45139ac9504a1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 8 Sep 2013 23:53:02 +0300 Subject: FULLPIPE: Implement CInteractionController::handleInteraction() --- engines/fullpipe/gfx.cpp | 89 +++++++++++ engines/fullpipe/gfx.h | 2 + engines/fullpipe/interaction.cpp | 309 ++++++++++++++++++++++++++++++++++++++- engines/fullpipe/interaction.h | 6 +- engines/fullpipe/messages.cpp | 32 ++++ engines/fullpipe/messages.h | 3 + engines/fullpipe/motion.cpp | 14 +- engines/fullpipe/motion.h | 3 + engines/fullpipe/statics.cpp | 55 ++----- engines/fullpipe/statics.h | 4 +- 10 files changed, 466 insertions(+), 51 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index c46bdfab55..c6024d15e0 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -365,6 +365,95 @@ bool GameObject::canInteractAny(GameObject *obj2, int invId) { return false; } +bool GameObject::getPicAniInfo(PicAniInfo *info) { + if (_objtype == kObjTypePictureObject) { + info->type = 2; + info->objectId = _id; + info->sceneId = 0; + info->field_8 = _okeyCode; + info->flags = _flags; + info->field_24 = _field_8; + info->ox = _ox; + info->oy = _oy; + info->priority = _priority; + + return true; + } + + if (_objtype == kObjTypeStaticANIObject) { + StaticANIObject *ani = (StaticANIObject *)this; + + info->type = (ani->_messageQueueId << 16) | 1; + info->objectId = ani->_id; + info->field_8 = ani->_okeyCode; + info->sceneId = ani->_sceneId; + info->flags = ani->_flags; + info->field_24 = ani->_field_8; + if (ani->_movement) { + info->ox = ani->_movement->_ox; + info->oy = ani->_movement->_oy; + } else { + info->ox = ani->_ox; + info->oy = ani->_oy; + } + info->priority = ani->_priority; + + if (ani->_statics) + info->staticsId = ani->_statics->_staticsId; + + if (ani->_movement) { + info->movementId = ani->_movement->_id; + info->dynamicPhaseIndex = ani->_movement->_currDynamicPhaseIndex; + } + + info->someDynamicPhaseIndex = ani->_someDynamicPhaseIndex; + + return true; + } + + return false; +} + +bool GameObject::setPicAniInfo(PicAniInfo *picAniInfo) { + if (!(picAniInfo->type & 3)) { + warning("StaticANIObject::setPicAniInfo(): Wrong type: %d", picAniInfo->type); + + return false; + } + + if (picAniInfo->type & 3) { + setOXY(picAniInfo->ox, picAniInfo->oy); + _priority = picAniInfo->priority; + _okeyCode = picAniInfo->field_8; + setFlags(picAniInfo->flags); + _field_8 = picAniInfo->field_24; + } + + if (picAniInfo->type & 1) { + StaticANIObject *ani = (StaticANIObject *)this; + + ani->_messageQueueId = (picAniInfo->type >> 16) & 0xffff; + + if (picAniInfo->staticsId) { + ani->_statics = ani->getStaticsById(picAniInfo->staticsId); + } else { + ani->_statics = 0; + } + + if (picAniInfo->movementId) { + ani->_movement = ani->getMovementById(picAniInfo->movementId); + if (ani->_movement) + ani->_movement->setDynamicPhaseIndex(picAniInfo->dynamicPhaseIndex); + } else { + ani->_movement = 0; + } + + ani->setSomeDynamicPhaseIndex(picAniInfo->someDynamicPhaseIndex); + } + + return true; +} + Picture::Picture() { _x = 0; _y = 0; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index d09a589704..10b82efede 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -143,6 +143,8 @@ class GameObject : public CObject { const char *getName() { return _objectName; } bool canInteractAny(GameObject *obj2, int invId); + bool getPicAniInfo(PicAniInfo *info); + bool setPicAniInfo(PicAniInfo *info); }; class PictureObject : public GameObject { diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index f9ea41b2ae..4153724b63 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -25,10 +25,11 @@ #include "fullpipe/interaction.h" #include "fullpipe/gameloader.h" #include "fullpipe/statics.h" +#include "fullpipe/motion.h" namespace Fullpipe { -int handleObjectInteraction(GameObject *subject, GameObject *object, int invId) { +int handleObjectInteraction(StaticANIObject *subject, GameObject *object, int invId) { return getGameLoaderInteractionController()->handleInteraction(subject, object, invId); } @@ -72,7 +73,303 @@ void CInteractionController::sortInteractions(int sceneId) { Common::sort(_interactions.begin(), _interactions.end(), CInteractionController::compareInteractions); } -bool CInteractionController::handleInteraction(GameObject *subj, GameObject *obj, int invId) { +bool CInteractionController::handleInteraction(StaticANIObject *subj, GameObject *obj, int invId) { + if (subj) { + if (!subj->isIdle() || (subj->_flags & 0x100)) + return false; + } + + if (!_interactions.size()) + return false; + + CInteraction *inter = 0; + CInteraction *previnter = 0; + int dur = 0; + int mindur = 0xFFFF; + + MessageQueue *mq; + ExCommand *ex; + + for (CObList::iterator i = _interactions.begin(); i != _interactions.end(); ++i) { + CInteraction *cinter = (CInteraction *)*i; + + if (!cinter->canInteract(subj, obj, invId)) + continue; + + if ((inter || cinter->_objectId2) && (!obj || cinter->_objectId3 != obj->_id)) { + if (cinter->_messageQueue) + cinter->_messageQueue->calcDuration(subj); + + PicAniInfo aniInfo; + + obj->getPicAniInfo(&aniInfo); + + if (cinter->_staticsId1) { + StaticANIObject *ani = (StaticANIObject *)obj; + ani->_messageQueueId = 0; + ani->changeStatics2(cinter->_staticsId1); + } + int xpos = cinter->_xOffs + obj->_ox; + int ypos = cinter->_yOffs + obj->_oy; + + obj->setPicAniInfo(&aniInfo); + + if (abs(xpos - subj->_ox) > 1 || abs(ypos - subj->_oy) > 1) { + mq = getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->method4C(subj, xpos, ypos, 1, cinter->_staticsId2); + if (mq) { + dur = mq->calcDuration(subj); + delete mq; + } else { + dur = 0x10000; + } + inter = previnter; + } else { + dur = 0; + } + if (dur < mindur) { + inter = cinter; + mindur = dur; + previnter = cinter; + } + } else { + inter = cinter; + break; + } + } + + if (!inter) + return false; + + if (!inter->_objectId2) { + StaticANIObject *ani = (StaticANIObject *)obj; + + if (!ani->isIdle()) + return false; + + if (ani->_flags & 0x100) + return false; + + if (!inter->_staticsId1 || !(inter->_flags & 1)) + goto LABEL_38; + + if (ani->_movement || ani->_statics == 0 || ani->_statics->_staticsId != inter->_staticsId1) { + mq = ani->changeStatics1(inter->_staticsId1); + if (!mq) + return false; + + ex = new ExCommand((subj ? subj->_id : 0), 55, 0, 0, 0, 0, 1, 0, 0, 0); + ex->_x = obj->_id; + ex->_y = obj->_okeyCode; + ex->_keyCode = subj ? subj->_okeyCode : 0; + ex->_excFlags = 3; + ex->_field_14 = (obj->_objtype != kObjTypePictureObject); + ex->_field_20 = invId; + mq->_exCommands.push_back(ex); + + if (mq->_isFinished) { + mq->_isFinished = 0; + ani->queueMessageQueue(mq); + } + } else { + if (ani->getMessageQueue()) + ani->queueMessageQueue(0); +LABEL_38: + if (inter->_messageQueue) { + mq = new MessageQueue(inter->_messageQueue, 0, 1); + mq->changeParam28ForObjectId(ani->_id, -1, ani->_okeyCode); + + if (!mq->chain(0)) + return false; + } + } + return true; + } + + if (obj && !subj) + return true; + + if (!obj || inter->_objectId3 == obj->_id) { + if (subj) { + if (inter->_messageQueue) { + if (subj->isIdle()) { + mq = new MessageQueue(inter->_messageQueue, 0, 1); + + if (!mq->chain(subj)) { + if (mq) + delete mq; + + return false; + } + } + } + } + return true; + } + + if (inter->isOverlapping(subj, obj)) { + if (obj->_objtype == kObjTypeStaticANIObject) { + StaticANIObject *ani = (StaticANIObject *)obj; + + ani->queueMessageQueue(0); + + if (inter->_staticsId1) + ani->changeStatics2(inter->_staticsId1); + + if (!(inter->_flags & 0x10000)) + obj->_flags |= 0x80; + } + + if (!inter->_messageQueue) + return false; + + subj->setOXY(inter->_xOffs + obj->_ox, inter->_yOffs + obj->_oy); + + mq = new MessageQueue(inter->_messageQueue, 0, 1); + mq->changeParam28ForObjectId(obj->_id, -1, obj->_okeyCode); + mq->_flags |= 1; + + if (!(inter->_flags & 0x10000)) { + ex = new ExCommand(obj->_id, 34, 0x80, 0, 0, 0, 1, 0, 0, 0); + ex->_keyCode = obj->_okeyCode; + ex->_field_14 = 0x100; + ex->_messageNum = 0; + ex->_excFlags = 3; + mq->_exCommands.push_back(ex); + } + + ex = new ExCommand(obj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0); + ex->_keyCode = obj->_okeyCode; + ex->_field_14 = 0x100; + ex->_messageNum = 0; + ex->_excFlags = 3; + mq->_exCommands.push_back(ex); + + ex = new ExCommand(subj->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0); + ex->_keyCode = subj->_okeyCode; + ex->_field_14 = 0x100; + ex->_messageNum = 0; + ex->_excFlags = 3; + mq->_exCommands.push_back(ex); + + ex = new ExCommand(subj->_id, 17, 0x40, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + ex->_keyCode = 0; + mq->_exCommands.push_back(ex); + + if (!mq->chain(subj)) { + delete mq; + + return false; + } + + subj->_flags |= 1; + obj->_flags |= 1; + } else { + bool someFlag = false; + PicAniInfo aniInfo; + + obj->getPicAniInfo(&aniInfo); + + if (obj->_objtype == kObjTypeStaticANIObject && inter->_staticsId1) { + StaticANIObject *ani = (StaticANIObject *)obj; + + ani->_messageQueueId = 0; + ani->changeStatics2(inter->_staticsId1); + } + + int xpos = inter->_yOffs + obj->_ox; + int ypos = inter->_yOffs + obj->_oy; + + obj->setPicAniInfo(&aniInfo); + + if (abs(xpos - subj->_ox) > 1 || abs(ypos - subj->_oy) > 1 + || (inter->_staticsId2 != 0 && (subj->_statics == 0 || subj->_statics->_staticsId != inter->_staticsId2))) { + mq = getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->method34(subj, xpos, ypos, 1, inter->_staticsId2); + + if (!mq) + return false; + + ex = new ExCommand(subj->_id, 55, 0, 0, 0, 0, 1, 0, 0, 0); + ex->_x = obj->_id; + ex->_y = obj->_okeyCode; + ex->_keyCode = subj->_okeyCode; + ex->_excFlags = 3; + ex->_field_20 = invId; + ex->_field_14 = (obj->_objtype != kObjTypePictureObject); + mq->_exCommands.push_back(ex); + + someFlag = true; + + ex = new ExCommand(subj->_id, 17, 0x40, 0, 0, 0, 1, 0, 0, 0); + ex->_x = xpos; + ex->_y = ypos; + ex->_excFlags |= 3; + ex->_keyCode = 6; + ex->_field_14 = obj->_id; + ex->_field_20 = obj->_okeyCode; + ex->postMessage(); + } + + if (!inter->_staticsId1 || !(inter->_flags & 1)) + return true; + + StaticANIObject *ani = (StaticANIObject *)obj; + + if (!ani->isIdle()) + return false; + + if (ani->getMessageQueue()) + ani->queueMessageQueue(0); + + if (!ani->_statics || ani->_statics->_staticsId != inter->_staticsId1 || ani->_movement) { + mq = ani->changeStatics1(inter->_staticsId1); + + if (!mq) + return false; + + if (someFlag) { + if (!(inter->_flags & 0x10000)) { + if (mq->_isFinished) { + ani->_flags |= 0x80u; + } else { + ex = new ExCommand(ani->_id, 34, 0x80, 0, 0, 0, 1, 0, 0, 0); + ex->_field_14 = 0x80; + ex->_keyCode = ani->_okeyCode; + ex->_excFlags = 3; + mq->_exCommands.push_back(ex); + } + } + ex = new ExCommand(ani->_id, 34, 0x100, 0, 0, 0, 1, 0, 0, 0); + ex->_keyCode = ani->_okeyCode; + ex->_field_14 = 0x100; + ex->_excFlags = 3; + mq->_exCommands.push_back(ex); + } else { + ex = new ExCommand(subj->_id, 55, 0, 0, 0, 0, 1, 0, 0, 0); + ex->_x = ani->_id; + ex->_y = ani->_okeyCode; + ex->_keyCode = subj->_okeyCode; + ex->_excFlags = 2; + ex->_field_14 = (obj->_objtype != kObjTypePictureObject); + ex->_field_20 = invId; + mq->_exCommands.push_back(ex); + + if (!mq->_isFinished) + return true; + + mq->_isFinished = 0; + ani->queueMessageQueue(mq); + } + } else { + obj->_flags |= 1; + + if (inter->_flags & 0x10000) + return true; + + obj->_flags |= 0x80; + } + } + return true; } @@ -170,11 +467,13 @@ bool CInteraction::canInteract(GameObject *obj1, GameObject *obj2, int invId) { return true; } -bool CInteraction::isOverlapping(StaticANIObject *subj, StaticANIObject *obj) { +bool CInteraction::isOverlapping(StaticANIObject *subj, GameObject *obj) { + StaticANIObject *ani = (StaticANIObject *)obj; + if (abs(_xOffs + obj->_ox - subj->_ox) <= 1 && abs(obj->_oy + _yOffs - subj->_oy) <= 1) { - if (!this->_staticsId2 || subj->_statics != 0 && subj->_statics->_staticsId == _staticsId2) { - if (!_staticsId1 || !(_flags & 1) || obj->_statics != 0 && obj->_statics->_staticsId == _staticsId1) + if (!_staticsId2 || subj->_statics != 0 && subj->_statics->_staticsId == _staticsId2) { + if (!_staticsId1 || !(_flags & 1) || ani->_statics != 0 && ani->_statics->_staticsId == _staticsId1) return true; } } diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h index d5ea5eaf9c..e3090334fe 100644 --- a/engines/fullpipe/interaction.h +++ b/engines/fullpipe/interaction.h @@ -31,7 +31,7 @@ class GameObject; class MessageQueue; class StaticANIObject; -int handleObjectInteraction(GameObject *subject, GameObject *object, int invId); +int handleObjectInteraction(StaticANIObject *subject, GameObject *object, int invId); class CInteraction : public CObject { public: @@ -54,7 +54,7 @@ class CInteraction : public CObject { CInteraction(); virtual bool load(MfcArchive &file); bool canInteract(GameObject *obj1, GameObject *obj2, int invId); - bool isOverlapping(StaticANIObject *subj, StaticANIObject *obj); + bool isOverlapping(StaticANIObject *subj, GameObject *obj); }; class CInteractionController : public CObject { @@ -76,7 +76,7 @@ class CInteractionController : public CObject { void sortInteractions(int sceneId); - bool handleInteraction(GameObject *subj, GameObject *obj, int invId); + bool handleInteraction(StaticANIObject *subj, GameObject *obj, int invId); }; struct EntranceInfo { diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index e4dfcf558f..acf44f5729 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -445,6 +445,38 @@ void MessageQueue::replaceKeyCode(int key1, int key2) { } } +int MessageQueue::calcDuration(StaticANIObject *obj) { + int res; + ExCommand *ex; + Movement *mov; + + for (uint i = 0; (ex = getExCommandByIndex(i)); i++) + if (ex->_parentId == obj->_id) { + if (ex->_messageKind == 1 || ex->_messageKind == 20) { + if ((mov = obj->getMovementById(ex->_messageNum)) != 0) { + if (ex->_field_14 >= 1) + res += ex->_field_14; + else + res += mov->calcDuration(); + } + } + } + + return res; +} + +void MessageQueue::changeParam28ForObjectId(int objId, int oldParam28, int newParam28) { + for (uint i = 0; i < _exCommands.size(); i++) { + ExCommand *ex = getExCommandByIndex(i); + int k = ex->_messageKind; + + if ((k == 1 || k == 20 || k == 5 || k == 6 || k == 2 || k == 18 || k == 19 || k == 22 || k == 55) + && ex->_keyCode == oldParam28 + && ex->_parentId == objId) + ex->_keyCode = newParam28; + } +} + MessageQueue *GlobalMessageQueueList::getMessageQueueById(int id) { for (Common::Array::iterator s = begin(); s != end(); ++s) { if ((*s)->_id == id) diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 676432574b..960e184a88 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -133,6 +133,9 @@ class MessageQueue : public CObject { bool checkGlobalExCommandList1(); bool checkGlobalExCommandList2(); + + int calcDuration(StaticANIObject *obj); + void changeParam28ForObjectId(int objId, int oldParam28, int newParam28); }; class GlobalMessageQueueList : public Common::Array { diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 6d07747c9f..4ba03f123f 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -76,10 +76,22 @@ void CMctlCompound::addObject(StaticANIObject *obj) { warning("STUB: CMctlCompound::addObject()"); } - void CMctlCompound::initMovGraph2() { +void CMctlCompound::initMovGraph2() { warning("STUB: CMctlCompound::initMovGraph2()"); } +MessageQueue *CMctlCompound::method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { + warning("STUB: CMctlCompound::method34()"); + + return 0; +} + +MessageQueue *CMctlCompound::method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId) { + warning("STUB: CMctlCompound::method4C()"); + + return 0; +} + bool CMctlCompoundArray::load(MfcArchive &file) { debug(5, "CMctlCompoundArray::load()"); diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 318a6b383f..f110ac30df 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -62,6 +62,9 @@ class CMctlCompound : public CMotionController { virtual void addObject(StaticANIObject *obj); void initMovGraph2(); + + MessageQueue *method34(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId); + MessageQueue *method4C(StaticANIObject *subj, int xpos, int ypos, int flag, int staticsId); }; class Unk2 : public CObject { diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 7f083101f9..1fd02f8eb6 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -815,46 +815,6 @@ void StaticANIObject::adjustSomeXY() { warning("STUB: StaticANIObject::adjustSomeXY()"); } -bool StaticANIObject::setPicAniInfo(PicAniInfo *picAniInfo) { - if (!(picAniInfo->type & 3)) { - warning("StaticANIObject::setPicAniInfo(): Wrong type: %d", picAniInfo->type); - - return false; - } - - debug(0, "StaticANIObject::setPicAniInfo() (%s [%d]) type: %d, statid: %d, movid: %d", transCyrillic((byte *)_objectName), _id, picAniInfo->type, picAniInfo->staticsId, picAniInfo->movementId); - - if (picAniInfo->type & 3) { - setOXY(picAniInfo->ox, picAniInfo->oy); - _priority = picAniInfo->priority; - _okeyCode = picAniInfo->field_8; - setFlags(picAniInfo->flags); - _field_8 = picAniInfo->field_24; - } - - if (picAniInfo->type & 1) { - _messageQueueId = (picAniInfo->type >> 16) & 0xffff; - - if (picAniInfo->staticsId) { - _statics = getStaticsById(picAniInfo->staticsId); - } else { - _statics = 0; - } - - if (picAniInfo->movementId) { - _movement = getMovementById(picAniInfo->movementId); - if (_movement) - _movement->setDynamicPhaseIndex(picAniInfo->dynamicPhaseIndex); - } else { - _movement = 0; - } - - setSomeDynamicPhaseIndex(picAniInfo->someDynamicPhaseIndex); - } - - return true; -} - MessageQueue *StaticANIObject::changeStatics1(int msgNum) { warning("STUB: StaticANIObject::changeStatics1(%d)", msgNum); @@ -1358,6 +1318,21 @@ void Movement::updateCurrDynamicPhase() { } } +int Movement::calcDuration() { + int res = 0; + + if (_currMovement) + for (uint i = 0; i < _currMovement->_dynamicPhases.size(); i++) { + res += ((DynamicPhase *)_currMovement->_dynamicPhases[i])->_initialCountdown; + } + else + for (uint i = 0; i < _dynamicPhases.size(); i++) { + res += ((DynamicPhase *)_dynamicPhases[i])->_initialCountdown; + } + + return res; +} + void Movement::setDynamicPhaseIndex(int index) { debug(7, "Movement::setDynamicPhaseIndex(%d)", index); while (_currDynamicPhaseIndex < index) diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 295da9b676..3d45ac6623 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -145,6 +145,8 @@ class Movement : public GameObject { void setDynamicPhaseIndex(int index); DynamicPhase *getDynamicPhaseByIndex(int idx); + int calcDuration(); + void removeFirstPhase(); bool gotoNextFrame(int callback1, void (*callback2)(int *)); bool gotoPrevFrame(); @@ -207,8 +209,6 @@ class StaticANIObject : public GameObject { void initMovements(); void loadMovementsPixelData(); - bool setPicAniInfo(PicAniInfo *picAniInfo); - void setSomeDynamicPhaseIndex(int val) { _someDynamicPhaseIndex = val; } void adjustSomeXY(); -- cgit v1.2.3 From 693ed1e988e164b738e019aaf9e7b5999d2b14a4 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 00:35:19 +0300 Subject: FULLPIPE: Drop game platform in autogenerated gameid since only Windows version existed --- engines/fullpipe/detection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/detection.cpp b/engines/fullpipe/detection.cpp index 4cb46ba1c5..8c4a422333 100644 --- a/engines/fullpipe/detection.cpp +++ b/engines/fullpipe/detection.cpp @@ -52,7 +52,7 @@ static const ADGameDescription gameDescriptions[] = { AD_ENTRY1s("0654.sc2", "099f54f86d33ad2395f3b854b7e05058", 2272), Common::RU_RUS, Common::kPlatformWindows, - ADGF_NO_FLAGS, + ADGF_DROPPLATFORM, GUIO1(GUIO_NONE) }, @@ -63,7 +63,7 @@ static const ADGameDescription gameDescriptions[] = { AD_ENTRY1s("0654.sc2", "d8743351fc53d205f42d91f6d791e51b", 2272), Common::RU_RUS, Common::kPlatformWindows, - ADGF_NO_FLAGS, + ADGF_DROPPLATFORM, GUIO1(GUIO_NONE) }, -- cgit v1.2.3 From b165dd8a06971d182c623d913f4306a945e7ecbc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 00:36:42 +0300 Subject: FULLPIPE: Fix warnings --- engines/fullpipe/interaction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index 4153724b63..cdf39d29ae 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -472,8 +472,8 @@ bool CInteraction::isOverlapping(StaticANIObject *subj, GameObject *obj) { if (abs(_xOffs + obj->_ox - subj->_ox) <= 1 && abs(obj->_oy + _yOffs - subj->_oy) <= 1) { - if (!_staticsId2 || subj->_statics != 0 && subj->_statics->_staticsId == _staticsId2) { - if (!_staticsId1 || !(_flags & 1) || ani->_statics != 0 && ani->_statics->_staticsId == _staticsId1) + if (!_staticsId2 || (subj->_statics != 0 && subj->_statics->_staticsId == _staticsId2)) { + if (!_staticsId1 || !(_flags & 1) || (ani->_statics != 0 && ani->_statics->_staticsId == _staticsId1)) return true; } } -- cgit v1.2.3 From fdafc7c39102dc0643537028755f0a89e347cb4d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 00:37:39 +0300 Subject: FULLPIPE: Fix warning --- engines/fullpipe/messages.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index acf44f5729..818753ab22 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -446,7 +446,7 @@ void MessageQueue::replaceKeyCode(int key1, int key2) { } int MessageQueue::calcDuration(StaticANIObject *obj) { - int res; + int res = 0; ExCommand *ex; Movement *mov; -- cgit v1.2.3 From 3cce3f9a91bdcab5ca0335db9f2f0a3625195b19 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 07:38:02 +0300 Subject: FULLPIPE: Fix function prototype --- engines/fullpipe/gfx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index 10b82efede..b4ac3e3450 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -48,7 +48,7 @@ struct Bitmap { bool putDibRB(int32 *palette, int x = -1, int y = -1); void putDibCB(int32 *palette); - void colorFill(uint16 *dest, int len, int color); + void colorFill(uint16 *dest, int len, int32 color); void paletteFill(uint16 *dest, byte *src, int len, int32 *palette); void copierKeyColor(uint16 *dest, byte *src, int len, int keyColor, int32 *palette, bool cb05_format); void copier(uint16 *dest, byte *src, int len, int32 *palette, bool cb05_format); -- cgit v1.2.3 From 6ca4b7d5146d282ff3d41efa70f92cfe877beafc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 21:04:42 +0300 Subject: FULLPIPE: Fix logical error. CID 1086778 --- engines/fullpipe/interaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index cdf39d29ae..270f5b5a87 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -424,7 +424,7 @@ bool CInteraction::canInteract(GameObject *obj1, GameObject *obj2, int invId) { return false; if ((_flags & 8) && (_flags & 1)) { - if (!obj2->_objtype != kObjTypeStaticANIObject) + if (obj2->_objtype != kObjTypeStaticANIObject) return false; StaticANIObject *st = (StaticANIObject *)obj2; -- cgit v1.2.3 From a6231b83d186897c3a4c5b759e9f81572b815e9f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 21:08:06 +0300 Subject: FULLPIPE: Remove unnecessary check. CID 1086775 --- engines/fullpipe/interaction.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index 270f5b5a87..0b47dadb31 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -195,8 +195,7 @@ LABEL_38: mq = new MessageQueue(inter->_messageQueue, 0, 1); if (!mq->chain(subj)) { - if (mq) - delete mq; + delete mq; return false; } -- cgit v1.2.3 From 33f975a446325d37947c5634b83a26cbb622db5f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 21:15:47 +0300 Subject: FULLPIPE: Do not continue unnecessary function. CID 1086777 --- engines/fullpipe/interaction.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index 0b47dadb31..91dc8961d5 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -77,6 +77,9 @@ bool CInteractionController::handleInteraction(StaticANIObject *subj, GameObject if (subj) { if (!subj->isIdle() || (subj->_flags & 0x100)) return false; + } else { + error("CInteractionController::handleInteraction(): subj is null"); + return false; } if (!_interactions.size()) -- cgit v1.2.3 From 18bbf4a2eb6e972175c5b503ce3e7728c3059ace Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 21:21:39 +0300 Subject: FULLPIPE: Fix logical error. CID 1086776 --- engines/fullpipe/scenes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 0c06e03b75..f4e771af56 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -979,7 +979,7 @@ int global_messageHandler3(ExCommand *cmd) { cmd->_messageKind = 0; return result; } - if (ani2->canInteractAny(pic, cmd->_keyCode)) { + if (!ani2 || ani2->canInteractAny(pic, cmd->_keyCode)) { if (!ani2 || (ani2->isIdle() && !(ani2->_flags & 0x80) && !(ani2->_flags & 0x100))) handleObjectInteraction(ani2, pic, cmd->_keyCode); return 1; -- cgit v1.2.3 From fa8027203c0e3aea23e3b15f6a2382d0fbfc56b5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Sep 2013 23:23:33 +0300 Subject: FULLPIPE: Started debug scene --- engines/fullpipe/constants.h | 1 + engines/fullpipe/gameloader.cpp | 3 +++ engines/fullpipe/scenes.cpp | 59 ++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/scenes.h | 2 ++ 4 files changed, 64 insertions(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 5048bf9795..f99e679e4e 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -90,6 +90,7 @@ namespace Fullpipe { #define PIC_SC1_LADDER 1091 #define PIC_SC1_OSK 1018 #define PIC_SC1_OSK2 2932 +#define PIC_SCD_SEL 734 #define SC_1 301 #define SC_10 653 #define SC_11 654 diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index f48c407a57..a44501b17d 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -173,6 +173,9 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { if (_sc2array[sc2idx]._entranceDataCount <= 0) return false; + if (sceneId == 726) + return true; + int entranceIdx; for (entranceIdx = 0; _sc2array[sc2idx]._entranceData[entranceIdx]->_field_4 != entranceId; entranceIdx++) { if (entranceIdx >= _sc2array[sc2idx]._entranceDataCount) diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index f4e771af56..bedfa4c80e 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -53,6 +53,9 @@ void scene01_fixEntrance(); void scene01_initScene(Scene *sc, int entrance); int sceneHandler01(ExCommand *cmd); +void sceneDbgMenu_initScene(Scene *sc); +int sceneHandlerDbgMenu(ExCommand *cmd); + Vars::Vars() { sceneIntro_aniin1man = 0; sceneIntro_needSleep = true; @@ -632,6 +635,7 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { addMessageHandler(sceneHandlerFinal1, 2); _updateCursorCallback = sceneFinal1_updateCursor; break; +#endif case SC_DBGMENU: sceneVar = _gameLoader->_gameVar->getSubVarByName("SC_DBGMENU"); @@ -641,7 +645,6 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { scene->initObjectCursors("SC_DBGMENU"); addMessageHandler(sceneHandlerDbgMenu, 2); break; -#endif default: _behaviorManager->initBehavior(0, 0); @@ -847,6 +850,7 @@ int global_messageHandler2(ExCommand *cmd) { switch (cmd->_messageNum) { case 0x44c8: + error("0x44c8"); // Unk3_sub_4477A0(&unk3, _parentId, _field_14 != 0); break; @@ -1430,4 +1434,57 @@ int sceneHandler01(ExCommand *cmd) { return res; } +void sceneDbgMenu_initScene(Scene *sc) { + g_vars->selector = sc->getPictureObjectById(PIC_SCD_SEL, 0); + getGameLoaderInteractionController()->disableFlag24(); + setInputDisabled(0); +} + +int sceneHandlerDbgMenu(ExCommand *ex) { + if (ex->_messageKind != 17) + return 0; +#if 0 + int mx = g_fullpipe->_mouseScreenPos.x + g_sceneRect.left; + int my = g_fullpipe->_mouseScreenPos.y + g_sceneRect.top; + + if (ex->_messageNum == 29) { + GameObject *obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my); + if (obj && GameObject_canInteractAny(0, obj, -3) ) { + getGameLoaderInteractionController()->enableFlag24(); + handleObjectInteraction(0, obj, 0); + } + return 0; + } + if (ex->_messageNum != 33) { + if (ex->_messageNum == MSG_RESTARTGAME) { + g_fullpipe->_needRestart = true; + return 0; + } + return 0; + } + + g_fullpipe->_cursorId = PIC_CSR_DEFAULT; + GameObject *obj = g_fullpipe->_currentScene->getStaticANIObjectAtPos(mx, my); + if (obj) { + if (GameObject_canInteractAny(0, obj, -3)) { + g_cursorId = PIC_CSR_DEFAULT; + input_setCursor(PIC_CSR_DEFAULT); + return 0; + } + } else { + obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my); + if (obj && GameObject_canInteractAny(0, obj, -3) ) { + g_vars->selector->_flags |= 4; + g_vars->selector->setOXY(obj->_ox, obj->_oy); + g_fullpipe->_cursorId = PIC_CSR_DEFAULT; + input_setCursor(PIC_CSR_DEFAULT); + return 0; + } + g_vars->selector->_flags &= 0xFFFB; + } + input_setCursor(g_cursorId); +#endif + return 0; +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h index ae5f2dafb1..be42838920 100644 --- a/engines/fullpipe/scenes.h +++ b/engines/fullpipe/scenes.h @@ -44,6 +44,8 @@ class Vars { PictureObject *scene01_picSc01Osk; PictureObject *scene01_picSc01Osk2; + + GameObject *selector; }; } // End of namespace Fullpipe -- cgit v1.2.3 From fda471ee800ed2e9ef3f4b3369dc508155d0c82e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 10 Sep 2013 09:52:36 +0300 Subject: FULLPIPE: Fix stupid type. CID 1072975 --- engines/fullpipe/inventory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 1abd369e7b..1e229f3408 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -319,7 +319,7 @@ bool CInventory2::handleLeftClick(ExCommand *cmd) { if (!_isInventoryOut) return false; - bool res = false; + bool res = false; for (uint i = 0; i < _inventoryIcons.size(); i++) { if (cmd->_x >= _inventoryIcons[i]->x1 && cmd->_x <= _inventoryIcons[i]->x2 && @@ -343,8 +343,8 @@ bool CInventory2::handleLeftClick(ExCommand *cmd) { } } - if (!res) - unselectItem(this); + if (!res) + unselectItem(0); return res; } -- cgit v1.2.3 From 59d989d8c1f423f53761669aa007943ca649c2bc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 10 Sep 2013 09:56:06 +0300 Subject: FULLPIPE: Add sanity check. CID 1063218 --- engines/fullpipe/messages.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 818753ab22..0fa2f6d8a0 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -644,6 +644,9 @@ bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id) if (curItem) curItem = curItem->nextItem; + if (!curItem) + return false; + bool res = allocMessageHandler(curItem, id, callback, index); if (res) -- cgit v1.2.3 From b3f0d87e3bf36bb4159b12b345dc18cbb5c6d3fc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 10 Sep 2013 09:57:57 +0300 Subject: FULLPIPE: Remove noop code. CID 1063230 --- engines/fullpipe/messages.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 0fa2f6d8a0..478112f75c 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -272,9 +272,6 @@ bool MessageQueue::load(MfcArchive &file) { } bool MessageQueue::chain(StaticANIObject *ani) { - if (ani) - ani->isIdle(); - if (checkGlobalExCommandList1() && checkGlobalExCommandList2()) { if (!(getFlags() & 2)) { g_fullpipe->_globalMessageQueueList->addMessageQueue(this); -- cgit v1.2.3 From 1583ae66bf955d72f84ae793d6cc513fc97a2778 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 10 Sep 2013 10:06:21 +0300 Subject: FULLPIPE: Add stub warning. --- engines/fullpipe/motion.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 4ba03f123f..41265dcd8a 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -105,6 +105,7 @@ bool CMctlCompoundArray::load(MfcArchive &file) { } CMovGraph::CMovGraph() { + warning("STUB: CMovGraph::CMovGraph()"); _itemsCount = 0; _items = 0; //_callback1 = CMovGraphCallback1; // TODO -- cgit v1.2.3 From f628b7e20d48402be093e1b334a416a0f381f94c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 10 Sep 2013 10:09:42 +0300 Subject: FULLPIPE: Remove unused class variable --- engines/fullpipe/motion.h | 1 - 1 file changed, 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index f110ac30df..89a98967fb 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -80,7 +80,6 @@ class CMovGraphNode : public CObject { int _y; int _distance; int16 _field_10; - int16 _field_12; int _field_14; public: -- cgit v1.2.3 From 7509ffec339ddd09fe9109717a5c35dbfe127671 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 10 Sep 2013 22:36:14 +0300 Subject: FULLPIPE: Move GameObject::canInteractAny() out of the class --- engines/fullpipe/gfx.cpp | 22 ---------------------- engines/fullpipe/gfx.h | 1 - engines/fullpipe/input.cpp | 3 ++- engines/fullpipe/interaction.cpp | 23 +++++++++++++++++++++++ engines/fullpipe/interaction.h | 2 ++ engines/fullpipe/scenes.cpp | 10 +++++----- 6 files changed, 32 insertions(+), 29 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index c6024d15e0..e16d56cd8d 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -343,28 +343,6 @@ void GameObject::renumPictures(CPtrList *lst) { free(buf); } -bool GameObject::canInteractAny(GameObject *obj2, int invId) { - int sceneId = 0; - - if (g_fullpipe->_currentScene) - sceneId = g_fullpipe->_currentScene->_sceneId; - - CInteractionController *intC = getGameLoaderInteractionController(); - for (CObList::iterator i = intC->_interactions.begin(); i != intC->_interactions.end(); ++i) { - CInteraction *intr = (CInteraction *)*i; - - if (intr->_sceneId > 0 && intr->_sceneId != sceneId) - break; - - if (invId == -3) { - invId = getGameLoaderInventory()->getSelectedItemId(); - } - if (intr->canInteract(this, obj2, invId)) - return true; - } - return false; -} - bool GameObject::getPicAniInfo(PicAniInfo *info) { if (_objtype == kObjTypePictureObject) { info->type = 2; diff --git a/engines/fullpipe/gfx.h b/engines/fullpipe/gfx.h index b4ac3e3450..82e082d8cb 100644 --- a/engines/fullpipe/gfx.h +++ b/engines/fullpipe/gfx.h @@ -142,7 +142,6 @@ class GameObject : public CObject { void clearFlags() { _flags = 0; } const char *getName() { return _objectName; } - bool canInteractAny(GameObject *obj2, int invId); bool getPicAniInfo(PicAniInfo *info); bool setPicAniInfo(PicAniInfo *info); }; diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index f71a524c48..8cc7654f52 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -28,6 +28,7 @@ #include "fullpipe/scene.h" #include "fullpipe/gameloader.h" #include "fullpipe/statics.h" +#include "fullpipe/interaction.h" #include "fullpipe/constants.h" namespace Fullpipe { @@ -169,7 +170,7 @@ void FullpipeEngine::updateCursorsCommon() { return; } } - if (_aniMan->canInteractAny(ani, selId)) { + if (canInteractAny(_aniMan, ani, selId)) { _cursorId = selId > 0 ? PIC_CSR_ITN_INV : PIC_CSR_ITN; return; } diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index 91dc8961d5..f392a084dd 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -33,6 +33,28 @@ int handleObjectInteraction(StaticANIObject *subject, GameObject *object, int in return getGameLoaderInteractionController()->handleInteraction(subject, object, invId); } +bool canInteractAny(GameObject *obj1, GameObject *obj2, int invId) { + int sceneId = 0; + + if (g_fullpipe->_currentScene) + sceneId = g_fullpipe->_currentScene->_sceneId; + + CInteractionController *intC = getGameLoaderInteractionController(); + for (CObList::iterator i = intC->_interactions.begin(); i != intC->_interactions.end(); ++i) { + CInteraction *intr = (CInteraction *)*i; + + if (intr->_sceneId > 0 && intr->_sceneId != sceneId) + break; + + if (invId == -3) { + invId = getGameLoaderInventory()->getSelectedItemId(); + } + if (intr->canInteract(obj1, obj2, invId)) + return true; + } + return false; +} + bool CInteractionController::load(MfcArchive &file) { debug(5, "CInteractionController::load()"); @@ -422,6 +444,7 @@ bool CInteraction::canInteract(GameObject *obj1, GameObject *obj2, int invId) { if (!obj2) return false; + if (obj2->_id != _objectId1) return false; diff --git a/engines/fullpipe/interaction.h b/engines/fullpipe/interaction.h index e3090334fe..28a03fb496 100644 --- a/engines/fullpipe/interaction.h +++ b/engines/fullpipe/interaction.h @@ -32,6 +32,8 @@ class MessageQueue; class StaticANIObject; int handleObjectInteraction(StaticANIObject *subject, GameObject *object, int invId); +bool canInteractAny(GameObject *obj1, GameObject *obj2, int invId); + class CInteraction : public CObject { public: diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index bedfa4c80e..980dae7f62 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -971,7 +971,7 @@ int global_messageHandler3(ExCommand *cmd) { cmd->_messageKind = 0; return result; } - if (ani2->canInteractAny(ani, cmd->_keyCode)) { + if (canInteractAny(ani2, ani, cmd->_keyCode)) { handleObjectInteraction(ani2, ani, cmd->_keyCode); return 1; } @@ -983,7 +983,7 @@ int global_messageHandler3(ExCommand *cmd) { cmd->_messageKind = 0; return result; } - if (!ani2 || ani2->canInteractAny(pic, cmd->_keyCode)) { + if (!ani2 || canInteractAny(ani2, pic, cmd->_keyCode)) { if (!ani2 || (ani2->isIdle() && !(ani2->_flags & 0x80) && !(ani2->_flags & 0x100))) handleObjectInteraction(ani2, pic, cmd->_keyCode); return 1; @@ -1449,7 +1449,7 @@ int sceneHandlerDbgMenu(ExCommand *ex) { if (ex->_messageNum == 29) { GameObject *obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my); - if (obj && GameObject_canInteractAny(0, obj, -3) ) { + if (obj && canInteractAny(0, obj, -3) ) { getGameLoaderInteractionController()->enableFlag24(); handleObjectInteraction(0, obj, 0); } @@ -1466,14 +1466,14 @@ int sceneHandlerDbgMenu(ExCommand *ex) { g_fullpipe->_cursorId = PIC_CSR_DEFAULT; GameObject *obj = g_fullpipe->_currentScene->getStaticANIObjectAtPos(mx, my); if (obj) { - if (GameObject_canInteractAny(0, obj, -3)) { + if (canInteractAny(0, obj, -3)) { g_cursorId = PIC_CSR_DEFAULT; input_setCursor(PIC_CSR_DEFAULT); return 0; } } else { obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my); - if (obj && GameObject_canInteractAny(0, obj, -3) ) { + if (obj && canInteractAny(0, obj, -3) ) { g_vars->selector->_flags |= 4; g_vars->selector->setOXY(obj->_ox, obj->_oy); g_fullpipe->_cursorId = PIC_CSR_DEFAULT; -- cgit v1.2.3 From 531867cc3cd1cba7d036024a12898126d41195be Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 10 Sep 2013 22:49:39 +0300 Subject: FULLPIPE: Finish sceneHandlerDbgMenu() --- engines/fullpipe/constants.h | 1 + engines/fullpipe/scenes.cpp | 34 ++++++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index f99e679e4e..4f389f80a8 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -36,6 +36,7 @@ namespace Fullpipe { #define MSG_HMRKICK_STUCCO 4765 #define MSG_MANSHADOWSOFF 5196 #define MSG_MANSHADOWSON 5197 +#define MSG_RESTARTGAME 4767 #define MSG_SC1_SHOWOSK 1019 #define MSG_SC1_SHOWOSK2 468 #define MSG_SC1_UTRUBACLICK 1100 diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 980dae7f62..37be7facc9 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -1440,12 +1440,30 @@ void sceneDbgMenu_initScene(Scene *sc) { setInputDisabled(0); } +GameObject *sceneHandlerDbgMenu_getObjectAtXY(int x, int y) { + if (g_fullpipe->_currentScene) + for (uint i = 0; i < g_fullpipe->_currentScene->_picObjList.size(); i++) { + PictureObject *pic = (PictureObject *)g_fullpipe->_currentScene->_picObjList[i]; + + if (x >= pic->_ox && y >= pic->_oy) { + Common::Point point; + + pic->getDimensions(&point); + + if (x <= pic->_ox + point.x && y <= pic->_oy + point.y && pic != g_vars->selector) + return pic; + } + } + + return 0; +} + int sceneHandlerDbgMenu(ExCommand *ex) { if (ex->_messageKind != 17) return 0; -#if 0 - int mx = g_fullpipe->_mouseScreenPos.x + g_sceneRect.left; - int my = g_fullpipe->_mouseScreenPos.y + g_sceneRect.top; + + int mx = g_fullpipe->_mouseScreenPos.x + g_fullpipe->_sceneRect.left; + int my = g_fullpipe->_mouseScreenPos.y + g_fullpipe->_sceneRect.top; if (ex->_messageNum == 29) { GameObject *obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my); @@ -1467,8 +1485,8 @@ int sceneHandlerDbgMenu(ExCommand *ex) { GameObject *obj = g_fullpipe->_currentScene->getStaticANIObjectAtPos(mx, my); if (obj) { if (canInteractAny(0, obj, -3)) { - g_cursorId = PIC_CSR_DEFAULT; - input_setCursor(PIC_CSR_DEFAULT); + g_fullpipe->_cursorId = PIC_CSR_DEFAULT; + g_fullpipe->setCursor(PIC_CSR_DEFAULT); return 0; } } else { @@ -1477,13 +1495,13 @@ int sceneHandlerDbgMenu(ExCommand *ex) { g_vars->selector->_flags |= 4; g_vars->selector->setOXY(obj->_ox, obj->_oy); g_fullpipe->_cursorId = PIC_CSR_DEFAULT; - input_setCursor(PIC_CSR_DEFAULT); + g_fullpipe->setCursor(PIC_CSR_DEFAULT); return 0; } g_vars->selector->_flags &= 0xFFFB; } - input_setCursor(g_cursorId); -#endif + g_fullpipe->setCursor(g_fullpipe->_cursorId); + return 0; } -- cgit v1.2.3 From e1845735689df7e66d27bd88a746b164fdadf661 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 11 Sep 2013 17:57:18 +0300 Subject: FULLPIPE: Fix compilation with MSVC and add a FIXME --- engines/fullpipe/fullpipe.h | 4 ++-- engines/fullpipe/motion.cpp | 2 +- engines/fullpipe/scene.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index 5d9bdcc045..f688151267 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -50,12 +50,12 @@ class CGameVar; class CInputController; class CInventory2; struct CursorInfo; -class EntranceInfo; +struct EntranceInfo; class ExCommand; class GameProject; class GameObject; class GlobalMessageQueueList; -class MessageHandler; +struct MessageHandler; struct MovTable; class NGIArchive; class Scene; diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index 41265dcd8a..514dde5185 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -204,7 +204,7 @@ void CReactParallel::createRegion() { for (int i = 0; i < 4; i++) _points[i] = new Common::Point; - double at = atan2(_x1 - _x2, _y1 - _y2) + 1.570796; + double at = atan2((double)(_x1 - _x2), (double)(_y1 - _y2)) + 1.570796; double sn = sin(at); double cs = cos(at); diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 18d6a888b7..310db18f25 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -596,7 +596,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { v25++; if (v25 >= _bigPictureArray2Count) { - if (!((PictureObject *)_picObjList[0])->_flags & 0x20) + if (!((PictureObject *)_picObjList[0])->_flags & 0x20) // FIXME: looks like a typo break; v25 = 0; } -- cgit v1.2.3 From 5c6ee7573c0cf05bbbb154d4734e94e478f453e5 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 11 Sep 2013 21:35:07 +0300 Subject: FULLPIPE: Add parenthesis --- engines/fullpipe/scene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp index 310db18f25..6ac062fb37 100644 --- a/engines/fullpipe/scene.cpp +++ b/engines/fullpipe/scene.cpp @@ -596,7 +596,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) { v25++; if (v25 >= _bigPictureArray2Count) { - if (!((PictureObject *)_picObjList[0])->_flags & 0x20) // FIXME: looks like a typo + if (!(((PictureObject *)_picObjList[0])->_flags & 0x20)) break; v25 = 0; } -- cgit v1.2.3 From ad43f25c0ff435fc6a51ce4d9ef07d35a5ccef99 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 12 Sep 2013 01:00:20 +0300 Subject: FULLPIPE: Fix debug scene --- engines/fullpipe/gameloader.cpp | 16 +++++++--------- engines/fullpipe/gfx.cpp | 6 ++++-- engines/fullpipe/interaction.cpp | 3 --- 3 files changed, 11 insertions(+), 14 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index a44501b17d..142c278c56 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -163,7 +163,7 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { return false; if (!_sc2array[sc2idx]._isLoaded) - return 0; + return false; if (_sc2array[sc2idx]._entranceDataCount < 1) { g_fullpipe->_currentScene = st->_scene; @@ -173,14 +173,12 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { if (_sc2array[sc2idx]._entranceDataCount <= 0) return false; - if (sceneId == 726) - return true; - - int entranceIdx; - for (entranceIdx = 0; _sc2array[sc2idx]._entranceData[entranceIdx]->_field_4 != entranceId; entranceIdx++) { - if (entranceIdx >= _sc2array[sc2idx]._entranceDataCount) - return false; - } + int entranceIdx = 0; + if (sceneId != 726) // WORKAROUND + for (entranceIdx = 0; _sc2array[sc2idx]._entranceData[entranceIdx]->_field_4 != entranceId; entranceIdx++) { + if (entranceIdx >= _sc2array[sc2idx]._entranceDataCount) + return false; + } CGameVar *sg = _gameVar->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME"); diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index e16d56cd8d..2ab038b74d 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -794,8 +794,10 @@ bool Bitmap::putDibRB(int32 *palette, int pX, int pY) { uint16 *srcPtr2; uint16 *srcPtr; - if (!palette && pX == -1) - error("Bitmap::putDibRB(): Both global and local palettes are empty"); + if (!palette && pX == -1) { + warning("Bitmap::putDibRB(): Both global and local palettes are empty"); + return false; + } debug(8, "Bitmap::putDibRB()"); diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp index f392a084dd..dcc7e90145 100644 --- a/engines/fullpipe/interaction.cpp +++ b/engines/fullpipe/interaction.cpp @@ -99,9 +99,6 @@ bool CInteractionController::handleInteraction(StaticANIObject *subj, GameObject if (subj) { if (!subj->isIdle() || (subj->_flags & 0x100)) return false; - } else { - error("CInteractionController::handleInteraction(): subj is null"); - return false; } if (!_interactions.size()) -- cgit v1.2.3 From 7e08d4f6b290824e43c91cea8cb3b8716144b859 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 12 Sep 2013 21:37:46 +0300 Subject: FULLPIPE: Move PreloadItems to gameloader.h --- engines/fullpipe/gameloader.h | 12 ++++++++++++ engines/fullpipe/objects.h | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index a8d51cd794..73873fb839 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -34,6 +34,18 @@ class CMctlCompound; class CInputController; class CInteractionController; +struct PreloadItem { + int preloadId1; + int preloadId2; + int sceneId; + int field_C; +}; + +class PreloadItems : public Common::Array, public CObject { + public: + virtual bool load(MfcArchive &file); +}; + class CGameLoader : public CObject { public: CGameLoader(); diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 55686acaec..008e684a68 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -117,18 +117,6 @@ class CGameVar : public CObject { CGameVar *getSubVarByIndex(int idx); }; -struct PreloadItem { - int preloadId1; - int preloadId2; - int sceneId; - int field_C; -}; - -class PreloadItems : public Common::Array, public CObject { - public: - virtual bool load(MfcArchive &file); -}; - } // End of namespace Fullpipe #endif /* FULLPIPE_OBJECTS_H */ -- cgit v1.2.3 From 6cd830fb1bfaec9207248bb935d1f9c9c008dd7a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 12 Sep 2013 22:47:45 +0300 Subject: FULLPIPE: Implement CGameLoader::preloadScene() --- engines/fullpipe/gameloader.cpp | 83 +++++++++++++++++++++++++++++++++++++++- engines/fullpipe/gameloader.h | 8 +++- engines/fullpipe/messages.cpp | 4 ++ engines/fullpipe/messages.h | 1 + engines/fullpipe/motion.h | 1 + engines/fullpipe/stateloader.cpp | 6 +-- 6 files changed, 97 insertions(+), 6 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index 142c278c56..fef7f56d46 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -27,6 +27,7 @@ #include "fullpipe/input.h" #include "fullpipe/statics.h" #include "fullpipe/interaction.h" +#include "fullpipe/motion.h" namespace Fullpipe { @@ -227,12 +228,88 @@ bool CGameLoader::gotoScene(int sceneId, int entranceId) { return true; } +bool preloadCallback(const PreloadItem &pre, int flag) { + warning("STUB: preloadCallback"); + + return true; +} + bool CGameLoader::preloadScene(int sceneId, int entranceId) { - warning("STUB: preloadScene(%d, %d), ", sceneId, entranceId); + debug(0, "preloadScene(%d, %d), ", sceneId, entranceId); + + if (_preloadSceneId != sceneId || _preloadEntranceId != entranceId) { + _preloadSceneId = sceneId; + _preloadEntranceId = entranceId; + return true; + } + + int idx = -1; + + for (uint i = 0; i < _preloadItems.size(); i++) + if (_preloadItems[i].preloadId1 == sceneId && _preloadItems[i].preloadId2 == entranceId) { + idx = i; + break; + } + + if (idx == -1) { + _preloadSceneId = 0; + _preloadEntranceId = 0; + return false; + } + + if (_preloadCallback) { + if (!_preloadCallback(_preloadItems[idx], 0)) + return false; + } + + if (g_fullpipe->_currentScene && g_fullpipe->_currentScene->_sceneId == sceneId) + g_fullpipe->_currentScene = 0; + + saveScenePicAniInfos(sceneId); + clearGlobalMessageQueueList1(); + unloadScene(sceneId); + + if (_preloadCallback) + _preloadCallback(_preloadItems[idx], 50); + + loadScene(_preloadItems[idx].sceneId); + + ExCommand *ex = new ExCommand(_preloadItems[idx].sceneId, 17, 62, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags = 2; + ex->_keyCode = _preloadItems[idx].keyCode; + + _preloadSceneId = 0; + _preloadEntranceId = 0; + + if (_preloadCallback) + _preloadCallback(_preloadItems[idx], 100); + + ex->postMessage(); return true; } +bool CGameLoader::unloadScene(int sceneId) { + SceneTag *tag; + int sceneTag = getSceneTagBySceneId(sceneId, &tag); + + if (sceneTag < 0) + return false; + + if (_sc2array[sceneTag]._isLoaded) + saveScenePicAniInfos(sceneId); + + _sc2array[sceneTag]._motionController->freeItems(); + + delete tag->_scene; + tag->_scene = 0; + + _sc2array[sceneTag]._isLoaded = 0; + _sc2array[sceneTag]._scene = 0; + + return true; +} + int CGameLoader::getSceneTagBySceneId(int sceneId, SceneTag **st) { if (_sc2array.size() > 0 && _gameProject->_sceneTagList->size() > 0) { for (uint i = 0; i < _sc2array.size(); i++) { @@ -304,6 +381,10 @@ void CGameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAn } } +void CGameLoader::saveScenePicAniInfos(int sceneId) { + warning("STUB: CGameLoader::saveScenePicAniInfos(%d)", sceneId); +} + void CGameLoader::updateSystems(int counterdiff) { if (g_fullpipe->_currentScene) { g_fullpipe->_currentScene->update(counterdiff); diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 73873fb839..6db9c98fb9 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -38,9 +38,11 @@ struct PreloadItem { int preloadId1; int preloadId2; int sceneId; - int field_C; + int keyCode; }; +bool preloadCallback(const PreloadItem &pre, int flag); + class PreloadItems : public Common::Array, public CObject { public: virtual bool load(MfcArchive &file); @@ -55,11 +57,13 @@ class CGameLoader : public CObject { bool loadScene(int sceneId); bool gotoScene(int sceneId, int entranceId); bool preloadScene(int sceneId, int entranceId); + bool unloadScene(int sceneId); void updateSystems(int counterdiff); int getSceneTagBySceneId(int sceneId, SceneTag **st); void applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAniInfoCount); + void saveScenePicAniInfos(int sceneId); GameProject *_gameProject; CInteractionController *_interactionController; @@ -67,7 +71,7 @@ class CGameLoader : public CObject { CInventory2 _inventory; Sc2Array _sc2array; void *_sceneSwitcher; - void *_preloadCallback; + bool (*_preloadCallback)(const PreloadItem &pre, int flag); void *_readSavegameCallback; int16 _field_F8; int16 _field_FA; diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp index 478112f75c..36fd1399ce 100644 --- a/engines/fullpipe/messages.cpp +++ b/engines/fullpipe/messages.cpp @@ -530,6 +530,10 @@ void GlobalMessageQueueList::addMessageQueue(MessageQueue *msg) { push_back(msg); } +void clearGlobalMessageQueueList1() { + warning("STUB: clearGlobalMessageQueueList1()"); +} + bool removeMessageHandler(int16 id, int pos) { if (g_fullpipe->_messageHandlers) { MessageHandler *curItem = g_fullpipe->_messageHandlers; diff --git a/engines/fullpipe/messages.h b/engines/fullpipe/messages.h index 960e184a88..7ba9126d46 100644 --- a/engines/fullpipe/messages.h +++ b/engines/fullpipe/messages.h @@ -168,6 +168,7 @@ bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id); void clearMessageHandlers(); void processMessages(); void updateGlobalMessageQueue(int id, int objid); +void clearGlobalMessageQueueList1(); } // End of namespace Fullpipe diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 89a98967fb..85a52918f0 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -42,6 +42,7 @@ class CMotionController : public CObject { void clearEnabled() { _isEnabled = false; } virtual void addObject(StaticANIObject *obj) {} + virtual void freeItems() {} }; class CMctlCompoundArray : public Common::Array, public CObject { diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 40169ddf9f..366872c277 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -59,8 +59,8 @@ bool FullpipeEngine::loadGam(const char *fname, int scene) { } // _sceneSwitcher = sceneSwitcher; // substituted with direct call - // _preloadCallback = gameLoaderPreloadCallback - // _readSavegameCallback = gameLoaderReadSavegameCallback; + _gameLoader->_preloadCallback = preloadCallback; + // _readSavegameCallback = gameLoaderReadSavegameCallback; // TODO _aniMan = accessScene(SC_COMMON)->getAniMan(); _scene2 = 0; @@ -155,7 +155,7 @@ bool PreloadItems::load(MfcArchive &file) { t->preloadId1 = file.readUint32LE(); t->preloadId2 = file.readUint32LE(); t->sceneId = file.readUint32LE(); - t->field_C = file.readUint32LE(); + t->keyCode = file.readUint32LE(); push_back(*t); } -- cgit v1.2.3 From e8f4c28d10e072a77aafbed9033991a4bb3da43b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 12 Sep 2013 22:50:55 +0300 Subject: FULLPIPE: Move Sc2 to gameloader.h --- engines/fullpipe/gameloader.cpp | 72 ++++++++++++++++++++++++++++++++++++++++ engines/fullpipe/gameloader.h | 24 ++++++++++++++ engines/fullpipe/objects.h | 25 -------------- engines/fullpipe/stateloader.cpp | 72 ---------------------------------------- 4 files changed, 96 insertions(+), 97 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index fef7f56d46..fa8eddf7f1 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -404,6 +404,78 @@ void CGameLoader::updateSystems(int counterdiff) { } } +Sc2::Sc2() { + _sceneId = 0; + _field_2 = 0; + _scene = 0; + _motionController = 0; + _data1 = 0; + _count1 = 0; + _defPicAniInfos = 0; + _defPicAniInfosCount = 0; + _picAniInfos = 0; + _picAniInfosCount = 0; + _isLoaded = 0; + _entranceData = 0; + _entranceDataCount = 0; +} + +bool Sc2::load(MfcArchive &file) { + debug(5, "Sc2::load()"); + + _sceneId = file.readUint16LE(); + + _motionController = (CMotionController *)file.readClass(); + + _count1 = file.readUint32LE(); + debug(4, "count1: %d", _count1); + if (_count1 > 0) { + _data1 = (int32 *)malloc(_count1 * sizeof(int32)); + + for (int i = 0; i < _count1; i++) { + _data1[i] = file.readUint32LE(); + } + } else { + _data1 = 0; + } + + _defPicAniInfosCount = file.readUint32LE(); + debug(4, "defPicAniInfos: %d", _defPicAniInfosCount); + if (_defPicAniInfosCount > 0) { + _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *)); + + for (int i = 0; i < _defPicAniInfosCount; i++) { + _defPicAniInfos[i] = new PicAniInfo(); + + _defPicAniInfos[i]->load(file); + } + } else { + _defPicAniInfos = 0; + } + + _picAniInfos = 0; + _picAniInfosCount = 0; + + _entranceDataCount = file.readUint32LE(); + debug(4, "_entranceData: %d", _entranceDataCount); + + if (_entranceDataCount > 0) { + _entranceData = (EntranceInfo **)malloc(_entranceDataCount * sizeof(EntranceInfo *)); + + for (int i = 0; i < _entranceDataCount; i++) { + _entranceData[i] = new EntranceInfo(); + _entranceData[i]->load(file); + } + } else { + _entranceData = 0; + } + + if (file.size() - file.pos() > 0) + error("Sc2::load(): (%d bytes left)", file.size() - file.pos()); + + return true; +} + CGameVar *FullpipeEngine::getGameLoaderGameVar() { if (_gameLoader) return _gameLoader->_gameVar; diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 6db9c98fb9..87cd1f1a35 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -33,6 +33,30 @@ class SceneTag; class CMctlCompound; class CInputController; class CInteractionController; +class CMotionController; + +class Sc2 : public CObject { + public: + int16 _sceneId; + int16 _field_2; + Scene *_scene; + CMotionController *_motionController; + int32 *_data1; // FIXME, could be a struct + int _count1; + PicAniInfo **_defPicAniInfos; + int _defPicAniInfosCount; + PicAniInfo **_picAniInfos; + int _picAniInfosCount; + int _isLoaded; + EntranceInfo **_entranceData; + int _entranceDataCount; + + public: + Sc2(); + virtual bool load(MfcArchive &file); +}; + +typedef Common::Array Sc2Array; struct PreloadItem { int preloadId1; diff --git a/engines/fullpipe/objects.h b/engines/fullpipe/objects.h index 008e684a68..9e7c7531a7 100644 --- a/engines/fullpipe/objects.h +++ b/engines/fullpipe/objects.h @@ -63,31 +63,6 @@ struct PicAniInfo { bool load(MfcArchive &file); }; -class CMotionController; - -class Sc2 : public CObject { - public: - int16 _sceneId; - int16 _field_2; - Scene *_scene; - CMotionController *_motionController; - int32 *_data1; // FIXME, could be a struct - int _count1; - PicAniInfo **_defPicAniInfos; - int _defPicAniInfosCount; - PicAniInfo **_picAniInfos; - int _picAniInfosCount; - int _isLoaded; - EntranceInfo **_entranceData; - int _entranceDataCount; - - public: - Sc2(); - virtual bool load(MfcArchive &file); -}; - -typedef Common::Array Sc2Array; - union VarValue { float floatValue; int32 intValue; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 366872c277..dd00361ce9 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -314,78 +314,6 @@ CGameVar *CGameVar::getSubVarByIndex(int idx) { return sub; } -Sc2::Sc2() { - _sceneId = 0; - _field_2 = 0; - _scene = 0; - _motionController = 0; - _data1 = 0; - _count1 = 0; - _defPicAniInfos = 0; - _defPicAniInfosCount = 0; - _picAniInfos = 0; - _picAniInfosCount = 0; - _isLoaded = 0; - _entranceData = 0; - _entranceDataCount = 0; -} - -bool Sc2::load(MfcArchive &file) { - debug(5, "Sc2::load()"); - - _sceneId = file.readUint16LE(); - - _motionController = (CMotionController *)file.readClass(); - - _count1 = file.readUint32LE(); - debug(4, "count1: %d", _count1); - if (_count1 > 0) { - _data1 = (int32 *)malloc(_count1 * sizeof(int32)); - - for (int i = 0; i < _count1; i++) { - _data1[i] = file.readUint32LE(); - } - } else { - _data1 = 0; - } - - _defPicAniInfosCount = file.readUint32LE(); - debug(4, "defPicAniInfos: %d", _defPicAniInfosCount); - if (_defPicAniInfosCount > 0) { - _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *)); - - for (int i = 0; i < _defPicAniInfosCount; i++) { - _defPicAniInfos[i] = new PicAniInfo(); - - _defPicAniInfos[i]->load(file); - } - } else { - _defPicAniInfos = 0; - } - - _picAniInfos = 0; - _picAniInfosCount = 0; - - _entranceDataCount = file.readUint32LE(); - debug(4, "_entranceData: %d", _entranceDataCount); - - if (_entranceDataCount > 0) { - _entranceData = (EntranceInfo **)malloc(_entranceDataCount * sizeof(EntranceInfo *)); - - for (int i = 0; i < _entranceDataCount; i++) { - _entranceData[i] = new EntranceInfo(); - _entranceData[i]->load(file); - } - } else { - _entranceData = 0; - } - - if (file.size() - file.pos() > 0) - error("Sc2::load(): (%d bytes left)", file.size() - file.pos()); - - return true; -} - bool PicAniInfo::load(MfcArchive &file) { debug(5, "PicAniInfo::load()"); -- cgit v1.2.3 From 1e72640cbacac854d87090f86f6a79ba9ccdd522 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 14 Sep 2013 00:08:50 +0300 Subject: FULLPIPE: Fix leaked resource. CID 1063205 --- engines/fullpipe/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp index 7f34412334..821049cd0f 100644 --- a/engines/fullpipe/sound.cpp +++ b/engines/fullpipe/sound.cpp @@ -49,7 +49,7 @@ bool SoundList::load(MfcArchive &file, char *fname) { for (int i = 0; i < _soundItemsCount; i++) { Sound *snd = new Sound(); - _soundItems[i] = 0; + _soundItems[i] = snd; snd->load(file, _libHandle); } -- cgit v1.2.3 From 4db215a511e9829734fb3cae0785a7adb353e816 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 14 Sep 2013 00:14:49 +0300 Subject: FULLPIPE: Move PreloadItem methods where they belong --- engines/fullpipe/gameloader.cpp | 34 +++++++++++++++++++++++++++------- engines/fullpipe/gameloader.h | 2 +- engines/fullpipe/stateloader.cpp | 20 -------------------- 3 files changed, 28 insertions(+), 28 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp index fa8eddf7f1..2a8f64dac9 100644 --- a/engines/fullpipe/gameloader.cpp +++ b/engines/fullpipe/gameloader.cpp @@ -246,7 +246,7 @@ bool CGameLoader::preloadScene(int sceneId, int entranceId) { int idx = -1; for (uint i = 0; i < _preloadItems.size(); i++) - if (_preloadItems[i].preloadId1 == sceneId && _preloadItems[i].preloadId2 == entranceId) { + if (_preloadItems[i]->preloadId1 == sceneId && _preloadItems[i]->preloadId2 == entranceId) { idx = i; break; } @@ -258,7 +258,7 @@ bool CGameLoader::preloadScene(int sceneId, int entranceId) { } if (_preloadCallback) { - if (!_preloadCallback(_preloadItems[idx], 0)) + if (!_preloadCallback(*_preloadItems[idx], 0)) return false; } @@ -270,19 +270,19 @@ bool CGameLoader::preloadScene(int sceneId, int entranceId) { unloadScene(sceneId); if (_preloadCallback) - _preloadCallback(_preloadItems[idx], 50); + _preloadCallback(*_preloadItems[idx], 50); - loadScene(_preloadItems[idx].sceneId); + loadScene(_preloadItems[idx]->sceneId); - ExCommand *ex = new ExCommand(_preloadItems[idx].sceneId, 17, 62, 0, 0, 0, 1, 0, 0, 0); + ExCommand *ex = new ExCommand(_preloadItems[idx]->sceneId, 17, 62, 0, 0, 0, 1, 0, 0, 0); ex->_excFlags = 2; - ex->_keyCode = _preloadItems[idx].keyCode; + ex->_keyCode = _preloadItems[idx]->keyCode; _preloadSceneId = 0; _preloadEntranceId = 0; if (_preloadCallback) - _preloadCallback(_preloadItems[idx], 100); + _preloadCallback(*_preloadItems[idx], 100); ex->postMessage(); @@ -476,6 +476,26 @@ bool Sc2::load(MfcArchive &file) { return true; } +bool PreloadItems::load(MfcArchive &file) { + debug(5, "PreloadItems::load()"); + + int count = file.readCount(); + + resize(count); + + for (int i = 0; i < count; i++) { + PreloadItem *t = new PreloadItem(); + t->preloadId1 = file.readUint32LE(); + t->preloadId2 = file.readUint32LE(); + t->sceneId = file.readUint32LE(); + t->keyCode = file.readUint32LE(); + + push_back(t); + } + + return true; +} + CGameVar *FullpipeEngine::getGameLoaderGameVar() { if (_gameLoader) return _gameLoader->_gameVar; diff --git a/engines/fullpipe/gameloader.h b/engines/fullpipe/gameloader.h index 87cd1f1a35..2f1f57a5e2 100644 --- a/engines/fullpipe/gameloader.h +++ b/engines/fullpipe/gameloader.h @@ -67,7 +67,7 @@ struct PreloadItem { bool preloadCallback(const PreloadItem &pre, int flag); -class PreloadItems : public Common::Array, public CObject { +class PreloadItems : public Common::Array, public CObject { public: virtual bool load(MfcArchive &file); }; diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index dd00361ce9..55d74c4c86 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -143,26 +143,6 @@ GameProject::~GameProject() { free(_headerFilename); } -bool PreloadItems::load(MfcArchive &file) { - debug(5, "PreloadItems::load()"); - - int count = file.readCount(); - - resize(count); - - for (int i = 0; i < count; i++) { - PreloadItem *t = new PreloadItem(); - t->preloadId1 = file.readUint32LE(); - t->preloadId2 = file.readUint32LE(); - t->sceneId = file.readUint32LE(); - t->keyCode = file.readUint32LE(); - - push_back(*t); - } - - return true; -} - CGameVar::CGameVar() { _subVars = 0; _parentVarObj = 0; -- cgit v1.2.3 From 763eedd0df5aed045e121b9256c6664278451d68 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 14 Sep 2013 00:17:43 +0300 Subject: FULLPIPE: Fix condition. CID 1063217 --- engines/fullpipe/statics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 1fd02f8eb6..7d692ab444 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -549,7 +549,7 @@ void StaticANIObject::draw2() { MovTable *StaticANIObject::countMovements() { CGameVar *preloadSubVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("PRELOAD"); - if (preloadSubVar || preloadSubVar->getSubVarsCount() == 0) + if (!preloadSubVar || preloadSubVar->getSubVarsCount() == 0) return 0; MovTable *movTable = new MovTable; -- cgit v1.2.3 From d09cccd7f245bd2d5ddfba18fceb5eb13449600d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 15 Sep 2013 01:53:19 +0300 Subject: FULLPIPE: Added few destructors. --- engines/fullpipe/statics.cpp | 13 +++++++++++++ engines/fullpipe/statics.h | 3 +++ 2 files changed, 16 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp index 7d692ab444..ac80e809c1 100644 --- a/engines/fullpipe/statics.cpp +++ b/engines/fullpipe/statics.cpp @@ -1020,6 +1020,11 @@ Statics::Statics() { _staticsName = 0; } +Statics::~Statics() { + delete _picture; + free(_staticsName); +} + Statics::Statics(Statics *src, bool reverse) : DynamicPhase(src, reverse) { _staticsId = src->_staticsId; @@ -1603,6 +1608,10 @@ DynamicPhase::DynamicPhase() { _someY = 0; } +DynamicPhase::~DynamicPhase() { + delete _rect; +} + DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) { _field_7C = src->_field_7C; _field_7E = 0; @@ -1698,6 +1707,10 @@ StaticPhase::StaticPhase() { _exCommand = 0; } +StaticPhase::~StaticPhase() { + delete _exCommand; +} + bool StaticPhase::load(MfcArchive &file) { debug(5, "StaticPhase::load()"); diff --git a/engines/fullpipe/statics.h b/engines/fullpipe/statics.h index 3d45ac6623..03d87c8e32 100644 --- a/engines/fullpipe/statics.h +++ b/engines/fullpipe/statics.h @@ -56,6 +56,7 @@ class StaticPhase : public Picture { public: StaticPhase(); + virtual ~StaticPhase(); virtual bool load(MfcArchive &file); @@ -74,6 +75,7 @@ class DynamicPhase : public StaticPhase { public: DynamicPhase(); DynamicPhase(DynamicPhase *src, bool reverse); + virtual ~DynamicPhase(); virtual bool load(MfcArchive &file); @@ -89,6 +91,7 @@ class Statics : public DynamicPhase { public: Statics(); Statics(Statics *src, bool reverse); + virtual ~Statics(); virtual bool load(MfcArchive &file); Statics *getStaticsById(int itemId); -- cgit v1.2.3 From 127261ac740592ae16542be5cb0419d75ad2fb9b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 15 Sep 2013 01:59:13 +0300 Subject: FULLPIPE: Initialize class variable. CID 1063187 --- engines/fullpipe/stateloader.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp index 55d74c4c86..4c58d564dd 100644 --- a/engines/fullpipe/stateloader.cpp +++ b/engines/fullpipe/stateloader.cpp @@ -104,6 +104,8 @@ GameProject::GameProject() { _field_4 = 0; _headerFilename = 0; _field_10 = 12; + + _sceneTagList = 0; } bool GameProject::load(MfcArchive &file) { -- cgit v1.2.3 From fcdaa86831a964b82b17bafc4c87bc86387ebf13 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 15 Sep 2013 02:01:20 +0300 Subject: FULLPIPE: Initialize 'selector'. CID 1063200 --- engines/fullpipe/scenes.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp index 37be7facc9..f6620a2fc7 100644 --- a/engines/fullpipe/scenes.cpp +++ b/engines/fullpipe/scenes.cpp @@ -70,6 +70,8 @@ Vars::Vars() { scene01_picSc01Osk = 0; scene01_picSc01Osk2 = 0; + + selector = 0; } bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) { -- cgit v1.2.3 From 2196916b62777e9c2b3ad87d1e542ec11a8c3d4b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 15 Sep 2013 22:29:00 +0300 Subject: FULLPIPE: Implement FullpipeEngine::defHandleKeyDown() --- engines/fullpipe/constants.h | 1 + engines/fullpipe/fullpipe.cpp | 8 ++++- engines/fullpipe/fullpipe.h | 7 +++++ engines/fullpipe/input.cpp | 66 +++++++++++++++++++++++++++++++++++++++++- engines/fullpipe/inventory.cpp | 17 +++++++++++ engines/fullpipe/inventory.h | 2 ++ 6 files changed, 99 insertions(+), 2 deletions(-) (limited to 'engines/fullpipe') diff --git a/engines/fullpipe/constants.h b/engines/fullpipe/constants.h index 4f389f80a8..796764d0a9 100644 --- a/engines/fullpipe/constants.h +++ b/engines/fullpipe/constants.h @@ -30,6 +30,7 @@ namespace Fullpipe { #define ANI_INV_MAP 5321 #define ANI_LIFTBUTTON 2751 #define ANI_MAN 322 +#define MSG_CMN_WINARCADE 4778 #define MSG_DISABLESAVES 5201 #define MSG_ENABLESAVES 5202 #define MSG_HMRKICK_METAL 4764 diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp index 11808e95c2..6a4a587ff7 100644 --- a/engines/fullpipe/fullpipe.cpp +++ b/engines/fullpipe/fullpipe.cpp @@ -71,6 +71,11 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) _inputController = 0; _inputDisabled = false; + _normalSpeed = true; + + _currentCheat = -1; + _currentCheatPos = 0; + _modalObject = 0; _gameContinue = true; @@ -201,7 +206,8 @@ Common::Error FullpipeEngine::run() { _needRestart = false; } - _system->delayMillis(10); + if (_normalSpeed) + _system->delayMillis(10); _system->updateScreen(); } diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h index f688151267..348ac2c9c5 100644 --- a/engines/fullpipe/fullpipe.h +++ b/engines/fullpipe/fullpipe.h @@ -127,6 +127,9 @@ public: CInputController *_inputController; bool _inputDisabled; + int _currentCheat; + int _currentCheatPos; + void defHandleKeyDown(int key); SoundList *_currSoundList1[11]; @@ -171,6 +174,7 @@ public: bool _needRestart; bool _flgPlayIntro; int _musicAllowed; + bool _normalSpeed; void enableSaves() { _isSaveAllowed = true; } void disableSaves(ExCommand *ex); @@ -222,6 +226,9 @@ public: void openHelp(); void openMainMenu(); + void winArcade(); + void getAllInventory(); + int lift_getButtonIdP(int objid); public: diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp index 8cc7654f52..c4af54ddc3 100644 --- a/engines/fullpipe/input.cpp +++ b/engines/fullpipe/input.cpp @@ -145,8 +145,72 @@ void FullpipeEngine::setCursor(int id) { _inputController->setCursor(id); } +const char *input_cheats[] = { + "HELP", + "STUFF", + "FASTER", + "OHWAIT", + "MUSOFF", + "" +}; + void FullpipeEngine::defHandleKeyDown(int key) { - warning("STUB: FullpipeEngine::defHandleKeyDown(%d)", key); + if (_currentCheat == -1) { + for (int i = 0; input_cheats[i][0]; i++) + if (toupper(key) == input_cheats[i][0]) { + _currentCheat = i; + _currentCheatPos = 1; + } + + return; + } + + warning("%d %d", _currentCheat, _currentCheatPos); + if (toupper(key) != input_cheats[_currentCheat][_currentCheatPos]) { + _currentCheat = -1; + + return; + } + + _currentCheatPos++; + warning("%d %d", _currentCheat, _currentCheatPos); + + if (!input_cheats[_currentCheat][_currentCheatPos]) { + switch (_currentCheat) { + case 0: // HELP + winArcade(); + break; + case 1: // STUFF + getAllInventory(); + break; + case 2: // FASTER + _normalSpeed = !_normalSpeed; + break; + case 3: // OHWAIT + _gamePaused = 1; + _flgGameIsRunning = 0; + break; + case 4: // MUSOFF + if (_musicAllowed & 2) + setMusicAllowed(_musicAllowed & 0xFFFFFFFD); + else + setMusicAllowed(_musicAllowed | 2); + break; + default: + break; + } + + _currentCheatPos = 0; + _currentCheat = -1; + } +} + +void FullpipeEngine::winArcade() { + ExCommand *ex = new ExCommand(0, 17, MSG_CMN_WINARCADE, 0, 0, 0, 1, 0, 0, 0); + ex->_excFlags |= 3; + + ex->postMessage(); + } void FullpipeEngine::updateCursorsCommon() { diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp index 1e229f3408..ccedb57ce2 100644 --- a/engines/fullpipe/inventory.cpp +++ b/engines/fullpipe/inventory.cpp @@ -138,6 +138,10 @@ int CInventory2::getInventoryItemIndexById(int itemId) { return -1; } +int CInventory2::getInventoryPoolItemIdAtIndex(int itemId) { + return _itemsPool[itemId]->id; +} + int CInventory2::getInventoryPoolItemFieldCById(int itemId) { for (uint i = 0; i < _itemsPool.size(); i++) { if (_itemsPool[i]->id == itemId) @@ -417,4 +421,17 @@ int CInventory2::getHoveredItem(Common::Point *point) { return 0; } +void FullpipeEngine::getAllInventory() { + CInventory2 *inv = getGameLoaderInventory(); + + for (uint i = 0; i < inv->getItemsPoolCount(); ++i ) { + int id = inv->getInventoryPoolItemIdAtIndex(i); + + if (inv->getCountItemsWithId(id) < 1) + inv->addItem(id, 1); + } + + inv->rebuildItemRects(); +} + } // End of namespace Fullpipe diff --git a/engines/fullpipe/inventory.h b/engines/fullpipe/inventory.h index f84d27dde5..5f1030398c 100644 --- a/engines/fullpipe/inventory.h +++ b/engines/fullpipe/inventory.h @@ -52,6 +52,7 @@ class CInventory : public CObject { virtual bool load(MfcArchive &file); int getInventoryPoolItemIndexById(int itemId); + uint getItemsPoolCount() { return _itemsPool.size(); } bool setItemFlags(int itemId, int flags); }; @@ -102,6 +103,7 @@ class CInventory2 : public CInventory { void removeItem2(Scene *sceneObj, int itemId, int x, int y, int priority); int getInventoryItemIndexById(int itemId); + int getInventoryPoolItemIdAtIndex(int itemId); int getInventoryPoolItemFieldCById(int itemId); int getCountItemsWithId(int itemId); int getItemFlags(int itemId); -- cgit v1.2.3