summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2023-06-14 00:50:34 +0100
committerAsh Wolf <ninji@wuffs.org>2023-06-14 00:50:34 +0100
commit37e364b2c6cc7487a1c888d256a73e5337bb7189 (patch)
treeeaf6e857382eef16c2dd940eb4125536fbe068bd /src
downloadt2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.tar.gz
t2win-37e364b2c6cc7487a1c888d256a73e5337bb7189.zip
initial commit
Diffstat (limited to 'src')
-rw-r--r--src/CT2App.h13
-rw-r--r--src/T2DLL/CDefRsrcPlugin.cpp14
-rw-r--r--src/T2DLL/CDefRsrcPlugin.h14
-rw-r--r--src/T2DLL/CFilePlugin.cpp52
-rw-r--r--src/T2DLL/CFilePlugin.h35
-rw-r--r--src/T2DLL/CFilePluginDB.cpp42
-rw-r--r--src/T2DLL/CFilePluginDB.h11
-rw-r--r--src/T2DLL/CFilePluginList.cpp49
-rw-r--r--src/T2DLL/CFilePluginList.h18
-rw-r--r--src/T2DLL/CLink.cpp90
-rw-r--r--src/T2DLL/CLink.h37
-rw-r--r--src/T2DLL/CObjectList.cpp11
-rw-r--r--src/T2DLL/CObjectList.h10
-rw-r--r--src/T2DLL/CObjectQueue.cpp23
-rw-r--r--src/T2DLL/CObjectQueue.h12
-rw-r--r--src/T2DLL/CPEFile.cpp248
-rw-r--r--src/T2DLL/CPEFile.h44
-rw-r--r--src/T2DLL/CPieChartView.cpp16
-rw-r--r--src/T2DLL/CPieChartView.h11
-rw-r--r--src/T2DLL/CPiledMultiBarChartView.cpp25
-rw-r--r--src/T2DLL/CPiledMultiBarChartView.h14
-rw-r--r--src/T2DLL/CPlugin.cpp21
-rw-r--r--src/T2DLL/CPlugin.h26
-rw-r--r--src/T2DLL/CPluginInfo.cpp99
-rw-r--r--src/T2DLL/CPluginInfo.h31
-rw-r--r--src/T2DLL/CPluginInfoArray.cpp34
-rw-r--r--src/T2DLL/CPluginInfoArray.h13
-rw-r--r--src/T2DLL/CPluginInfoComparator.cpp34
-rw-r--r--src/T2DLL/CPluginInfoComparator.h14
-rw-r--r--src/T2DLL/CProgramPlugin.cpp30
-rw-r--r--src/T2DLL/CProgramPlugin.h20
-rw-r--r--src/T2DLL/CResFile.cpp459
-rw-r--r--src/T2DLL/CResFile.h50
-rw-r--r--src/T2DLL/CResourcePlugin.cpp9
-rw-r--r--src/T2DLL/CResourcePlugin.h14
-rw-r--r--src/T2DLL/CToggleButtonDisabled.cpp86
-rw-r--r--src/T2DLL/CToggleButtonDisabled.h17
-rw-r--r--src/T2DLL/CTokenizer.cpp48
-rw-r--r--src/T2DLL/CTokenizer.h33
-rw-r--r--src/T2DLL/GlobalFunc.cpp82
-rw-r--r--src/T2DLL/GlobalFunc.h40
-rw-r--r--src/T2DLL/LArray.cpp406
-rw-r--r--src/T2DLL/LArray.h60
-rw-r--r--src/T2DLL/LAttachable.cpp86
-rw-r--r--src/T2DLL/LAttachable.h20
-rw-r--r--src/T2DLL/LAttachment.cpp29
-rw-r--r--src/T2DLL/LAttachment.h24
-rw-r--r--src/T2DLL/LBroadcaster.cpp46
-rw-r--r--src/T2DLL/LBroadcaster.h21
-rw-r--r--src/T2DLL/LComparator.cpp79
-rw-r--r--src/T2DLL/LComparator.h28
-rw-r--r--src/T2DLL/LListener.cpp26
-rw-r--r--src/T2DLL/LListener.h24
-rw-r--r--src/T2DLL/LPeriodical.cpp71
-rw-r--r--src/T2DLL/LPeriodical.h23
-rw-r--r--src/T2DLL/MMIO.h54
-rw-r--r--src/T2DLL/Mmio.cpp97
-rw-r--r--src/T2DLL/T2AdvertisePlugin.cpp65
-rw-r--r--src/T2DLL/T2AdvertisePlugin.h27
-rw-r--r--src/T2DLL/T2AdvertiseTable.cpp34
-rw-r--r--src/T2DLL/T2AdvertiseTable.h27
-rw-r--r--src/T2DLL/T2Animation.cpp34
-rw-r--r--src/T2DLL/T2Animation.h18
-rw-r--r--src/T2DLL/T2Archive.cpp394
-rw-r--r--src/T2DLL/T2Archive.h52
-rw-r--r--src/T2DLL/T2ArrowWnd.cpp43
-rw-r--r--src/T2DLL/T2ArrowWnd.h26
-rw-r--r--src/T2DLL/T2Balloon.cpp10
-rw-r--r--src/T2DLL/T2Balloon.h12
-rw-r--r--src/T2DLL/T2BalloonWnd.cpp52
-rw-r--r--src/T2DLL/T2BalloonWnd.h31
-rw-r--r--src/T2DLL/T2BitImage.cpp1228
-rw-r--r--src/T2DLL/T2BitImage.h56
-rw-r--r--src/T2DLL/T2BlackOut.cpp49
-rw-r--r--src/T2DLL/T2BlackOut.h27
-rw-r--r--src/T2DLL/T2ClassFactory.cpp25
-rw-r--r--src/T2DLL/T2ClassFactory.h18
-rw-r--r--src/T2DLL/T2CrossEquipArray.cpp87
-rw-r--r--src/T2DLL/T2CrossEquipArray.h18
-rw-r--r--src/T2DLL/T2CustomerTableIterator.cpp13
-rw-r--r--src/T2DLL/T2CustomerTableIterator.h14
-rw-r--r--src/T2DLL/T2DateTime.cpp153
-rw-r--r--src/T2DLL/T2DateTime.h59
-rw-r--r--src/T2DLL/T2DayLightFilter.cpp111
-rw-r--r--src/T2DLL/T2DayLightFilter.h16
-rw-r--r--src/T2DLL/T2DayParamDef.cpp16
-rw-r--r--src/T2DLL/T2DayParamDef.h32
-rw-r--r--src/T2DLL/T2Dialog.cpp331
-rw-r--r--src/T2DLL/T2Dialog.h91
-rw-r--r--src/T2DLL/T2DlgItem.cpp200
-rw-r--r--src/T2DLL/T2DlgItem.h67
-rw-r--r--src/T2DLL/T2DlgItemAPTable.cpp31
-rw-r--r--src/T2DLL/T2DlgItemAPTable.h17
-rw-r--r--src/T2DLL/T2DlgItemAllPurpose.cpp28
-rw-r--r--src/T2DLL/T2DlgItemAllPurpose.h17
-rw-r--r--src/T2DLL/T2DlgItemAnimation.cpp25
-rw-r--r--src/T2DLL/T2DlgItemAnimation.h17
-rw-r--r--src/T2DLL/T2DlgItemBelongGage.cpp28
-rw-r--r--src/T2DLL/T2DlgItemBelongGage.h21
-rw-r--r--src/T2DLL/T2DlgItemBox.cpp7
-rw-r--r--src/T2DLL/T2DlgItemBox.h12
-rw-r--r--src/T2DLL/T2DlgItemButtonBase.cpp16
-rw-r--r--src/T2DLL/T2DlgItemButtonBase.h15
-rw-r--r--src/T2DLL/T2DlgItemCANCEL.cpp7
-rw-r--r--src/T2DLL/T2DlgItemCANCEL.h10
-rw-r--r--src/T2DLL/T2DlgItemCheck.cpp7
-rw-r--r--src/T2DLL/T2DlgItemCheck.h10
-rw-r--r--src/T2DLL/T2DlgItemCustomerGage.cpp28
-rw-r--r--src/T2DLL/T2DlgItemCustomerGage.h21
-rw-r--r--src/T2DLL/T2DlgItemEdit.cpp40
-rw-r--r--src/T2DLL/T2DlgItemEdit.h21
-rw-r--r--src/T2DLL/T2DlgItemGageBase.cpp19
-rw-r--r--src/T2DLL/T2DlgItemGageBase.h16
-rw-r--r--src/T2DLL/T2DlgItemHScr.cpp22
-rw-r--r--src/T2DLL/T2DlgItemHScr.h17
-rw-r--r--src/T2DLL/T2DlgItemIButton.cpp7
-rw-r--r--src/T2DLL/T2DlgItemIButton.h12
-rw-r--r--src/T2DLL/T2DlgItemICheck.cpp22
-rw-r--r--src/T2DLL/T2DlgItemICheck.h17
-rw-r--r--src/T2DLL/T2DlgItemImage.cpp16
-rw-r--r--src/T2DLL/T2DlgItemImage.h17
-rw-r--r--src/T2DLL/T2DlgItemImageTable.cpp16
-rw-r--r--src/T2DLL/T2DlgItemImageTable.h15
-rw-r--r--src/T2DLL/T2DlgItemListBox.cpp40
-rw-r--r--src/T2DLL/T2DlgItemListBox.h19
-rw-r--r--src/T2DLL/T2DlgItemMovie.cpp31
-rw-r--r--src/T2DLL/T2DlgItemMovie.h21
-rw-r--r--src/T2DLL/T2DlgItemOK.cpp7
-rw-r--r--src/T2DLL/T2DlgItemOK.h10
-rw-r--r--src/T2DLL/T2DlgItemPPLEvalGage.cpp28
-rw-r--r--src/T2DLL/T2DlgItemPPLEvalGage.h21
-rw-r--r--src/T2DLL/T2DlgItemPeopleView.cpp49
-rw-r--r--src/T2DLL/T2DlgItemPeopleView.h24
-rw-r--r--src/T2DLL/T2DlgItemPopup.cpp25
-rw-r--r--src/T2DLL/T2DlgItemPopup.h16
-rw-r--r--src/T2DLL/T2DlgItemProfitsGage.cpp34
-rw-r--r--src/T2DLL/T2DlgItemProfitsGage.h23
-rw-r--r--src/T2DLL/T2DlgItemProgress.cpp28
-rw-r--r--src/T2DLL/T2DlgItemProgress.h15
-rw-r--r--src/T2DLL/T2DlgItemSTimeTbl.cpp19
-rw-r--r--src/T2DLL/T2DlgItemSTimeTbl.h14
-rw-r--r--src/T2DLL/T2DlgItemScr.cpp183
-rw-r--r--src/T2DLL/T2DlgItemScr.h45
-rw-r--r--src/T2DLL/T2DlgItemStressGage.cpp28
-rw-r--r--src/T2DLL/T2DlgItemStressGage.h21
-rw-r--r--src/T2DLL/T2DlgItemTButton.cpp7
-rw-r--r--src/T2DLL/T2DlgItemTButton.h12
-rw-r--r--src/T2DLL/T2DlgItemTab.cpp22
-rw-r--r--src/T2DLL/T2DlgItemTab.h15
-rw-r--r--src/T2DLL/T2DlgItemTable.cpp172
-rw-r--r--src/T2DLL/T2DlgItemTable.h81
-rw-r--r--src/T2DLL/T2DlgItemText.cpp28
-rw-r--r--src/T2DLL/T2DlgItemText.h21
-rw-r--r--src/T2DLL/T2DlgItemVScr.cpp24
-rw-r--r--src/T2DLL/T2DlgItemVScr.h15
-rw-r--r--src/T2DLL/T2DrawableObject.cpp38
-rw-r--r--src/T2DLL/T2DrawableObject.h15
-rw-r--r--src/T2DLL/T2ElevatorModule.cpp100
-rw-r--r--src/T2DLL/T2ElevatorModule.h57
-rw-r--r--src/T2DLL/T2ElvModuleList.cpp43
-rw-r--r--src/T2DLL/T2ElvModuleList.h28
-rw-r--r--src/T2DLL/T2Equip.cpp215
-rw-r--r--src/T2DLL/T2Equip.h82
-rw-r--r--src/T2DLL/T2EquipDef.cpp187
-rw-r--r--src/T2DLL/T2EquipDef.h68
-rw-r--r--src/T2DLL/T2EquipInfoDialog.cpp7
-rw-r--r--src/T2DLL/T2EquipInfoDialog.h11
-rw-r--r--src/T2DLL/T2EquipPlugin.cpp9
-rw-r--r--src/T2DLL/T2EquipPlugin.h9
-rw-r--r--src/T2DLL/T2EquipPtrList.cpp28
-rw-r--r--src/T2DLL/T2EquipPtrList.h20
-rw-r--r--src/T2DLL/T2EventItem.cpp79
-rw-r--r--src/T2DLL/T2EventItem.h46
-rw-r--r--src/T2DLL/T2FInfoAreaIterator.cpp64
-rw-r--r--src/T2DLL/T2FInfoAreaIterator.h42
-rw-r--r--src/T2DLL/T2FireBurning.cpp82
-rw-r--r--src/T2DLL/T2FireBurning.h67
-rw-r--r--src/T2DLL/T2FireWork.cpp28
-rw-r--r--src/T2DLL/T2FireWork.h19
-rw-r--r--src/T2DLL/T2FloorCEArray.cpp7
-rw-r--r--src/T2DLL/T2FloorCEArray.h11
-rw-r--r--src/T2DLL/T2FloorInfo.cpp187
-rw-r--r--src/T2DLL/T2FloorInfo.h86
-rw-r--r--src/T2DLL/T2FloorNumberTable.cpp40
-rw-r--r--src/T2DLL/T2FloorNumberTable.h22
-rw-r--r--src/T2DLL/T2FloorPtrList.cpp10
-rw-r--r--src/T2DLL/T2FloorPtrList.h12
-rw-r--r--src/T2DLL/T2GlobalData.cpp28
-rw-r--r--src/T2DLL/T2GlobalData.h23
-rw-r--r--src/T2DLL/T2GuestroomTable.cpp115
-rw-r--r--src/T2DLL/T2GuestroomTable.h57
-rw-r--r--src/T2DLL/T2HallEventPlugin.cpp16
-rw-r--r--src/T2DLL/T2HallEventPlugin.h17
-rw-r--r--src/T2DLL/T2HallEventTable.cpp64
-rw-r--r--src/T2DLL/T2HallEventTable.h39
-rw-r--r--src/T2DLL/T2HaveOutViewObject.cpp68
-rw-r--r--src/T2DLL/T2HaveOutViewObject.h29
-rw-r--r--src/T2DLL/T2ImageObj.cpp394
-rw-r--r--src/T2DLL/T2ImageObj.h72
-rw-r--r--src/T2DLL/T2InfoDialog.cpp30
-rw-r--r--src/T2DLL/T2InfoDialog.h13
-rw-r--r--src/T2DLL/T2Maru_Reggae.cpp43
-rw-r--r--src/T2DLL/T2Maru_Reggae.h27
-rw-r--r--src/T2DLL/T2Matter.cpp232
-rw-r--r--src/T2DLL/T2Matter.h81
-rw-r--r--src/T2DLL/T2MatterArray.cpp38
-rw-r--r--src/T2DLL/T2MatterArray.h23
-rw-r--r--src/T2DLL/T2MatterArrayList.cpp25
-rw-r--r--src/T2DLL/T2MatterArrayList.h14
-rw-r--r--src/T2DLL/T2MatterDef.cpp26
-rw-r--r--src/T2DLL/T2MatterDef.h21
-rw-r--r--src/T2DLL/T2Message.cpp49
-rw-r--r--src/T2DLL/T2Message.h24
-rw-r--r--src/T2DLL/T2Mover.cpp139
-rw-r--r--src/T2DLL/T2Mover.h71
-rw-r--r--src/T2DLL/T2MoverArray.cpp25
-rw-r--r--src/T2DLL/T2MoverArray.h19
-rw-r--r--src/T2DLL/T2MoverArrayList.cpp40
-rw-r--r--src/T2DLL/T2MoverArrayList.h22
-rw-r--r--src/T2DLL/T2MoverCEArray.cpp7
-rw-r--r--src/T2DLL/T2MoverCEArray.h11
-rw-r--r--src/T2DLL/T2MoverDef.cpp58
-rw-r--r--src/T2DLL/T2MoverDef.h43
-rw-r--r--src/T2DLL/T2MoverModule.cpp49
-rw-r--r--src/T2DLL/T2MoverModule.h40
-rw-r--r--src/T2DLL/T2MoverModuleList.cpp49
-rw-r--r--src/T2DLL/T2MoverModuleList.h29
-rw-r--r--src/T2DLL/T2MoverNumberTable.cpp58
-rw-r--r--src/T2DLL/T2MoverNumberTable.h31
-rw-r--r--src/T2DLL/T2MoverPlugin.cpp13
-rw-r--r--src/T2DLL/T2MoverPlugin.h14
-rw-r--r--src/T2DLL/T2MoverRoutingTable.cpp49
-rw-r--r--src/T2DLL/T2MoverRoutingTable.h33
-rw-r--r--src/T2DLL/T2MovieParamArray.cpp25
-rw-r--r--src/T2DLL/T2MovieParamArray.h17
-rw-r--r--src/T2DLL/T2MoviePlugin.cpp58
-rw-r--r--src/T2DLL/T2MoviePlugin.h29
-rw-r--r--src/T2DLL/T2MoviePluginList.cpp13
-rw-r--r--src/T2DLL/T2MoviePluginList.h10
-rw-r--r--src/T2DLL/T2MovieTable.cpp31
-rw-r--r--src/T2DLL/T2MovieTable.h21
-rw-r--r--src/T2DLL/T2MsgWindowCallback.cpp37
-rw-r--r--src/T2DLL/T2MsgWindowCallback.h22
-rw-r--r--src/T2DLL/T2Name.cpp37
-rw-r--r--src/T2DLL/T2Name.h25
-rw-r--r--src/T2DLL/T2NameList.cpp43
-rw-r--r--src/T2DLL/T2NameList.h23
-rw-r--r--src/T2DLL/T2NameTable.cpp34
-rw-r--r--src/T2DLL/T2NameTable.h24
-rw-r--r--src/T2DLL/T2Object.cpp52
-rw-r--r--src/T2DLL/T2Object.h31
-rw-r--r--src/T2DLL/T2ObjectArray.cpp12
-rw-r--r--src/T2DLL/T2ObjectArray.h16
-rw-r--r--src/T2DLL/T2ObjectArrayList.cpp13
-rw-r--r--src/T2DLL/T2ObjectArrayList.h13
-rw-r--r--src/T2DLL/T2OptionPluginList.cpp16
-rw-r--r--src/T2DLL/T2OptionPluginList.h14
-rw-r--r--src/T2DLL/T2OutDecoration.cpp22
-rw-r--r--src/T2DLL/T2OutDecoration.h20
-rw-r--r--src/T2DLL/T2OutObj.cpp40
-rw-r--r--src/T2DLL/T2OutObj.h24
-rw-r--r--src/T2DLL/T2OutObjArray.cpp22
-rw-r--r--src/T2DLL/T2OutObjArray.h18
-rw-r--r--src/T2DLL/T2OutObjArrayList.cpp34
-rw-r--r--src/T2DLL/T2OutObjArrayList.h20
-rw-r--r--src/T2DLL/T2OutObjInfoDialog.cpp7
-rw-r--r--src/T2DLL/T2OutObjInfoDialog.h8
-rw-r--r--src/T2DLL/T2OuterObjDef.cpp28
-rw-r--r--src/T2DLL/T2OuterObjDef.h19
-rw-r--r--src/T2DLL/T2OuterObjList.cpp4
-rw-r--r--src/T2DLL/T2OuterObjList.h11
-rw-r--r--src/T2DLL/T2OuterObjPlugin.cpp13
-rw-r--r--src/T2DLL/T2OuterObjPlugin.h14
-rw-r--r--src/T2DLL/T2OutsideInfo.cpp46
-rw-r--r--src/T2DLL/T2OutsideInfo.h29
-rw-r--r--src/T2DLL/T2PaletteAnime.cpp220
-rw-r--r--src/T2DLL/T2PaletteAnime.h69
-rw-r--r--src/T2DLL/T2PaletteAnimeDef.cpp112
-rw-r--r--src/T2DLL/T2PaletteAnimeDef.h38
-rw-r--r--src/T2DLL/T2People.cpp235
-rw-r--r--src/T2DLL/T2People.h122
-rw-r--r--src/T2DLL/T2PeopleAnimeDef.cpp25
-rw-r--r--src/T2DLL/T2PeopleAnimeDef.h25
-rw-r--r--src/T2DLL/T2PeopleArray.cpp40
-rw-r--r--src/T2DLL/T2PeopleArray.h25
-rw-r--r--src/T2DLL/T2PeopleArrayList.cpp46
-rw-r--r--src/T2DLL/T2PeopleArrayList.h24
-rw-r--r--src/T2DLL/T2PeopleDef.cpp10
-rw-r--r--src/T2DLL/T2PeopleDef.h15
-rw-r--r--src/T2DLL/T2PeopleDemandList.cpp40
-rw-r--r--src/T2DLL/T2PeopleDemandList.h26
-rw-r--r--src/T2DLL/T2PeopleInfoDialog.cpp28
-rw-r--r--src/T2DLL/T2PeopleInfoDialog.h16
-rw-r--r--src/T2DLL/T2PeopleLinkIterator.cpp28
-rw-r--r--src/T2DLL/T2PeopleLinkIterator.h16
-rw-r--r--src/T2DLL/T2PeopleLoader.cpp13
-rw-r--r--src/T2DLL/T2PeopleLoader.h14
-rw-r--r--src/T2DLL/T2PeoplePtrList.cpp52
-rw-r--r--src/T2DLL/T2PeoplePtrList.h29
-rw-r--r--src/T2DLL/T2PeopleTimeZoneList.cpp43
-rw-r--r--src/T2DLL/T2PeopleTimeZoneList.h30
-rw-r--r--src/T2DLL/T2PeopleType.cpp160
-rw-r--r--src/T2DLL/T2PeopleType.h53
-rw-r--r--src/T2DLL/T2PeopleTypeArray.cpp154
-rw-r--r--src/T2DLL/T2PeopleTypeArray.h25
-rw-r--r--src/T2DLL/T2PlaceParamDef.cpp15
-rw-r--r--src/T2DLL/T2PlaceParamDef.h26
-rw-r--r--src/T2DLL/T2PluginInfoTable.cpp25
-rw-r--r--src/T2DLL/T2PluginInfoTable.h15
-rw-r--r--src/T2DLL/T2PluginLoader.cpp214
-rw-r--r--src/T2DLL/T2PluginLoader.h19
-rw-r--r--src/T2DLL/T2PluginSpecifier.cpp114
-rw-r--r--src/T2DLL/T2PluginSpecifier.h27
-rw-r--r--src/T2DLL/T2Pool.cpp58
-rw-r--r--src/T2DLL/T2Pool.h33
-rw-r--r--src/T2DLL/T2PoolDef.cpp152
-rw-r--r--src/T2DLL/T2PoolDef.h78
-rw-r--r--src/T2DLL/T2PrefDialogBox.cpp25
-rw-r--r--src/T2DLL/T2PrefDialogBox.h15
-rw-r--r--src/T2DLL/T2PrefFile.cpp8
-rw-r--r--src/T2DLL/T2PrefFile.h11
-rw-r--r--src/T2DLL/T2RegistedTenantDB.cpp31
-rw-r--r--src/T2DLL/T2RegistedTenantDB.h19
-rw-r--r--src/T2DLL/T2RegistedTenantIterator.cpp13
-rw-r--r--src/T2DLL/T2RegistedTenantIterator.h12
-rw-r--r--src/T2DLL/T2RemoveFavoriteDialog.cpp25
-rw-r--r--src/T2DLL/T2RemoveFavoriteDialog.h16
-rw-r--r--src/T2DLL/T2Request.cpp118
-rw-r--r--src/T2DLL/T2Request.h67
-rw-r--r--src/T2DLL/T2RequestArray.cpp22
-rw-r--r--src/T2DLL/T2RequestArray.h18
-rw-r--r--src/T2DLL/T2RequestArrayList.cpp34
-rw-r--r--src/T2DLL/T2RequestArrayList.h20
-rw-r--r--src/T2DLL/T2RequestIDArray.cpp52
-rw-r--r--src/T2DLL/T2RequestIDArray.h28
-rw-r--r--src/T2DLL/T2ReturnStack.cpp140
-rw-r--r--src/T2DLL/T2ReturnStack.h31
-rw-r--r--src/T2DLL/T2RouteCEArray.cpp44
-rw-r--r--src/T2DLL/T2RouteCEArray.h14
-rw-r--r--src/T2DLL/T2RouteNavigator.cpp40
-rw-r--r--src/T2DLL/T2RouteNavigator.h25
-rw-r--r--src/T2DLL/T2RoutingTable.cpp82
-rw-r--r--src/T2DLL/T2RoutingTable.h54
-rw-r--r--src/T2DLL/T2SantaClaus.cpp25
-rw-r--r--src/T2DLL/T2SantaClaus.h20
-rw-r--r--src/T2DLL/T2SearchDialog.cpp10
-rw-r--r--src/T2DLL/T2SearchDialog.h9
-rw-r--r--src/T2DLL/T2SettingDialog.cpp10
-rw-r--r--src/T2DLL/T2SettingDialog.h9
-rw-r--r--src/T2DLL/T2Settlement.cpp58
-rw-r--r--src/T2DLL/T2Settlement.h31
-rw-r--r--src/T2DLL/T2SilhouetteDef.cpp10
-rw-r--r--src/T2DLL/T2SilhouetteDef.h16
-rw-r--r--src/T2DLL/T2SilhouettePane.cpp25
-rw-r--r--src/T2DLL/T2SilhouettePane.h16
-rw-r--r--src/T2DLL/T2SoundPlayer.cpp76
-rw-r--r--src/T2DLL/T2SoundPlayer.h57
-rw-r--r--src/T2DLL/T2Sprite.cpp157
-rw-r--r--src/T2DLL/T2Sprite.h26
-rw-r--r--src/T2DLL/T2SpriteObj.cpp11
-rw-r--r--src/T2DLL/T2SpriteObj.h17
-rw-r--r--src/T2DLL/T2StairModule.cpp19
-rw-r--r--src/T2DLL/T2StairModule.h20
-rw-r--r--src/T2DLL/T2StairModuleList.cpp28
-rw-r--r--src/T2DLL/T2StairModuleList.h23
-rw-r--r--src/T2DLL/T2StewardDialog.cpp13
-rw-r--r--src/T2DLL/T2StewardDialog.h12
-rw-r--r--src/T2DLL/T2StopInfoArray.cpp52
-rw-r--r--src/T2DLL/T2StopInfoArray.h26
-rw-r--r--src/T2DLL/T2SubPlugin.cpp68
-rw-r--r--src/T2DLL/T2SubPlugin.h36
-rw-r--r--src/T2DLL/T2TempPluginComparator.cpp13
-rw-r--r--src/T2DLL/T2TempPluginComparator.h17
-rw-r--r--src/T2DLL/T2TemplatePlugin.cpp17
-rw-r--r--src/T2DLL/T2TemplatePlugin.h17
-rw-r--r--src/T2DLL/T2TemplatePluginDB.cpp19
-rw-r--r--src/T2DLL/T2TemplatePluginDB.h15
-rw-r--r--src/T2DLL/T2TemplatePluginList.cpp46
-rw-r--r--src/T2DLL/T2TemplatePluginList.h23
-rw-r--r--src/T2DLL/T2Tenant.cpp316
-rw-r--r--src/T2DLL/T2Tenant.h188
-rw-r--r--src/T2DLL/T2TenantArray.cpp34
-rw-r--r--src/T2DLL/T2TenantArray.h22
-rw-r--r--src/T2DLL/T2TenantArrayList.cpp52
-rw-r--r--src/T2DLL/T2TenantArrayList.h26
-rw-r--r--src/T2DLL/T2TenantCEArray.cpp17
-rw-r--r--src/T2DLL/T2TenantCEArray.h13
-rw-r--r--src/T2DLL/T2TenantDef.cpp67
-rw-r--r--src/T2DLL/T2TenantDef.h51
-rw-r--r--src/T2DLL/T2TenantInfoDialog.cpp7
-rw-r--r--src/T2DLL/T2TenantInfoDialog.h11
-rw-r--r--src/T2DLL/T2TenantMemberDef.cpp21
-rw-r--r--src/T2DLL/T2TenantMemberDef.h31
-rw-r--r--src/T2DLL/T2TenantMemberTableDef.cpp46
-rw-r--r--src/T2DLL/T2TenantMemberTableDef.h30
-rw-r--r--src/T2DLL/T2TenantPlugin.cpp19
-rw-r--r--src/T2DLL/T2TenantPlugin.h16
-rw-r--r--src/T2DLL/T2Terrorist.cpp28
-rw-r--r--src/T2DLL/T2Terrorist.h24
-rw-r--r--src/T2DLL/T2ToolDef.cpp166
-rw-r--r--src/T2DLL/T2ToolDef.h96
-rw-r--r--src/T2DLL/T2ToolDefList.cpp79
-rw-r--r--src/T2DLL/T2ToolDefList.h35
-rw-r--r--src/T2DLL/T2ToolHelpWnd.cpp43
-rw-r--r--src/T2DLL/T2ToolHelpWnd.h28
-rw-r--r--src/T2DLL/T2ToolPlugin.cpp9
-rw-r--r--src/T2DLL/T2ToolPlugin.h9
-rw-r--r--src/T2DLL/T2ToolWindow.cpp190
-rw-r--r--src/T2DLL/T2ToolWindow.h92
-rw-r--r--src/T2DLL/T2TowerEvent.cpp79
-rw-r--r--src/T2DLL/T2TowerEvent.h35
-rw-r--r--src/T2DLL/T2TowerMessage.cpp61
-rw-r--r--src/T2DLL/T2TowerMessage.h33
-rw-r--r--src/T2DLL/T2TowerVision.cpp16
-rw-r--r--src/T2DLL/T2TowerVision.h15
-rw-r--r--src/T2DLL/T2TrafficInfo.cpp34
-rw-r--r--src/T2DLL/T2TrafficInfo.h24
-rw-r--r--src/T2DLL/T2Transport.cpp70
-rw-r--r--src/T2DLL/T2Transport.h39
-rw-r--r--src/T2DLL/T2TreasureDialog.cpp28
-rw-r--r--src/T2DLL/T2TreasureDialog.h17
-rw-r--r--src/T2DLL/T2TreasurePane.cpp22
-rw-r--r--src/T2DLL/T2TreasurePane.h14
-rw-r--r--src/T2DLL/T2UnitInfo.cpp40
-rw-r--r--src/T2DLL/T2UnitInfo.h21
-rw-r--r--src/T2DLL/T2VerticalTable.cpp10
-rw-r--r--src/T2DLL/T2VerticalTable.h13
-rw-r--r--src/T2DLL/T2VisitVIP.cpp37
-rw-r--r--src/T2DLL/T2VisitVIP.h22
-rw-r--r--src/T2DLL/T2WeatherFilter.cpp146
-rw-r--r--src/T2DLL/T2WeatherFilter.h37
-rw-r--r--src/T2DLL/T2WordDef.cpp28
-rw-r--r--src/T2DLL/T2WordDef.h17
-rw-r--r--src/T2DLL/T2WordDefArray.cpp49
-rw-r--r--src/T2DLL/T2WordDefArray.h12
-rw-r--r--src/T2DLL/T2WorldDef.cpp271
-rw-r--r--src/T2DLL/T2WorldDef.h132
-rw-r--r--src/T2DLL/T2WorldPlugin.cpp52
-rw-r--r--src/T2DLL/T2WorldPlugin.h35
-rw-r--r--src/T2DLL/T2XEvent.cpp55
-rw-r--r--src/T2DLL/T2XEvent.h28
-rw-r--r--src/T2DLL/UPoint.cpp7
-rw-r--r--src/T2DLL/UPoint.h10
-rw-r--r--src/T2DLL/URect.cpp19
-rw-r--r--src/T2DLL/URect.h15
-rw-r--r--src/T2DLL/UT2BkgndInfo.cpp90
-rw-r--r--src/T2DLL/UT2BkgndInfo.h20
-rw-r--r--src/T2DLL/UT2Coordinate.cpp94
-rw-r--r--src/T2DLL/UT2Coordinate.h47
-rw-r--r--src/T2DLL/UT2Utils.cpp13
-rw-r--r--src/T2DLL/UT2Utils.h12
-rw-r--r--src/T2DLL/Wave.cpp34
-rw-r--r--src/T2DLL/Wave.h21
-rw-r--r--src/T2TowerDoc.h175
-rw-r--r--src/T2TowerMainView.h28
-rw-r--r--src/common.h183
456 files changed, 21779 insertions, 0 deletions
diff --git a/src/CT2App.h b/src/CT2App.h
new file mode 100644
index 0000000..da554ca
--- /dev/null
+++ b/src/CT2App.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "common.h"
+
+class CT2App : public CWinApp {
+public:
+ // stuff will go here later
+
+ virtual void app_vfA4(BOOL); // modifies a counter
+ virtual void app_vfA8(CWnd *); // sets field E8
+ virtual void app_vfAC(); // clears field E8
+ virtual T2GlobalData *app_vfB0(); // gets global data
+ virtual void app_vfB4(); // runs a message loop
+};
diff --git a/src/T2DLL/CDefRsrcPlugin.cpp b/src/T2DLL/CDefRsrcPlugin.cpp
new file mode 100644
index 0000000..a4f8b42
--- /dev/null
+++ b/src/T2DLL/CDefRsrcPlugin.cpp
@@ -0,0 +1,14 @@
+#include "CDefRsrcPlugin.h"
+#include "T2ImageObj.h"
+
+CDefRsrcPlugin::CDefRsrcPlugin(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile)
+ : CPlugin(type, specifier)
+{
+ mStr48 = specifier.mPluginName;
+#line 32
+ mImageObj = DEBUG_NEW T2ImageObj;
+}
+
+/*virtual*/ CDefRsrcPlugin::~CDefRsrcPlugin() {
+ delete mImageObj;
+}
diff --git a/src/T2DLL/CDefRsrcPlugin.h b/src/T2DLL/CDefRsrcPlugin.h
new file mode 100644
index 0000000..00b6df2
--- /dev/null
+++ b/src/T2DLL/CDefRsrcPlugin.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+#include "CPlugin.h"
+
+class DLL_EXPORT CDefRsrcPlugin : public CPlugin {
+public:
+ CDefRsrcPlugin(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile);
+ virtual ~CDefRsrcPlugin();
+
+ virtual DWORD GetPluginStyle() { return 'RPlg'; }
+
+protected:
+ CString mStr48;
+};
diff --git a/src/T2DLL/CFilePlugin.cpp b/src/T2DLL/CFilePlugin.cpp
new file mode 100644
index 0000000..aac286d
--- /dev/null
+++ b/src/T2DLL/CFilePlugin.cpp
@@ -0,0 +1,52 @@
+#include "CFilePlugin.h"
+#include "CPluginInfo.h"
+#include "CResFile.h"
+
+CFilePlugin::CFilePlugin(DWORD type, T2PluginSpecifier& specifier)
+ : CPlugin(type, specifier)
+{
+ mAttrib = 0;
+ mGameLevel = 0;
+
+ CResFile file;
+ int success = false;
+ if (specifier.mIsSubPlugin) {
+ success = file.OpenResource(specifier.mPath, 128, 'ATTR');
+ specifier.mIsLoaded = true;
+ } else {
+ success = file.OpenResource(specifier.mInstance, 128, "ATTR");
+ }
+
+ if (success) {
+ file >> mID;
+ file >> mAttrib;
+ file >> mDependID;
+ file >> mGameLevel;
+ file >> mSecretItem;
+ file >> mItemType;
+ file >> mMustItem;
+ file >> mPluginName;
+ }
+}
+
+/*virtual*/ CFilePlugin::~CFilePlugin() {
+ Unload();
+}
+
+/*virtual*/ void CFilePlugin::GetName(CString& outStr) {
+ outStr = mPluginName;
+}
+
+/*virtual*/ BOOL CFilePlugin::Load() {
+ return true;
+}
+
+/*virtual*/ BOOL CFilePlugin::Unload() {
+ return true;
+}
+
+CPluginInfo* CFilePlugin::GetPluginInfo() {
+ char buf[500];
+ GetModuleFileName(mModuleHandle, buf, sizeof(buf));
+ return new CPluginInfo(mType, mID, mItemType, mMustItem, mPluginName, buf);
+}
diff --git a/src/T2DLL/CFilePlugin.h b/src/T2DLL/CFilePlugin.h
new file mode 100644
index 0000000..6cb909f
--- /dev/null
+++ b/src/T2DLL/CFilePlugin.h
@@ -0,0 +1,35 @@
+#pragma once
+#include "common.h"
+#include "CPlugin.h"
+
+class CPluginInfo;
+
+class DLL_EXPORT CFilePlugin : public CPlugin {
+public:
+ CFilePlugin(DWORD type, T2PluginSpecifier& specifier);
+ virtual ~CFilePlugin();
+ virtual DWORD GetPluginStyle() { return 'fplg'; }
+ virtual void GetName(CString& outStr);
+ virtual BOOL Load();
+ virtual BOOL Unload();
+ CPluginInfo* GetPluginInfo();
+
+ DWORD GetID() { return mID; }
+ unsigned int GetAttrib() { return mAttrib; }
+ DWORD GetDependID() { return mDependID; }
+ unsigned int GetGameLevel() { return mGameLevel; }
+ unsigned int GetSecretItem() { return mSecretItem; }
+ int GetItemType() { return mItemType; }
+ int GetMustItem() { return mMustItem; }
+ void UseSecret() { mSecretItem = 0; }
+
+protected:
+ DWORD mID;
+ unsigned int mAttrib;
+ DWORD mDependID;
+ int mGameLevel;
+ int mSecretItem;
+ int mItemType;
+ int mMustItem;
+ CString mPluginName;
+};
diff --git a/src/T2DLL/CFilePluginDB.cpp b/src/T2DLL/CFilePluginDB.cpp
new file mode 100644
index 0000000..83d8456
--- /dev/null
+++ b/src/T2DLL/CFilePluginDB.cpp
@@ -0,0 +1,42 @@
+#include "CFilePlugin.h"
+#include "CFilePluginDB.h"
+#include "CFilePluginList.h"
+
+CFilePluginDB::CFilePluginDB()
+ : LArray(sizeof(CFilePlugin *))
+{
+}
+
+/*virtual*/ CFilePluginDB::~CFilePluginDB() {
+}
+
+/*virtual*/ void CFilePluginDB::Add(CFilePlugin* plugin) {
+ LArrayIterator iter(*this);
+ BOOL found = false;
+ CFilePluginList *list;
+
+ while (!found && iter.Next(&list)) {
+ if (list->GetPluginType() == plugin->GetType()) {
+ list->Add(plugin);
+ found = true;
+ }
+ }
+
+ if (!found) {
+ list = new CFilePluginList(plugin->GetType());
+ list->Add(plugin);
+ InsertItemsAt(1, mItemCount + 1, &list);
+ }
+}
+
+/*virtual*/ CFilePluginList* CFilePluginDB::GetFilePluginList(DWORD pluginType) {
+ LArrayIterator iter(*this);
+ CFilePluginList *list;
+
+ while (iter.Next(&list)) {
+ if (list->GetPluginType() == pluginType)
+ return list;
+ }
+
+ return NULL;
+}
diff --git a/src/T2DLL/CFilePluginDB.h b/src/T2DLL/CFilePluginDB.h
new file mode 100644
index 0000000..02aba0b
--- /dev/null
+++ b/src/T2DLL/CFilePluginDB.h
@@ -0,0 +1,11 @@
+#pragma once
+#include "common.h"
+#include "LArray.h"
+
+class DLL_EXPORT CFilePluginDB : public LArray {
+public:
+ CFilePluginDB();
+ virtual ~CFilePluginDB();
+ virtual void Add(CFilePlugin* plugin);
+ virtual CFilePluginList* GetFilePluginList(DWORD pluginType);
+};
diff --git a/src/T2DLL/CFilePluginList.cpp b/src/T2DLL/CFilePluginList.cpp
new file mode 100644
index 0000000..d55a841
--- /dev/null
+++ b/src/T2DLL/CFilePluginList.cpp
@@ -0,0 +1,49 @@
+#include "CFilePlugin.h"
+#include "CFilePluginList.h"
+
+CFilePluginList::CFilePluginList(DWORD pluginType) {
+ mPluginType = pluginType;
+}
+
+/*virtual*/ CFilePluginList::~CFilePluginList() {
+}
+
+/*virtual*/ void CFilePluginList::AllClear() {
+ RemoveAll();
+}
+
+/*virtual*/ BOOL CFilePluginList::Add(CFilePlugin* plugin) {
+ BOOL found = false;
+ POSITION pos = GetHeadPosition();
+
+ while (!found && pos) {
+ CFilePlugin *check = GetNext(pos);
+ if (check->GetID() == plugin->GetID())
+ found = true;
+ }
+
+ if (!found)
+ AddTail(plugin);
+
+ return !found;
+}
+
+/*virtual*/ unsigned int CFilePluginList::GetItemCount() {
+ return GetCount();
+}
+
+/*virtual*/ CFilePlugin* CFilePluginList::GetItemAt(POSITION pos) {
+ return GetAt(pos);
+}
+
+CFilePlugin* CFilePluginList::GetItem(DWORD id) {
+ POSITION pos = GetHeadPosition();
+
+ while (pos) {
+ CFilePlugin *check = GetNext(pos);
+ if (check->GetID() == id)
+ return check;
+ }
+
+ return NULL;
+}
diff --git a/src/T2DLL/CFilePluginList.h b/src/T2DLL/CFilePluginList.h
new file mode 100644
index 0000000..a4bc776
--- /dev/null
+++ b/src/T2DLL/CFilePluginList.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT CFilePluginList : public CList<CFilePlugin *, CFilePlugin *> {
+public:
+ CFilePluginList(DWORD pluginType);
+ virtual ~CFilePluginList();
+ virtual void AllClear();
+ virtual BOOL Add(CFilePlugin* plugin);
+ virtual unsigned int GetItemCount();
+ virtual CFilePlugin* GetItemAt(POSITION pos);
+ CFilePlugin* GetItem(DWORD id);
+
+ DWORD GetPluginType() { return mPluginType; }
+
+protected:
+ DWORD mPluginType;
+};
diff --git a/src/T2DLL/CLink.cpp b/src/T2DLL/CLink.cpp
new file mode 100644
index 0000000..88f63bc
--- /dev/null
+++ b/src/T2DLL/CLink.cpp
@@ -0,0 +1,90 @@
+#include "CLink.h"
+
+CLink::CLink() {
+ mNext = NULL;
+ mPrev = NULL;
+}
+
+CLink::CLink(CLink* prev) {
+ mNext = NULL;
+ mPrev = prev;
+ if (prev)
+ prev->SetNext(this);
+}
+
+/*virtual*/ CLink::~CLink() {
+}
+
+void CLink::InsertAt(CLink* before) {
+ if (!mNext) {
+ mNext = before;
+ if (before)
+ before->mPrev = this;
+ } else {
+ CLink *tmp = mNext;
+ mNext = before;
+ tmp->mPrev = before;
+ before->mNext = tmp;
+ }
+}
+
+void CLink::Remove() {
+ CLink *prev = mPrev;
+ CLink *next = mNext;
+ mNext = NULL;
+ mPrev = NULL;
+
+ if (prev)
+ prev->mNext = next;
+ if (next)
+ next->mPrev = prev;
+}
+
+void CLink::RemoveLink() {
+ Remove();
+}
+
+unsigned int CLink::Count() const {
+ unsigned int n = 1;
+ CLink *i = mNext;
+ while (i) {
+ n++;
+ i = i->GetNext();
+ }
+ return n;
+}
+
+CLinkIterator::CLinkIterator(CLink* start)
+ : mStart(start)
+ , mCurrent(NULL)
+{
+}
+
+/*virtual*/ CLinkIterator::~CLinkIterator() {
+}
+
+BOOL CLinkIterator::Current(CLink** p) {
+ if (mCurrent) {
+ *p = mCurrent;
+ return true;
+ }
+ return false;
+}
+
+BOOL CLinkIterator::Prev(CLink** p) {
+ if (mCurrent) {
+ mCurrent = mCurrent->mPrev;
+ return Current(p);
+ }
+ return false;
+}
+
+BOOL CLinkIterator::Next(CLink** p) {
+ if (mCurrent) {
+ mCurrent = mCurrent->mNext;
+ return Current(p);
+ } else {
+ mCurrent = mStart;
+ return Current(p);
+ }
+}
diff --git a/src/T2DLL/CLink.h b/src/T2DLL/CLink.h
new file mode 100644
index 0000000..3e8988b
--- /dev/null
+++ b/src/T2DLL/CLink.h
@@ -0,0 +1,37 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT CLink {
+public:
+ CLink();
+ CLink(CLink* prev);
+ virtual ~CLink();
+ void InsertAt(CLink* before);
+ void Remove();
+ void RemoveLink();
+ unsigned int Count() const;
+
+ CLink* GetNext() { return mNext; }
+ CLink* GetPrev() { return mPrev; }
+ void SetNext(CLink* l) { mNext = l; }
+ void SetPrev(CLink* l) { mPrev = l; }
+
+private:
+ CLink *mNext;
+ CLink *mPrev;
+
+ friend class CLinkIterator;
+};
+
+class DLL_EXPORT CLinkIterator {
+public:
+ CLinkIterator(CLink* start);
+ virtual ~CLinkIterator();
+ BOOL Current(CLink** p);
+ BOOL Prev(CLink** p);
+ BOOL Next(CLink** p);
+
+private:
+ CLink *mStart;
+ CLink *mCurrent;
+};
diff --git a/src/T2DLL/CObjectList.cpp b/src/T2DLL/CObjectList.cpp
new file mode 100644
index 0000000..8aa761d
--- /dev/null
+++ b/src/T2DLL/CObjectList.cpp
@@ -0,0 +1,11 @@
+#include "CObjectList.h"
+
+CObjectList::CObjectList() {
+}
+
+/*virtual*/ CObjectList::~CObjectList() {
+}
+
+/*virtual*/ void CObjectList::AllClear() {
+ RemoveItemsAt(mItemCount, 1);
+}
diff --git a/src/T2DLL/CObjectList.h b/src/T2DLL/CObjectList.h
new file mode 100644
index 0000000..ed66dd1
--- /dev/null
+++ b/src/T2DLL/CObjectList.h
@@ -0,0 +1,10 @@
+#pragma once
+#include "common.h"
+#include "LArray.h"
+
+class DLL_EXPORT CObjectList : public LArray {
+public:
+ CObjectList();
+ virtual ~CObjectList();
+ virtual void AllClear();
+};
diff --git a/src/T2DLL/CObjectQueue.cpp b/src/T2DLL/CObjectQueue.cpp
new file mode 100644
index 0000000..20c94c2
--- /dev/null
+++ b/src/T2DLL/CObjectQueue.cpp
@@ -0,0 +1,23 @@
+#include "CObjectQueue.h"
+
+CObjectQueue::CObjectQueue() {
+}
+
+/*virtual*/ CObjectQueue::~CObjectQueue() {
+}
+
+/*virtual*/ void CObjectQueue::AllClear() {
+ RemoveAll();
+}
+
+POSITION CObjectQueue::AddItem(void* item) {
+ return AddTail(item);
+}
+
+/*virtual*/ unsigned int CObjectQueue::GetItemCount() {
+ return GetCount();
+}
+
+void CObjectQueue::RemoveItem(POSITION pos) {
+ RemoveAt(pos);
+}
diff --git a/src/T2DLL/CObjectQueue.h b/src/T2DLL/CObjectQueue.h
new file mode 100644
index 0000000..9a87db2
--- /dev/null
+++ b/src/T2DLL/CObjectQueue.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class CObjectQueue : public CList<void*, void*> {
+public:
+ CObjectQueue();
+ virtual ~CObjectQueue();
+ virtual void AllClear();
+ POSITION AddItem(void*);
+ virtual unsigned int GetItemCount();
+ void RemoveItem(POSITION);
+};
diff --git a/src/T2DLL/CPEFile.cpp b/src/T2DLL/CPEFile.cpp
new file mode 100644
index 0000000..7bb49de
--- /dev/null
+++ b/src/T2DLL/CPEFile.cpp
@@ -0,0 +1,248 @@
+#include "CPEFile.h"
+
+CPEFile::CPEFile(const CPEFile& other)
+ : mFile(other.mFile)
+ , mFileHeader(other.mFileHeader)
+ , mSectionHeaders(other.mSectionHeaders)
+ , mRsrcPtr(other.mRsrcPtr)
+ , mRsrcIndex(other.mRsrcIndex)
+ , mStartPosition(other.mStartPosition)
+ , mLength(other.mLength)
+{
+}
+
+CPEFile& CPEFile::operator=(const CPEFile& other) {
+ mFile = other.mFile;
+ mFileHeader = other.mFileHeader;
+ mSectionHeaders = other.mSectionHeaders;
+ mRsrcPtr = other.mRsrcPtr;
+ mRsrcIndex = other.mRsrcIndex;
+ mStartPosition = other.mStartPosition;
+ mLength = other.mLength;
+ return *this;
+}
+
+CPEFile::CPEFile() {
+ mFile = NULL;
+}
+
+CPEFile::~CPEFile() {
+ Close();
+}
+
+/*virtual*/ void CPEFile::Close() {
+ if (mFile) {
+ mFile->Close();
+ delete mFile;
+ }
+ mFile = NULL;
+
+ if (mSectionHeaders)
+ free(mSectionHeaders);
+ mSectionHeaders = NULL;
+}
+
+/*virtual*/ BOOL CPEFile::Open(const char*filename, unsigned int flags, CFileException*pError) {
+ BOOL result = false;
+
+#line 36
+ mFile = DEBUG_NEW CFile;
+ if (mFile->Open(filename, flags, pError)) {
+ result = Init();
+ if (!result)
+ Close();
+ }
+
+ return result;
+}
+
+BOOL CPEFile::Init() {
+ IMAGE_DOS_HEADER header;
+
+ mSectionHeaders = NULL;
+
+ memset(&header, 0, sizeof(header));
+ mFile->Read(&header, sizeof(header));
+ if (header.e_magic != IMAGE_DOS_SIGNATURE)
+ return false;
+
+ mFile->Seek(header.e_lfanew, CFile::begin);
+
+ DWORD magic = 0;
+ mFile->Read(&magic, sizeof(magic));
+ if (magic != IMAGE_NT_SIGNATURE)
+ return false;
+
+ memset(&mFileHeader, 0, sizeof(mFileHeader));
+ mFile->Read(&mFileHeader, sizeof(mFileHeader));
+ mFile->Seek(IMAGE_SIZEOF_NT_OPTIONAL_HEADER, CFile::current);
+
+ mSectionHeaders = (IMAGE_SECTION_HEADER *) malloc(sizeof(IMAGE_SECTION_HEADER) * mFileHeader.NumberOfSections);
+ mFile->Read(mSectionHeaders, sizeof(IMAGE_SECTION_HEADER) * mFileHeader.NumberOfSections);
+
+ int i;
+ for (i = 0; i < mFileHeader.NumberOfSections; i++) {
+ if (strcmp((const char *) mSectionHeaders[i].Name, ".rsrc") == 0)
+ break;
+ }
+
+ if (i == mFileHeader.NumberOfSections)
+ return false;
+
+ mRsrcPtr = mSectionHeaders[i].PointerToRawData;
+ mRsrcIndex = i;
+ return true;
+}
+
+BOOL CPEFile::EnumResource(CString& s, RESTRACKERWORK& work) {
+ IMAGE_RESOURCE_DIRECTORY_ENTRY entry;
+
+ if (!EnumResourceDirectory(&entry, work))
+ return false;
+
+ GetResourceName(s, entry);
+ return true;
+}
+
+BOOL CPEFile::EnumResourceDirectory(IMAGE_RESOURCE_DIRECTORY_ENTRY* entry, RESTRACKERWORK& work) {
+ if (!work.didRead) {
+ mFile->Seek(mRsrcPtr, CFile::begin);
+ mFile->Read(&work.directory, sizeof(work.directory));
+ work.position = mFile->GetPosition();
+ work.didRead = true;
+ work.nextIndex = 0;
+ }
+
+ int entryCount = (work.directory.NumberOfNamedEntries + work.directory.NumberOfIdEntries);
+ if (work.nextIndex >= entryCount)
+ return false;
+
+ mFile->Seek(work.position + work.nextIndex * sizeof(IMAGE_RESOURCE_DIRECTORY_ENTRY), CFile::begin);
+ mFile->Read(entry, sizeof(IMAGE_RESOURCE_DIRECTORY_ENTRY));
+ memcpy(&work.entry, entry, sizeof(IMAGE_RESOURCE_DIRECTORY_ENTRY));
+ work.nextIndex++;
+ return true;
+}
+
+void CPEFile::GetResourceName(CString& s, IMAGE_RESOURCE_DIRECTORY_ENTRY& entry) {
+ if (entry.Name & 0x80000000) {
+ unsigned short len;
+ mFile->Seek(mRsrcPtr + entry.NameOffset, CFile::begin);
+ mFile->Read(&len, sizeof(len));
+
+ char *widebuf = (char *) malloc(len * 2);
+ mFile->Read(widebuf, len * 2);
+
+ int size = len * 2 + 1;
+ char *buf = (char *) malloc(size);
+ memset(buf, 0, size);
+
+ int i;
+ for (i = 0; i < len; i++) {
+ buf[i] = widebuf[i * 2];
+ }
+ buf[i] = 0;
+
+ s = buf;
+ free(widebuf);
+ free(buf);
+ } else {
+ s.Format("#%u", entry.Name);
+ }
+
+ if (entry.OffsetToData & 0x80000000)
+ s += "\\";
+}
+
+void CPEFile::EnterDirectory(RESTRACKERWORK& child, RESTRACKERWORK& parent) {
+ mFile->Seek(mRsrcPtr + parent.entry.OffsetToDirectory, CFile::begin);
+ mFile->Read(&child.directory, sizeof(child.directory));
+ child.position = mFile->GetPosition();
+ child.didRead = true;
+ child.nextIndex = 0;
+}
+
+/*virtual*/ BOOL CPEFile::Seek(const char* name) {
+#line 141
+ _ASSERT(strncmp(name, "\\.rsrc", 6) == 0);
+
+ char *nameCopy = (char *) malloc(strlen(name) + 1);
+ strcpy(nameCopy, name);
+
+ CString str;
+ str = (char *) NULL;
+ str = strtok(nameCopy, "\\");
+
+ RESTRACKERWORK work;
+ memset(&work, 0, sizeof(work));
+
+ BOOL flag = false;
+
+ CString str2("");
+
+ while ((str = strtok(NULL, "\\")) != "") {
+ if (flag) {
+ RESTRACKERWORK child;
+ EnterDirectory(child, work);
+ work = child;
+ }
+ flag = false;
+
+ while (EnumResource(str2, work) == 1) {
+ if (_stricmp(str2, str) == 0 || _stricmp(str2, str + "\\") == 0) {
+ flag = true;
+ break;
+ }
+ }
+
+ if (!flag)
+ return false;
+ }
+
+ free(nameCopy);
+
+ if (str2.Right(1) == "\\")
+ return false;
+
+ IMAGE_RESOURCE_DATA_ENTRY dataEntry;
+
+ mFile->Seek(mRsrcPtr + work.entry.OffsetToData, CFile::begin);
+ mFile->Read(&dataEntry, sizeof(dataEntry));
+
+ mStartPosition = dataEntry.OffsetToData - (mSectionHeaders[mRsrcIndex].VirtualAddress - mSectionHeaders[mRsrcIndex].PointerToRawData);
+ mLength = dataEntry.Size;
+
+ mFile->Seek(mStartPosition, CFile::begin);
+
+ return true;
+}
+
+/*virtual*/ unsigned long CPEFile::GetLength() {
+ return mLength;
+}
+
+/*virtual*/ unsigned long CPEFile::GetPosition() {
+ return mFile->GetPosition() - mStartPosition;
+}
+
+/*virtual*/ long CPEFile::Seek(long offset, unsigned int from) {
+ if (from == CFile::begin)
+ return mFile->Seek(offset + mStartPosition, from) - mStartPosition;
+ else
+ return mFile->Seek(offset, from) - mStartPosition;
+}
+
+/*virtual*/ unsigned int CPEFile::Read(void* buf, unsigned int len) {
+ int remaining = mLength - GetPosition();
+ if (remaining < 0 || len > remaining)
+ len = remaining;
+ return mFile->Read(buf, len);
+}
+
+/*virtual*/ void CPEFile::Write(void* buf, unsigned int len) {
+ int remaining = mLength - GetPosition();
+ if (remaining < 0 || len > remaining)
+ MessageBox(NULL, "CPEFile::Write overrun", "ERROR", MB_OK);
+ else
+ mFile->Write(buf, len);
+}
diff --git a/src/T2DLL/CPEFile.h b/src/T2DLL/CPEFile.h
new file mode 100644
index 0000000..e27a1fa
--- /dev/null
+++ b/src/T2DLL/CPEFile.h
@@ -0,0 +1,44 @@
+#pragma once
+#include "common.h"
+
+struct RESTRACKERWORK {
+ int didRead;
+ IMAGE_RESOURCE_DIRECTORY directory;
+ unsigned long position;
+ int nextIndex;
+ IMAGE_RESOURCE_DIRECTORY_ENTRY entry;
+};
+
+class DLL_EXPORT CPEFile {
+public:
+ CPEFile(const CPEFile&);
+ CPEFile& operator=(const CPEFile&);
+ CPEFile();
+ ~CPEFile();
+
+ virtual BOOL Open(const char*, unsigned int, CFileException* exc = NULL);
+ virtual void Close();
+ virtual long Seek(long offset, unsigned int from);
+ virtual BOOL Seek(const char* name);
+ virtual unsigned long GetLength();
+ virtual unsigned long GetPosition();
+ virtual unsigned int Read(void* buf, unsigned int len);
+ virtual void Write(void* buf, unsigned int len);
+
+ BOOL EnumResource(CString& s, RESTRACKERWORK& work);
+ void EnterDirectory(RESTRACKERWORK& child, RESTRACKERWORK& parent);
+
+protected:
+ BOOL Init();
+ BOOL EnumResourceDirectory(IMAGE_RESOURCE_DIRECTORY_ENTRY* entry, RESTRACKERWORK& work);
+ void GetResourceName(CString& s, IMAGE_RESOURCE_DIRECTORY_ENTRY& entry);
+
+private:
+ CFile *mFile;
+ IMAGE_FILE_HEADER mFileHeader;
+ IMAGE_SECTION_HEADER *mSectionHeaders;
+ DWORD mRsrcPtr;
+ int mRsrcIndex;
+ unsigned long mStartPosition;
+ unsigned long mLength;
+};
diff --git a/src/T2DLL/CPieChartView.cpp b/src/T2DLL/CPieChartView.cpp
new file mode 100644
index 0000000..cc00bf4
--- /dev/null
+++ b/src/T2DLL/CPieChartView.cpp
@@ -0,0 +1,16 @@
+#include "CPieChartView.h"
+
+/*static*/ CPieChartView* CPieChartView::CreateCPieChartViewStream(T2Archive*) {
+}
+
+CPieChartView::CPieChartView(T2Archive*) {
+}
+
+/*virtual*/ CPieChartView::~CPieChartView() {
+}
+
+void CPieChartView::DrawSelf() {
+}
+
+void CPieChartView::CutPie(const CPieChartView::Pie*) {
+}
diff --git a/src/T2DLL/CPieChartView.h b/src/T2DLL/CPieChartView.h
new file mode 100644
index 0000000..8980203
--- /dev/null
+++ b/src/T2DLL/CPieChartView.h
@@ -0,0 +1,11 @@
+#pragma once
+#include "common.h"
+
+class CPieChartView {
+public:
+ static CPieChartView* CreateCPieChartViewStream(T2Archive*);
+ CPieChartView(T2Archive*);
+ virtual ~CPieChartView();
+ void DrawSelf();
+ void CutPie(const CPieChartView::Pie*);
+};
diff --git a/src/T2DLL/CPiledMultiBarChartView.cpp b/src/T2DLL/CPiledMultiBarChartView.cpp
new file mode 100644
index 0000000..16b602e
--- /dev/null
+++ b/src/T2DLL/CPiledMultiBarChartView.cpp
@@ -0,0 +1,25 @@
+#include "CPiledMultiBarChartView.h"
+
+/*static*/ CPiledMultiBarChartView* CPiledMultiBarChartView::CreateCPiledMultiBarChartViewStream(T2Archive*) {
+}
+
+CPiledMultiBarChartView::CPiledMultiBarChartView(T2Archive*) {
+}
+
+/*virtual*/ CPiledMultiBarChartView::~CPiledMultiBarChartView() {
+}
+
+void CPiledMultiBarChartView::SetGraphData(const CPiledMultiBarChartView::GraphData*) {
+}
+
+void CPiledMultiBarChartView::SetPixelPerValue(int, int) {
+}
+
+void CPiledMultiBarChartView::SetColorOfPiles(int, const unsigned long*, int) {
+}
+
+void CPiledMultiBarChartView::Refresh() {
+}
+
+void CPiledMultiBarChartView::DrawSelf() {
+}
diff --git a/src/T2DLL/CPiledMultiBarChartView.h b/src/T2DLL/CPiledMultiBarChartView.h
new file mode 100644
index 0000000..4a54d23
--- /dev/null
+++ b/src/T2DLL/CPiledMultiBarChartView.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class CPiledMultiBarChartView {
+public:
+ static CPiledMultiBarChartView* CreateCPiledMultiBarChartViewStream(T2Archive*);
+ CPiledMultiBarChartView(T2Archive*);
+ virtual ~CPiledMultiBarChartView();
+ void SetGraphData(const CPiledMultiBarChartView::GraphData*);
+ void SetPixelPerValue(int, int);
+ void SetColorOfPiles(int, const unsigned long*, int);
+ void Refresh();
+ void DrawSelf();
+};
diff --git a/src/T2DLL/CPlugin.cpp b/src/T2DLL/CPlugin.cpp
new file mode 100644
index 0000000..15ec926
--- /dev/null
+++ b/src/T2DLL/CPlugin.cpp
@@ -0,0 +1,21 @@
+#include "CPlugin.h"
+
+CPlugin::CPlugin(DWORD type, T2PluginSpecifier& specifier) {
+ mSpecifier = specifier;
+ mModuleHandle = specifier.mInstance;
+ mType = type;
+ mIsLoaded = false;
+}
+
+/*virtual*/ CPlugin::~CPlugin() {
+}
+
+/*virtual*/ void CPlugin::GetName(CString&) {
+}
+
+/*virtual*/ void CPlugin::GetInfoString(CString&) {
+}
+
+/*virtual*/ HINSTANCE CPlugin::GetModuleHandle() {
+ return mModuleHandle;
+}
diff --git a/src/T2DLL/CPlugin.h b/src/T2DLL/CPlugin.h
new file mode 100644
index 0000000..866157c
--- /dev/null
+++ b/src/T2DLL/CPlugin.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "common.h"
+#include "T2PluginSpecifier.h"
+
+class DLL_EXPORT CPlugin {
+public:
+ CPlugin(DWORD type, T2PluginSpecifier& specifier);
+ virtual ~CPlugin();
+ virtual DWORD GetPluginStyle() { return 'plug'; }
+ virtual void GetName(CString&);
+ virtual void GetInfoString(CString&);
+ virtual HINSTANCE GetModuleHandle();
+
+ DWORD GetType() { return mType; }
+ BOOL IsLoaded() { return mIsLoaded; }
+
+protected:
+ BOOL mIsLoaded;
+ DWORD mType;
+ T2PluginSpecifier mSpecifier;
+
+public:
+ // this gets accessed by T2PaletteAnime without an inline
+ HINSTANCE mModuleHandle;
+ T2ImageObj *mImageObj;
+};
diff --git a/src/T2DLL/CPluginInfo.cpp b/src/T2DLL/CPluginInfo.cpp
new file mode 100644
index 0000000..e836e42
--- /dev/null
+++ b/src/T2DLL/CPluginInfo.cpp
@@ -0,0 +1,99 @@
+#include "CPluginInfo.h"
+#include "T2Archive.h"
+
+/*static*/ CPluginInfo* CPluginInfo::ReadPluginInfo(T2Archive& archive) {
+ CPluginInfo *info = new CPluginInfo;
+ info->Read(archive);
+ return info;
+}
+
+CPluginInfo::CPluginInfo() {
+ mType = 0;
+ mID = 0;
+ mItemType = 0;
+ mMustItem = 0;
+ mName = "";
+ mFileName = "";
+ mUsed = false;
+}
+
+CPluginInfo::CPluginInfo(DWORD type, DWORD id, int itemType, int mustItem, const char* name, const char* fileName) {
+ mType = type;
+ mID = id;
+ mItemType = itemType;
+ mMustItem = mustItem;
+ mName = name;
+ mFileName = fileName;
+ mUsed = false;
+}
+
+/*virtual*/ CPluginInfo::~CPluginInfo() {
+}
+
+void CPluginInfo::GetName(CString& outStr) {
+ outStr = mName;
+}
+
+void CPluginInfo::GetFileName(CString& outStr) {
+ outStr = mFileName;
+}
+
+void CPluginInfo::Read(T2Archive& archive) {
+ short s;
+ unsigned char i, c;
+
+ archive >> mType;
+ archive >> mID;
+
+ archive >> s;
+ mItemType = s;
+ archive >> s;
+ mMustItem = s;
+
+ archive >> c;
+ for (i = 0; i < c; i++) {
+ char ch;
+ archive >> ch;
+ mName += ch;
+ }
+
+ archive >> c;
+ for (i = 0; i < c; i++) {
+ char ch;
+ archive >> ch;
+ mFileName += ch;
+ }
+
+ char buf[1024];
+ sprintf(buf, "PluginInfo %s, %s\n", mName, mFileName);
+ TRACE(buf);
+
+ archive >> c;
+ mUsed = c != 0;
+}
+
+void CPluginInfo::Write(T2Archive& archive) {
+ short s;
+ unsigned char i, c;
+
+ archive << mType;
+ archive << mID;
+
+ s = mItemType;
+ archive << s;
+ s = mMustItem;
+ archive << s;
+
+ c = mName.GetLength();
+ archive << c;
+ for (i = 0; i < c; i++)
+ archive << mName.GetAt(i);
+
+ c = mFileName.GetLength();
+ archive << c;
+ for (i = 0; i < c; i++)
+ archive << mFileName.GetAt(i);
+
+ c = mUsed != false;
+ archive << c;
+}
diff --git a/src/T2DLL/CPluginInfo.h b/src/T2DLL/CPluginInfo.h
new file mode 100644
index 0000000..c47cdd5
--- /dev/null
+++ b/src/T2DLL/CPluginInfo.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT CPluginInfo {
+public:
+ static CPluginInfo* ReadPluginInfo(T2Archive& archive);
+protected:
+ CPluginInfo();
+public:
+ CPluginInfo(DWORD type, DWORD id, int itemType, int mustItem, const char* name, const char* fileName);
+ virtual ~CPluginInfo();
+ void GetName(CString& outStr);
+ void GetFileName(CString& outStr);
+ void Read(T2Archive& archive);
+ void Write(T2Archive& archive);
+
+ DWORD GetType() { return mType; }
+ DWORD GetID() { return mID; }
+ int GetItemType() { return mItemType; }
+ BOOL IsUsed() { return mUsed; }
+ void SetUsed(BOOL v) { mUsed = v; }
+
+protected:
+ DWORD mType;
+ DWORD mID;
+ int mItemType;
+ int mMustItem;
+ CString mName;
+ CString mFileName;
+ BOOL mUsed;
+};
diff --git a/src/T2DLL/CPluginInfoArray.cpp b/src/T2DLL/CPluginInfoArray.cpp
new file mode 100644
index 0000000..ea6f34b
--- /dev/null
+++ b/src/T2DLL/CPluginInfoArray.cpp
@@ -0,0 +1,34 @@
+#include "CPluginInfo.h"
+#include "CPluginInfoArray.h"
+#include "CPluginInfoComparator.h"
+
+CPluginInfoArray::CPluginInfoArray(BOOL ownsPluginInfo)
+ : LArray(sizeof(CPluginInfo *), CPluginInfoComparator::GetComparator(), true)
+{
+ mOwnsComparator = false;
+ mOwnsPluginInfo = ownsPluginInfo;
+}
+
+/*virtual*/ CPluginInfoArray::~CPluginInfoArray() {
+ if (mOwnsPluginInfo) {
+ LArrayIterator iter(*this);
+ CPluginInfo *pluginInfo;
+
+ while (iter.Next(&pluginInfo))
+ delete pluginInfo;
+ }
+}
+
+int CPluginInfoArray::GetUsedCount() {
+ int count = 0;
+
+ LArrayIterator iter(*this);
+ CPluginInfo *pluginInfo;
+
+ while (iter.Next(&pluginInfo)) {
+ if (pluginInfo->IsUsed())
+ count++;
+ }
+
+ return count;
+}
diff --git a/src/T2DLL/CPluginInfoArray.h b/src/T2DLL/CPluginInfoArray.h
new file mode 100644
index 0000000..e9fb2bb
--- /dev/null
+++ b/src/T2DLL/CPluginInfoArray.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "common.h"
+#include "LArray.h"
+
+class DLL_EXPORT CPluginInfoArray : public LArray {
+public:
+ CPluginInfoArray(BOOL ownsPluginInfo = true);
+ virtual ~CPluginInfoArray();
+ int GetUsedCount();
+
+protected:
+ BOOL mOwnsPluginInfo;
+};
diff --git a/src/T2DLL/CPluginInfoComparator.cpp b/src/T2DLL/CPluginInfoComparator.cpp
new file mode 100644
index 0000000..1886613
--- /dev/null
+++ b/src/T2DLL/CPluginInfoComparator.cpp
@@ -0,0 +1,34 @@
+#include "CPluginInfo.h"
+#include "CPluginInfoComparator.h"
+
+/*virtual*/ int CPluginInfoComparator::Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const {
+ CPluginInfo *infoOne = *((CPluginInfo **) inItemOne);
+ CPluginInfo *infoTwo = *((CPluginInfo **) inItemTwo);
+
+ if (!infoTwo)
+ return -1;
+ else if (!infoOne)
+ return 1;
+ else
+ return infoOne->GetID() - infoTwo->GetID();
+}
+
+/*virtual*/ BOOL CPluginInfoComparator::IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const {
+ CPluginInfo *infoOne = *((CPluginInfo **) inItemOne);
+ CPluginInfo *infoTwo = *((CPluginInfo **) inItemTwo);
+ return infoOne->GetID() == infoTwo->GetID();
+}
+
+/*virtual*/ int CPluginInfoComparator::CompareToKey(const void* inItem, unsigned int inSize, const void* inKey) const {
+ CPluginInfo *item = *((CPluginInfo **) inItem);
+ DWORD key = *((const DWORD *) inKey);
+ return item->GetID() - key;
+}
+
+/*static*/ CPluginInfoComparator* CPluginInfoComparator::sCPluginInfoComparator;
+
+/*static*/ CPluginInfoComparator* CPluginInfoComparator::GetComparator() {
+ if (!sCPluginInfoComparator)
+ sCPluginInfoComparator = new CPluginInfoComparator;
+ return sCPluginInfoComparator;
+}
diff --git a/src/T2DLL/CPluginInfoComparator.h b/src/T2DLL/CPluginInfoComparator.h
new file mode 100644
index 0000000..e2408de
--- /dev/null
+++ b/src/T2DLL/CPluginInfoComparator.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+#include "LComparator.h"
+
+class DLL_EXPORT CPluginInfoComparator : public LComparator {
+public:
+ virtual ~CPluginInfoComparator() { }
+ virtual int Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
+ virtual BOOL IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
+ virtual int CompareToKey(const void* inItem, unsigned int inSize, const void* inKey) const;
+ static CPluginInfoComparator* GetComparator();
+protected:
+ static CPluginInfoComparator* sCPluginInfoComparator;
+};
diff --git a/src/T2DLL/CProgramPlugin.cpp b/src/T2DLL/CProgramPlugin.cpp
new file mode 100644
index 0000000..e3c28aa
--- /dev/null
+++ b/src/T2DLL/CProgramPlugin.cpp
@@ -0,0 +1,30 @@
+#include "CProgramPlugin.h"
+
+CProgramPlugin::CProgramPlugin(DWORD type, T2PluginSpecifier& specifier)
+ : CFilePlugin(type, specifier)
+{
+ mTemplatePlugin = NULL;
+}
+
+/*virtual*/ CProgramPlugin::~CProgramPlugin() {
+}
+
+/*virtual*/ void CProgramPlugin::GetInfoString(CString& outStr) {
+ outStr.Format("%d", mType);
+ outStr += " ";
+
+ CString name;
+ GetName(name);
+ outStr += name;
+}
+
+/*virtual*/ BOOL CProgramPlugin::LoadAllTemplatePlugin(HINSTANCE, T2WorldDef*, T2TemplatePluginDB*) {
+ return true;
+}
+
+/*virtual*/ void CProgramPlugin::DrawProc(T2HaveOutViewObject*, const RECT&, T2TowerDoc*) {
+}
+
+/*virtual*/ unsigned int CProgramPlugin::IdleProc(T2HaveOutViewObject*, T2TowerDoc*) {
+ return 0xFFFFFFFF;
+}
diff --git a/src/T2DLL/CProgramPlugin.h b/src/T2DLL/CProgramPlugin.h
new file mode 100644
index 0000000..902cee1
--- /dev/null
+++ b/src/T2DLL/CProgramPlugin.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+#include "CFilePlugin.h"
+
+class DLL_EXPORT CProgramPlugin : public CFilePlugin {
+public:
+ CProgramPlugin(DWORD type, T2PluginSpecifier& specifier);
+ virtual ~CProgramPlugin();
+ virtual DWORD GetPluginStyle() { return 'PPlg'; }
+ virtual void GetInfoString(CString& outStr);
+ virtual BOOL LoadAllTemplatePlugin(HINSTANCE, T2WorldDef*, T2TemplatePluginDB*);
+ virtual void DrawProc(T2HaveOutViewObject*, const RECT&, T2TowerDoc*);
+ virtual unsigned int IdleProc(T2HaveOutViewObject*, T2TowerDoc*);
+
+ T2TemplatePlugin* GetTemplatePlugin() { return mTemplatePlugin; }
+ BOOL HasDrawProc() { return false; }
+
+protected:
+ T2TemplatePlugin *mTemplatePlugin;
+};
diff --git a/src/T2DLL/CResFile.cpp b/src/T2DLL/CResFile.cpp
new file mode 100644
index 0000000..3c31ec7
--- /dev/null
+++ b/src/T2DLL/CResFile.cpp
@@ -0,0 +1,459 @@
+#include "CPEFile.h"
+#include "CResFile.h"
+#include "GlobalFunc.h"
+
+CResFile::CResFile() {
+ mBuffer = NULL;
+ mPos = NULL;
+ mIsBinaryMode = false;
+ mIsSubPlugin = false;
+}
+
+/*virtual*/ CResFile::~CResFile() {
+ Reset();
+}
+
+BOOL CResFile::OpenResource(HINSTANCE inst, int name, int type) {
+ return OpenResource(inst, MAKEINTATOM(name), type);
+}
+
+BOOL CResFile::OpenResource(HINSTANCE inst, const char* name, int type) {
+ char buf[5], a;
+ *((int *) &buf[0]) = type;
+
+ a = buf[0];
+ buf[0] = buf[3];
+ buf[3] = a;
+
+ a = buf[1];
+ buf[1] = buf[2];
+ buf[2] = a;
+
+ buf[4] = 0;
+
+ return OpenResource(inst, name, buf);
+}
+
+BOOL CResFile::OpenResource(HINSTANCE inst, int name, const char* type) {
+ return OpenResource(inst, MAKEINTATOM(name), type);
+}
+
+BOOL CResFile::OpenResource(HINSTANCE inst, const char* name, const char* type) {
+ HRSRC h = FindResource(inst, name, type);
+ if (!h) {
+ CString strN;
+ if (((DWORD) name) < 0x10000)
+ strN.Format("(%d)", ((DWORD) name) & 0xFFFF);
+ else
+ strN = name;
+
+ CString strT;
+ if (((DWORD) type) < 0x10000)
+ strT.Format("(%d)", ((DWORD) type) & 0xFFFF);
+ else
+ strT = type;
+
+ CString str = "CResFile::OpenResource ERROR : " + strN + "," + strT + " @" + GetModuleName(inst) + "\n";
+ OutputDebugString(str);
+
+ return false;
+ }
+
+ return OpenResource(inst, h);
+}
+
+BOOL CResFile::OpenResource(HINSTANCE inst, HRSRC rsrc) {
+ if (mBuffer)
+ Reset();
+
+ mInstance = inst;
+ mRsrc = rsrc;
+
+ HANDLE handle = LoadResource(inst, rsrc);
+ if (!handle)
+ return false;
+
+ void *p = LockResource(handle);
+ mRemaining = SizeofResource(inst, rsrc);
+ mBuffer = (char *) malloc(mRemaining + 1);
+ memcpy(mBuffer, p, mRemaining);
+ UnlockResource(handle);
+ FreeResource(handle);
+
+ SetupResource();
+
+ return true;
+}
+
+BOOL CResFile::OpenResource(const char* path, int name, int type) {
+ CFile *theFile = new CFile;
+ if (!theFile->Open(path, CFile::modeRead)) {
+ delete theFile;
+ return false;
+ }
+
+ char magic[2];
+ theFile->Read(magic, 2);
+ theFile->Close();
+ delete theFile;
+
+ if (memcmp(magic, "SP", 2) == 0) {
+ SUBPLUGINFSENTRY entry;
+ CFile *f = OpenSubPluginFS(magic, name, type, &entry);
+ if (!f)
+ return false;
+
+ mRemaining = entry.spfse_mC;
+ mBuffer = (char *) malloc(mRemaining + 1);
+ f->Read(mBuffer, mRemaining);
+ f->Close();
+ delete f;
+
+ mIsSubPlugin = true;
+ } else if (memcmp(magic, "PE", 2) == 0) {
+ CPEFile pe;
+ if (!pe.Open(path, CFile::modeRead))
+ return false;
+
+ char buf[8];
+ buf[0] = ((char *) &type)[3];
+ buf[1] = ((char *) &type)[2];
+ buf[2] = ((char *) &type)[1];
+ buf[3] = ((char *) &type)[0];
+ buf[4] = 0;
+
+ CString str;
+ unsigned short langID = GetUserDefaultLangID();
+ str.Format("\\.rsrc\\%s\\#%d\\#%d", buf, name, langID);
+ if (!pe.Seek(str))
+ return false;
+
+ mRemaining = pe.GetLength();
+ mBuffer = (char *) malloc(mRemaining + 1);
+ pe.Read(mBuffer, mRemaining);
+ pe.Close();
+
+ mIsSubPlugin = false;
+ }
+
+ SetupResource();
+ return true;
+}
+
+void CResFile::SetupResource() {
+ mBuffer[mRemaining] = 0;
+ mPos = mBuffer;
+
+ if (*mPos == 1) {
+ mPos++;
+ mRemaining--;
+ mIsBinaryMode = true;
+ } else {
+ mIsBinaryMode = false;
+ }
+}
+
+void CResFile::Reset() {
+ if (mBuffer)
+ free(mBuffer);
+
+ mBuffer = NULL;
+ mPos = NULL;
+}
+
+BOOL CResFile::Token(char* outStr) {
+ while (*mPos == ' ' || *mPos == '\t' || *mPos == '\n' || *mPos == '\r' || *mPos == ',' || *mPos == '(') {
+ if (*mPos == '(') {
+ while (*mPos != ')')
+ mPos++;
+ }
+ mPos++;
+ }
+
+ if (*mPos == '\0') {
+#line 180
+ _ASSERT(false);
+ return false;
+ }
+
+ char *p = outStr;
+ int len = 0;
+
+ while (*mPos != ' ' && *mPos != '\t' && *mPos != '\n' && *mPos != '\r' && *mPos != ',' && *mPos != '(' && *mPos != '\0') {
+ *p = *mPos;
+ p++;
+ mPos++;
+ len++;
+#line 192
+ _ASSERT(len != 256);
+ }
+
+ *p = 0;
+ return true;
+}
+
+BOOL CResFile::operator>>(unsigned char& out) {
+#line 200
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+#line 204
+ _ASSERT(mRemaining >= 4);
+ mRemaining -= 4;
+ out = *((unsigned char *) mPos);
+ mPos += 4;
+ } else {
+ char buf[256];
+ if (!Token(buf))
+ return false;
+
+ out = atoi(buf);
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(int& out) {
+#line 222
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+#line 226
+ _ASSERT(mRemaining >= 4);
+ mRemaining -= 4;
+ out = *((int *) mPos);
+ mPos += 4;
+ } else {
+ char buf[256];
+ if (!Token(buf))
+ return false;
+
+ out = atoi(buf);
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(short& out) {
+#line 244
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+#line 248
+ _ASSERT(mRemaining >= 4);
+ mRemaining -= 4;
+ out = *((short *) mPos);
+ mPos += 4;
+ } else {
+ char buf[256];
+ if (!Token(buf))
+ return false;
+
+ out = atoi(buf);
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(long& out) {
+#line 266
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+#line 270
+ _ASSERT(mRemaining >= 4);
+ mRemaining -= 4;
+ out = *((long *) mPos);
+ mPos += 4;
+ } else {
+ char buf[256];
+ if (!Token(buf))
+ return false;
+
+ out = atol(buf);
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(unsigned int& out) {
+#line 288
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+#line 292
+ _ASSERT(mRemaining >= 4);
+ mRemaining -= 4;
+ out = *((unsigned int *) mPos);
+ mPos += 4;
+ } else {
+ char buf[256];
+ if (!Token(buf))
+ return false;
+
+ sscanf(buf, "%u", &out);
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(unsigned long& out) {
+#line 310
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+#line 314
+ _ASSERT(mRemaining >= 4);
+ mRemaining -= 4;
+ out = *((unsigned long *) mPos);
+ mPos += 4;
+ } else {
+ char buf[256];
+ if (!Token(buf))
+ return false;
+
+ sscanf(buf, "%u", &out);
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(unsigned short& out) {
+#line 332
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+#line 336
+ _ASSERT(mRemaining >= 4);
+ mRemaining -= 4;
+ out = *((unsigned short *) mPos);
+ mPos += 4;
+ } else {
+ char buf[256];
+ unsigned int val;
+ if (!Token(buf))
+ return false;
+
+ sscanf(buf, "%u", &val);
+ out = val;
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(POINT& outPoint) {
+#line 356
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+ if (!(*this >> outPoint.y)) return false;
+ if (!(*this >> outPoint.x)) return false;
+ } else {
+ if (!(*this >> outPoint.x)) return false;
+ if (!(*this >> outPoint.y)) return false;
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(RECT& outRect) {
+#line 377
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+ if (!(*this >> outRect.top)) return false;
+ if (!(*this >> outRect.left)) return false;
+ if (!(*this >> outRect.bottom)) return false;
+ if (!(*this >> outRect.right)) return false;
+ } else {
+ if (!(*this >> outRect.left)) return false;
+ if (!(*this >> outRect.top)) return false;
+ if (!(*this >> outRect.right)) return false;
+ if (!(*this >> outRect.bottom)) return false;
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(SIZE& outSize) {
+#line 406
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+ if (!(*this >> outSize.cy)) return false;
+ if (!(*this >> outSize.cx)) return false;
+ } else {
+ if (!(*this >> outSize.cx)) return false;
+ if (!(*this >> outSize.cy)) return false;
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(char* outStr) {
+#line 427
+ _ASSERT(mBuffer);
+
+ if (mIsBinaryMode) {
+#line 431
+ _ASSERT(mRemaining >= 1);
+ mRemaining--;
+ int len = mPos[0] + 1;
+ mPos++;
+
+#line 435
+ _ASSERT(mRemaining >= len);
+ mRemaining -= len;
+ memcpy(outStr, mPos, len);
+ mPos += len;
+ } else {
+ char buf[256];
+ char *p = buf;
+
+ while (*mPos == ' ' || *mPos == '\t' || *mPos == '\n' || *mPos == '\r' || *mPos == ',' || *mPos == '(') {
+ if (*mPos == '(') {
+ while (*mPos != ')')
+ mPos++;
+ }
+ mPos++;
+ }
+
+ if (*mPos == '\0')
+ return false;
+
+ while (*mPos != '\n' && *mPos != '\r' && *mPos != '\0') {
+ *p = *mPos;
+ p++;
+ mPos++;
+ }
+
+ *p = 0;
+ strcpy(outStr, buf);
+ }
+
+ return true;
+}
+
+BOOL CResFile::operator>>(CString& outStr) {
+#line 469
+ _ASSERT(mBuffer);
+ char buf[256];
+ *this >> buf;
+ outStr = buf;
+ return true;
+}
+
+void CResFile::SkipDescriptor() {
+ if (mIsBinaryMode) {
+#line 481
+ _ASSERT(mRemaining >= 1);
+ mRemaining--;
+ mPos++;
+ }
+}
+
+void CResFile::End() {
+#line 489
+ _ASSERT(mRemaining == 0);
+}
+
diff --git a/src/T2DLL/CResFile.h b/src/T2DLL/CResFile.h
new file mode 100644
index 0000000..5c10f21
--- /dev/null
+++ b/src/T2DLL/CResFile.h
@@ -0,0 +1,50 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT CResFile {
+public:
+ CResFile();
+ virtual ~CResFile();
+ BOOL OpenResource(HINSTANCE inst, int name, int type);
+ BOOL OpenResource(HINSTANCE inst, const char* name, int type);
+ BOOL OpenResource(HINSTANCE inst, int name, const char* type);
+ BOOL OpenResource(HINSTANCE inst, const char* name, const char* type);
+ BOOL OpenResource(HINSTANCE inst, HRSRC rsrc);
+ BOOL OpenResource(const char* path, int name, int type);
+protected:
+ void SetupResource();
+ void Reset();
+ BOOL Token(char* outStr);
+public:
+ BOOL operator>>(unsigned char& out);
+ BOOL operator>>(int& out);
+ BOOL operator>>(short& out);
+ BOOL operator>>(long& out);
+ BOOL operator>>(unsigned int& out);
+ BOOL operator>>(unsigned long& out);
+ BOOL operator>>(unsigned short& out);
+ BOOL operator>>(POINT& outPoint);
+ BOOL operator>>(RECT& outRect);
+ BOOL operator>>(SIZE& outSize);
+ BOOL operator>>(char* outStr);
+ BOOL operator>>(CString& outStr);
+ void SkipDescriptor();
+ void End();
+
+ void GetResourceInfo(HINSTANCE* outInstance, HRSRC* outRsrc) const {
+ *outInstance = mInstance;
+ *outRsrc = mRsrc;
+ }
+
+ BOOL IsBinaryMode() const { return mIsBinaryMode; }
+ BOOL IsSubPlugin() const { return mIsSubPlugin; }
+
+private:
+ BOOL mIsBinaryMode;
+ HINSTANCE mInstance;
+ HRSRC mRsrc;
+ char *mBuffer;
+ char *mPos;
+ unsigned int mRemaining;
+ BOOL mIsSubPlugin;
+};
diff --git a/src/T2DLL/CResourcePlugin.cpp b/src/T2DLL/CResourcePlugin.cpp
new file mode 100644
index 0000000..833d601
--- /dev/null
+++ b/src/T2DLL/CResourcePlugin.cpp
@@ -0,0 +1,9 @@
+#include "CResourcePlugin.h"
+
+CResourcePlugin::CResourcePlugin(DWORD type, T2PluginSpecifier& specifier)
+ : CFilePlugin(type, specifier)
+{
+}
+
+/*virtual*/ CResourcePlugin::~CResourcePlugin() {
+}
diff --git a/src/T2DLL/CResourcePlugin.h b/src/T2DLL/CResourcePlugin.h
new file mode 100644
index 0000000..a253742
--- /dev/null
+++ b/src/T2DLL/CResourcePlugin.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+#include "CFilePlugin.h"
+
+class DLL_EXPORT CResourcePlugin : public CFilePlugin {
+public:
+ CResourcePlugin(DWORD type, T2PluginSpecifier& specifier);
+ virtual ~CResourcePlugin();
+
+ virtual DWORD GetPluginStyle() { return 'RPlg'; }
+
+protected:
+ int m68; // unknown
+};
diff --git a/src/T2DLL/CToggleButtonDisabled.cpp b/src/T2DLL/CToggleButtonDisabled.cpp
new file mode 100644
index 0000000..e31ae08
--- /dev/null
+++ b/src/T2DLL/CToggleButtonDisabled.cpp
@@ -0,0 +1,86 @@
+#include "CToggleButtonDisabled.h"
+#include "T2BitImage.h"
+
+CToggleButtonDisabled::CToggleButtonDisabled(T2TowerDoc* towerDoc, T2ImageObj* imageObj, CPalette* palette)
+ : T2DlgItem(towerDoc, imageObj, palette)
+{
+}
+
+/*virtual*/ BOOL CToggleButtonDisabled::Create(const char* windowName, DWORD style, const RECT& rect, CWnd* parentWnd, UINT nId) {
+ CRect rect1 = rect;
+ CRect rect2;
+
+ if (GetObjectImage(rect2, windowName, -1, 0, 0, 255)) {
+ rect1.right = rect1.left + rect2.Width();
+ rect1.bottom = rect1.top + rect2.Height();
+ } else {
+ rect1.right = rect1.left + 20;
+ rect1.bottom = rect1.top + 20;
+ }
+
+ return T2DlgItem::Create(windowName, style, rect1, parentWnd, nId);
+}
+
+/*virtual*/ void CToggleButtonDisabled::SetValue(int value) {
+ T2DlgItem::SetValue(value);
+
+ if (IsWindowEnabled()) {
+ if (mValue == 0)
+ SetPattern(0);
+ else if (mValue == 1)
+ SetPattern(100);
+ }
+}
+
+void CToggleButtonDisabled::Enable() {
+ EnableWindow(true);
+ SetValue(mValue);
+}
+
+void CToggleButtonDisabled::Disable() {
+ EnableWindow(false);
+ SetPattern(200);
+}
+
+/*virtual*/ BOOL CToggleButtonDisabled::OnT2DlgItemEraseBkgnd(CDC* dc) {
+ CRect clientRect;
+ GetClientRect(clientRect);
+
+ int savedDC = dc->SaveDC();
+
+ dc->SelectPalette(mPalette, false);
+ dc->RealizePalette();
+
+ CPen pen;
+ CBrush brush;
+
+ CString text;
+ GetWindowText(text);
+
+ RECT imageRect;
+ T2BitImage *image = GetObjectImage(imageRect, text, GetPattern(), 0, 0, 255);
+ if (image)
+ image->CopyImage(dc, imageRect, clientRect, 0, NULL);
+
+ dc->RestoreDC(savedDC);
+
+ return true;
+}
+
+/*virtual*/ void CToggleButtonDisabled::OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt) {
+ SetCapture();
+ m74 = true;
+
+ if (IsWindowEnabled()) {
+ SetValue(!mValue);
+ Notify(mValue ? 2 : 3, NULL);
+ }
+}
+
+/*virtual*/ void CToggleButtonDisabled::OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt) {
+ ReleaseCapture();
+ m74 = false;
+}
+
+/*virtual*/ void CToggleButtonDisabled::OnT2DlgItemMouseMove(UINT nFlags, CPoint pt) {
+}
diff --git a/src/T2DLL/CToggleButtonDisabled.h b/src/T2DLL/CToggleButtonDisabled.h
new file mode 100644
index 0000000..5604257
--- /dev/null
+++ b/src/T2DLL/CToggleButtonDisabled.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+#include "T2DlgItem.h"
+
+class DLL_EXPORT CToggleButtonDisabled : public T2DlgItem {
+public:
+ CToggleButtonDisabled(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual BOOL Create(const char* windowName, DWORD style, const RECT& rect, CWnd* parentWnd, UINT nId);
+ virtual void SetValue(int value);
+ void Enable();
+ void Disable();
+protected:
+ virtual BOOL OnT2DlgItemEraseBkgnd(CDC* dc);
+ virtual void OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemMouseMove(UINT nFlags, CPoint pt);
+};
diff --git a/src/T2DLL/CTokenizer.cpp b/src/T2DLL/CTokenizer.cpp
new file mode 100644
index 0000000..e205c0b
--- /dev/null
+++ b/src/T2DLL/CTokenizer.cpp
@@ -0,0 +1,48 @@
+#include "CTokenizer.h"
+
+CTokenizer::CTokenizer(char *str, const char *newLineChars, const char *spaceChars)
+ : mNext(str)
+ , mCurrent(NULL)
+ , mNewLineChars(newLineChars)
+ , mSpaceChars(spaceChars)
+{
+#line 31
+ _ASSERT(mNext);
+
+ if (!mNewLineChars)
+ mNewLineChars = "\r\n\t";
+ if (!mSpaceChars)
+ mSpaceChars = " \r\n\t";
+}
+
+/*virtual*/ CTokenizer::~CTokenizer() {
+}
+
+CTokenizer& CTokenizer::operator=(char *str) {
+ mNext = str;
+ mCurrent = NULL;
+
+#line 49
+ _ASSERT(mNext);
+ return *this;
+}
+
+const char* CTokenizer::NextToken(const char *delim) {
+#line 58
+ _ASSERT(delim);
+
+ mCurrent = mNext;
+
+ if (mNext) {
+ mNext = (char *) _mbspbrk((unsigned char *) mNext, (const unsigned char *) delim);
+ if (mNext) {
+ mNext[0] = 0;
+ mNext++;
+ mNext += _mbsspn((unsigned char *) mNext, (const unsigned char *) delim);
+ if (mNext[0] == 0)
+ mNext = NULL;
+ }
+ }
+
+ return mCurrent;
+}
diff --git a/src/T2DLL/CTokenizer.h b/src/T2DLL/CTokenizer.h
new file mode 100644
index 0000000..3ad28a5
--- /dev/null
+++ b/src/T2DLL/CTokenizer.h
@@ -0,0 +1,33 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT CTokenizer {
+public:
+ CTokenizer(char *str, const char *newLineChars = NULL, const char *spaceChars = NULL);
+ virtual ~CTokenizer();
+ CTokenizer& operator=(char *str);
+
+ const char* Current() const {
+ return mCurrent;
+ }
+
+ const char* NextString(const char *delim = NULL) {
+ return NextToken(delim ? delim : mNewLineChars);
+ }
+
+ const char* NextWord(const char *delim = NULL) {
+ return NextToken(delim ? delim : mSpaceChars);
+ }
+
+ int NextInteger(const char *delim = NULL) {
+ return atoi(NextToken(delim ? delim : mSpaceChars));
+ }
+
+protected:
+ const char* NextToken(const char *delim);
+
+ char *mNext;
+ char *mCurrent;
+ const char *mNewLineChars;
+ const char *mSpaceChars;
+};
diff --git a/src/T2DLL/GlobalFunc.cpp b/src/T2DLL/GlobalFunc.cpp
new file mode 100644
index 0000000..b210cc6
--- /dev/null
+++ b/src/T2DLL/GlobalFunc.cpp
@@ -0,0 +1,82 @@
+#include "GlobalFunc.h"
+
+char *strtokEx(char *, const char *, char **) {
+}
+
+void InsetRect(RECT *, int, int) {
+}
+
+void SetPt(POINT *, int, int) {
+}
+
+HBITMAP Create256DIBitmap(HDC, int, int) {
+}
+
+LOGPALETTE *ConvACTPalette(ACTPALETTEENTRY *) {
+}
+
+LOGPALETTE *LoadACTPaletteEntries(HINSTANCE, int) {
+}
+
+void FFSetStaticForce(int, int) {
+}
+
+CString GetInstallSource() {
+}
+
+CString GetInstallSourceDrive() {
+}
+
+T2TowerDoc *GetCurrentT2TowerDoc() {
+}
+
+HINSTANCE GetWorldModuleHandle() {
+}
+
+CString GetModuleName(HINSTANCE) {
+}
+
+unsigned int TickCount() {
+}
+
+int DispatchOptionEvent(OPTIONEVENTTYPE, void *) {
+}
+
+CFile *OpenSubPluginFS(const char *, int, int, SUBPLUGINFSENTRY *) {
+}
+
+void __Rep0(const char *, int, const char *) {
+}
+
+void __Rep1(const char *, int, const char *, unsigned long) {
+}
+
+void __Rep2(const char *, int, const char *, unsigned long, unsigned long) {
+}
+
+void GetTowerDirectory(char *) {
+}
+
+CString GetTowerDirectory() {
+}
+
+CString LoadStringA(HINSTANCE, int, int) {
+}
+
+CString LoadStringTable(HINSTANCE, int, int) {
+}
+
+void CopyPalette(LOGPALETTE *, LOGPALETTE *, int, int, int) {
+}
+
+void WriteMachineProfileString(const char *, const char *, const char *) {
+}
+
+void WriteMachineProfileInt(const char *, const char *, int) {
+}
+
+CString GetMachineProfileString(const char *, const char *, const char *) {
+}
+
+int GetMachineProfileInt(const char *, const char *, int) {
+}
diff --git a/src/T2DLL/GlobalFunc.h b/src/T2DLL/GlobalFunc.h
new file mode 100644
index 0000000..9375677
--- /dev/null
+++ b/src/T2DLL/GlobalFunc.h
@@ -0,0 +1,40 @@
+#pragma once
+#include "common.h"
+
+struct ACTPALETTEENTRY;
+struct SUBPLUGINFSENTRY {
+ int spfse_m0;
+ int spfse_m4;
+ int spfse_m8;
+ int spfse_mC; // size?
+};
+
+char *strtokEx(char *, const char *, char **);
+void InsetRect(RECT *, int, int);
+void SetPt(POINT *, int, int);
+HBITMAP Create256DIBitmap(HDC, int, int);
+LOGPALETTE *ConvACTPalette(ACTPALETTEENTRY *);
+LOGPALETTE *LoadACTPaletteEntries(HINSTANCE, int);
+void FFSetStaticForce(int, int);
+CString GetInstallSource();
+CString GetInstallSourceDrive();
+T2TowerDoc *GetCurrentT2TowerDoc();
+HINSTANCE GetWorldModuleHandle();
+CString GetModuleName(HINSTANCE);
+unsigned int TickCount();
+int DispatchOptionEvent(OPTIONEVENTTYPE, void *);
+CFile *OpenSubPluginFS(const char *, int, int, SUBPLUGINFSENTRY *);
+void __Rep0(const char *, int, const char *);
+void __Rep1(const char *, int, const char *, unsigned long);
+void __Rep2(const char *, int, const char *, unsigned long, unsigned long);
+void GetTowerDirectory(char *);
+CString GetTowerDirectory();
+CString LoadStringA(HINSTANCE, int, int);
+CString LoadStringTable(HINSTANCE, int, int);
+void CopyPalette(LOGPALETTE *, LOGPALETTE *, int, int, int);
+void WriteMachineProfileString(const char *, const char *, const char *);
+void WriteMachineProfileInt(const char *, const char *, int);
+CString GetMachineProfileString(const char *, const char *, const char *);
+int GetMachineProfileInt(const char *, const char *, int);
+
+DLL_EXPORT CT2App *gT2App;
diff --git a/src/T2DLL/LArray.cpp b/src/T2DLL/LArray.cpp
new file mode 100644
index 0000000..647162f
--- /dev/null
+++ b/src/T2DLL/LArray.cpp
@@ -0,0 +1,406 @@
+#include "LArray.h"
+#include "T2Archive.h"
+
+// unknown/assumed name -- not in T2DLL exports!
+class LDefaultComparator : public LComparator {
+public:
+ LDefaultComparator();
+ virtual ~LDefaultComparator();
+ virtual int Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
+ virtual BOOL IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
+ static LDefaultComparator* GetComparator();
+protected:
+ static LDefaultComparator* sDefaultComparator;
+};
+
+LArray::LArray() {
+ init(sizeof(void *), NULL, false);
+}
+
+LArray::LArray(int size, LComparator* comparator, BOOL keepSorted) {
+ init(size, comparator, keepSorted);
+}
+
+void LArray::init(int size, LComparator* comparator, BOOL keepSorted) {
+ mKeepSorted = keepSorted;
+ mOwnsComparator = true;
+ if (!comparator) {
+ mComparator = LDefaultComparator::GetComparator();
+ mOwnsComparator = false;
+ } else {
+ mComparator = comparator;
+ }
+ mItemSize = size;
+ mItemCount = 0;
+ mExpandSize = 10;
+ mBuffer = malloc(mExpandSize * mItemSize);
+}
+
+LArray::~LArray() {
+ if (mComparator && mOwnsComparator)
+ delete mComparator;
+ free(mBuffer);
+}
+
+/*virtual*/ int LArray::GetCount() const {
+ return mItemCount;
+}
+
+void LArray::Expand(int amount) {
+ int threshold = mItemCount + amount;
+ if (threshold > mExpandSize) {
+ mExpandSize = threshold + 10;
+ mBuffer = realloc(mBuffer, mExpandSize * mItemSize);
+ }
+ mItemCount += amount;
+}
+
+void LArray::AdjustAllocation(int amount) {
+ if (amount > mExpandSize) {
+ mExpandSize = amount + 10;
+ mBuffer = realloc(mBuffer, mExpandSize * mItemSize);
+ }
+}
+
+void LArray::SetKeepSorted(int keepSorted) {
+ mKeepSorted = keepSorted;
+}
+
+/*virtual*/ void LArray::InsertItemsAt(int count, int where, const void* data) {
+ if (!mKeepSorted) {
+ if (where == 0)
+ where = 1;
+
+ int oldCount = mItemCount;
+ Expand(count);
+ memmove(
+ (char *) mBuffer + mItemSize * (where - 1 + count),
+ (char *) mBuffer + mItemSize * (where - 1),
+ mItemSize * (oldCount - (where - 1))
+ );
+
+ if (data) {
+ for (int i = 0; i < count; i++) {
+ memcpy((char *) mBuffer + mItemSize * (where - 1 + i), data, mItemSize);
+ }
+ }
+ } else {
+ for (int i = 0; i < count; i++) {
+ Add((const char *) data + i * mItemSize);
+ }
+ }
+}
+
+/*virtual*/ void LArray::RemoveItemsAt(int count, int where) {
+#line 94
+ _ASSERT(where > 0);
+
+ if (where < (mItemCount + 1)) {
+ memmove(
+ (char *) mBuffer + mItemSize * (where - 1),
+ (char *) mBuffer + mItemSize * (where - 1 + count),
+ mItemSize * (mItemCount - (where - 1 + count))
+ );
+ }
+
+ mItemCount -= count;
+}
+
+/*virtual*/ void LArray::Remove(const void* item) {
+ int index = FetchIndexOf(item);
+ if (index != 0)
+ RemoveItemsAt(1, index);
+}
+
+/*virtual*/ int LArray::FetchIndexOf(const void* item) const {
+ char *p = (char *) mBuffer;
+ for (int i = 0; i < mItemCount; i++) {
+ if (memcmp(p, item, mItemSize) == 0)
+ return i + 1;
+ p += mItemSize;
+ }
+ return 0;
+}
+
+/*virtual*/ int LArray::FetchItemAt(int index, void* outItem) const {
+#line 123
+ _ASSERT(index > 0);
+
+ if (index > mItemCount)
+ return false;
+
+ memcpy(outItem, (char *) mBuffer + mItemSize * (index - 1), mItemSize);
+ return true;
+}
+
+/*virtual*/ void LArray::AssignItemsAt(int count, int where, void* data) {
+ if (!mKeepSorted) {
+#line 134
+ _ASSERT(where > 0);
+
+ if ((where - 1 + count) > mItemCount)
+ Expand((where - 1 + count) - mItemCount);
+
+ if (data) {
+ for (int i = 0; i < count; i++) {
+ memcpy((char *) mBuffer + mItemSize * (where - 1 + i), data, mItemSize);
+ }
+ }
+ } else {
+ if ((where - 1 + count) > mItemCount)
+ Expand((where - 1 + count) - mItemCount);
+
+ RemoveItemsAt(count, where);
+ InsertItemsAt(count, where, data);
+ }
+}
+
+/*virtual*/ void LArray::Add(const void* item) {
+ if (!mKeepSorted) {
+ Expand(1);
+ memcpy((char *) mBuffer + mItemSize * (mItemCount - 1), item, mItemSize);
+ } else {
+ char *p = (char *) mBuffer;
+ int i;
+
+ for (i = 0; i < mItemCount; i++) {
+ if (mComparator->Compare(item, p, mItemSize, mItemSize) < 0) {
+ mKeepSorted = false;
+ InsertItemsAt(1, i + 1, item);
+ mKeepSorted = true;
+ break;
+ }
+ p += mItemSize;
+ }
+
+ if (i == mItemCount) {
+ mKeepSorted = false;
+ Add(item);
+ mKeepSorted = true;
+ }
+ }
+}
+
+void LArray::SetComparator(LComparator* comparator) {
+ if (mComparator && mOwnsComparator)
+ delete mComparator;
+ mComparator = comparator;
+}
+
+/*virtual*/ void LArray::ReadAsWord(T2Archive& archive) {
+ int itemSize;
+ int count;
+ int i;
+ unsigned char zero;
+ int totalSize;
+ unsigned short item;
+
+ archive >> itemSize;
+ archive >> count;
+ archive >> i;
+ archive >> i;
+ archive >> zero;
+ archive >> zero;
+ archive >> totalSize;
+
+ if (mItemCount > 0)
+ RemoveItemsAt(mItemCount, 1);
+
+ for (i = 0; i < count; i++) {
+ archive >> item;
+ unsigned int v = item;
+ Add(&v);
+ }
+
+ for (; i < totalSize / itemSize; i++) {
+ archive >> item;
+ }
+}
+
+/*virtual*/ void LArray::WriteAsWord(T2Archive& archive) {
+ int boop = 2;
+ archive << boop;
+
+ boop = mItemCount;
+ archive << boop;
+
+ int byteCount = boop * 2;
+ archive << byteCount;
+ archive << byteCount;
+
+ unsigned char zero = 0;
+ archive << zero;
+
+ zero = 0;
+ archive << zero;
+
+ int totalSize = mItemCount * 2;
+ archive << totalSize;
+
+ LArrayIterator iter(*this);
+ unsigned int item;
+ while (iter.Next(&item)) {
+ unsigned short v = item;
+ archive << v;
+ }
+}
+
+/*virtual*/ void LArray::ReadAsDWord(T2Archive& archive) {
+ unsigned long code;
+ archive >> code;
+#line 261
+ _ASSERT(code == 'Darr');
+
+ if (mItemCount > 0)
+ RemoveItemsAt(mItemCount, 1);
+
+ int count;
+ archive >> count;
+
+ unsigned int item;
+ for (int i = 0; i < count; i++) {
+ archive >> item;
+ Add(&item);
+ }
+}
+
+/*virtual*/ void LArray::ReadAsChar(T2Archive& archive) {
+ if (mItemCount > 0)
+ RemoveItemsAt(mItemCount, 1);
+
+ int i;
+ int elemSize;
+ int elemCount;
+ int byteCount;
+ int byteCount2;
+ int totalSize;
+ unsigned char buf;
+
+ archive >> elemSize;
+ archive >> elemCount;
+ archive >> byteCount;
+ archive >> byteCount2;
+ archive >> totalSize;
+
+ for (i = 0; i < elemCount; i++) {
+ archive >> buf;
+ Add(&buf);
+ }
+ for (; i < totalSize; i++) {
+ archive >> buf;
+ }
+}
+
+/*virtual*/ void LArray::WriteAsDWord(T2Archive& archive) {
+ unsigned long code = 'Darr';
+ archive << code;
+ archive << mItemCount;
+
+ LArrayIterator iter(*this);
+ unsigned int item;
+ while (iter.Next(&item)) {
+ archive << item;
+ }
+}
+
+/*virtual*/ void LArray::WriteAsChar(T2Archive& archive) {
+ int elemSize = 1;
+ int byteCount = mItemCount;
+ int byteCount2 = byteCount;
+ int totalSize = byteCount;
+
+ archive << elemSize;
+ archive << mItemCount;
+ archive << byteCount;
+ archive << byteCount2;
+ archive << totalSize;
+
+ LArrayIterator iter(*this);
+ unsigned char item;
+ while (iter.Next(&item)) {
+ archive << item;
+ }
+}
+
+LArrayIterator::LArrayIterator(const LArray& array, int index) {
+ mArray = &array;
+ mNextIndex = index;
+}
+
+LArrayIterator::LArrayIterator(const LArrayIterator& iter) {
+ mArray = iter.mArray;
+ mNextIndex = iter.mNextIndex;
+}
+
+LArrayIterator::~LArrayIterator() {
+}
+
+void LArrayIterator::ResetTo(int index) {
+#line 366
+ _ASSERT(index == 0 || index == 1);
+ mNextIndex = 1;
+}
+
+void LArrayIterator::Rewind() {
+ mNextIndex = 1;
+}
+
+void LArrayIterator::Seek(const LArrayIterator& iter) {
+ mArray = iter.mArray;
+ mNextIndex = iter.mNextIndex;
+}
+
+BOOL LArrayIterator::Next(void* item) {
+ if (mNextIndex > mArray->GetCount()) {
+ mCurrentIndex = 0;
+ return false;
+ } else {
+ mArray->FetchItemAt(mNextIndex, item);
+ mCurrentIndex = mNextIndex;
+ mNextIndex++;
+ return true;
+ }
+}
+
+BOOL LArrayIterator::Previous(void* item) {
+ mCurrentIndex = mNextIndex;
+ mNextIndex--;
+ if (mNextIndex < 1) {
+ mCurrentIndex = 0;
+ return false;
+ } else {
+ mArray->FetchItemAt(mNextIndex, item);
+ return true;
+ }
+}
+
+
+
+LDefaultComparator* LDefaultComparator::sDefaultComparator;
+
+/*virtual*/ int LDefaultComparator::Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const {
+ int result = memcmp(inItemOne, inItemTwo, (inSizeOne < inSizeTwo) ? inSizeOne : inSizeTwo);
+ if (result == 0)
+ result = inSizeOne - inSizeTwo;
+ return result;
+}
+
+/*virtual*/ BOOL LDefaultComparator::IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const {
+ if (inSizeOne != inSizeTwo) {
+ return 0;
+ } else {
+ return memcmp(inItemOne, inItemTwo, inSizeOne) == 0;
+ }
+}
+
+LDefaultComparator* LDefaultComparator::GetComparator() {
+ if (!sDefaultComparator)
+ sDefaultComparator = new LDefaultComparator;
+ return sDefaultComparator;
+}
+
+LDefaultComparator::LDefaultComparator() {
+}
+
+/*virtual*/ LDefaultComparator::~LDefaultComparator() {
+}
diff --git a/src/T2DLL/LArray.h b/src/T2DLL/LArray.h
new file mode 100644
index 0000000..110e3bc
--- /dev/null
+++ b/src/T2DLL/LArray.h
@@ -0,0 +1,60 @@
+#pragma once
+#include "common.h"
+#include "LComparator.h"
+
+class DLL_EXPORT LArray {
+public:
+ LArray();
+ LArray(int size, LComparator* comparator = NULL, BOOL keepSorted = false);
+ void init(int size, LComparator* comparator, BOOL keepSorted);
+ ~LArray();
+ virtual int GetCount() const;
+protected:
+ void Expand(int amount);
+public:
+ void AdjustAllocation(int amount);
+ void SetKeepSorted(BOOL keepSorted);
+ virtual void InsertItemsAt(int count, int where, const void* data);
+ virtual void RemoveItemsAt(int count, int where);
+ virtual void Remove(const void* item);
+ virtual int FetchIndexOf(const void* item) const;
+ virtual int FetchItemAt(int index, void* outItem) const;
+ virtual void AssignItemsAt(int count, int where, void* data);
+ virtual void Add(const void* item);
+ void SetComparator(LComparator* comparator);
+ virtual void ReadAsWord(T2Archive& archive);
+ virtual void WriteAsWord(T2Archive& archive);
+ virtual void ReadAsDWord(T2Archive& archive);
+ virtual void ReadAsChar(T2Archive& archive);
+ virtual void WriteAsDWord(T2Archive& archive);
+ virtual void WriteAsChar(T2Archive& archive);
+
+protected:
+ BOOL mOwnsComparator;
+ int mItemSize;
+ int mItemCount;
+ void *mBuffer;
+ int mExpandSize;
+ LComparator *mComparator;
+ BOOL mKeepSorted;
+};
+
+class DLL_EXPORT LArrayIterator {
+public:
+ LArrayIterator(const LArray& array, int index = 1);
+ LArrayIterator(const LArrayIterator& iter);
+ ~LArrayIterator();
+ void ResetTo(int index);
+ void Rewind();
+ void Seek(const LArrayIterator& iter);
+ BOOL Next(void* item);
+ BOOL Previous(void* item);
+
+ void Reset() { ResetTo(1); }
+ int GetCurrentIndex() { return mCurrentIndex; }
+
+private:
+ const LArray *mArray;
+ int mNextIndex;
+ int mCurrentIndex;
+};
diff --git a/src/T2DLL/LAttachable.cpp b/src/T2DLL/LAttachable.cpp
new file mode 100644
index 0000000..9700c4d
--- /dev/null
+++ b/src/T2DLL/LAttachable.cpp
@@ -0,0 +1,86 @@
+#include "LArray.h"
+#include "LAttachable.h"
+#include "LAttachment.h"
+
+LAttachable::LAttachable() {
+ mAttachments = NULL;
+ SetDefaultAttachable(this);
+}
+
+LAttachable::LAttachable(const LAttachable& other) {
+ mAttachments = NULL;
+ SetDefaultAttachable(this);
+}
+
+/*virtual*/ LAttachable::~LAttachable() {
+ RemoveAllAttachments();
+}
+
+/*virtual*/ void LAttachable::AddAttachment(LAttachment* attachment, LAttachment* before, BOOL setAsOwner) {
+ if (!mAttachments)
+ mAttachments = new LArray;
+
+ if (!before) {
+ mAttachments->Add(&attachment);
+ } else {
+ int index = mAttachments->GetCount() + 1;
+ if (before) {
+ // bug? should this use &before?
+ index = mAttachments->FetchIndexOf(before);
+ if (index == 0)
+ index = mAttachments->GetCount() + 1;
+ }
+ mAttachments->InsertItemsAt(1, index, &attachment);
+ }
+
+ if (setAsOwner)
+ attachment->SetOwnerHost(this);
+}
+
+/*virtual*/ void LAttachable::RemoveAttachment(LAttachment* attachment) {
+ if (mAttachments) {
+ mAttachments->Remove(&attachment);
+ if (attachment->GetOwnerHost() == this)
+ attachment->SetOwnerHost(NULL);
+ }
+}
+
+/*virtual*/ void LAttachable::RemoveAllAttachments() {
+ if (mAttachments) {
+ LArrayIterator iter(*mAttachments);
+ LAttachment *attachment;
+
+ while (iter.Next(&attachment)) {
+ if (attachment->GetOwnerHost() == this) {
+ delete attachment;
+ iter.Reset();
+ }
+ }
+
+ delete mAttachments;
+ mAttachments = NULL;
+ }
+}
+
+/*virtual*/ BOOL LAttachable::ExecuteAttachments(unsigned int message, void* data) {
+ BOOL result = true;
+ if (mAttachments) {
+ LArrayIterator iter(*mAttachments);
+ LAttachment *attachment;
+
+ while (iter.Next(&attachment)) {
+ result = result & attachment->Execute(message, data);
+ }
+ }
+ return result;
+}
+
+/*static*/ LAttachable* LAttachable::sDefaultAttachable;
+
+/*static*/ LAttachable* LAttachable::GetDefaultAttachable() {
+ return sDefaultAttachable;
+}
+
+/*static*/ void LAttachable::SetDefaultAttachable(LAttachable* attachable) {
+ sDefaultAttachable = attachable;
+}
diff --git a/src/T2DLL/LAttachable.h b/src/T2DLL/LAttachable.h
new file mode 100644
index 0000000..f06bbd9
--- /dev/null
+++ b/src/T2DLL/LAttachable.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT LAttachable {
+public:
+ LAttachable();
+ LAttachable(const LAttachable& other);
+ virtual ~LAttachable();
+ virtual void AddAttachment(LAttachment* attachment, LAttachment* before, BOOL setAsOwner);
+ virtual void RemoveAttachment(LAttachment* attachment);
+ virtual void RemoveAllAttachments();
+ virtual BOOL ExecuteAttachments(unsigned int message, void* data);
+ static LAttachable* GetDefaultAttachable();
+ static void SetDefaultAttachable(LAttachable*);
+
+protected:
+ static LAttachable* sDefaultAttachable;
+
+ LArray *mAttachments;
+};
diff --git a/src/T2DLL/LAttachment.cpp b/src/T2DLL/LAttachment.cpp
new file mode 100644
index 0000000..da83c32
--- /dev/null
+++ b/src/T2DLL/LAttachment.cpp
@@ -0,0 +1,29 @@
+#include "LAttachable.h"
+#include "LAttachment.h"
+
+LAttachment::LAttachment(unsigned int message, BOOL executeHost) {
+ mOwnerHost = NULL;
+ mMessage = message;
+ mExecuteHost = executeHost;
+}
+
+/*virtual*/ LAttachment::~LAttachment() {
+ if (mOwnerHost)
+ mOwnerHost->RemoveAttachment(this);
+}
+
+/*virtual*/ void LAttachment::SetExecuteHost(BOOL v) {
+ mExecuteHost = v;
+}
+
+/*virtual*/ BOOL LAttachment::Execute(unsigned int message, void* data) {
+ BOOL result = true;
+ if (message == mMessage || mMessage == 0) {
+ ExecuteSelf(message, data);
+ result = mExecuteHost;
+ }
+ return result;
+}
+
+/*virtual*/ void LAttachment::ExecuteSelf(unsigned int message, void* data) {
+}
diff --git a/src/T2DLL/LAttachment.h b/src/T2DLL/LAttachment.h
new file mode 100644
index 0000000..10b8c66
--- /dev/null
+++ b/src/T2DLL/LAttachment.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT LAttachment {
+public:
+ LAttachment(unsigned int message = 0, BOOL executeHost = true);
+ virtual ~LAttachment();
+ virtual void SetMessage(unsigned int v) { mMessage = v; }
+ virtual void SetExecuteHost(BOOL v);
+ virtual void SetOwnerHost(LAttachable* v) { mOwnerHost = v; }
+ virtual int Execute(unsigned int message, void* data);
+
+ LAttachable* GetOwnerHost() const { return mOwnerHost; }
+ unsigned int GetMessage() const { return mMessage; }
+ BOOL GetExecuteHost() const { return mExecuteHost; }
+
+protected:
+ virtual void ExecuteSelf(unsigned int message, void*);
+
+protected:
+ LAttachable *mOwnerHost;
+ unsigned int mMessage;
+ BOOL mExecuteHost;
+};
diff --git a/src/T2DLL/LBroadcaster.cpp b/src/T2DLL/LBroadcaster.cpp
new file mode 100644
index 0000000..3486ce9
--- /dev/null
+++ b/src/T2DLL/LBroadcaster.cpp
@@ -0,0 +1,46 @@
+#include "LBroadcaster.h"
+#include "LListener.h"
+
+LBroadcaster::LBroadcaster() {
+ mBroadcasting = true;
+}
+
+LBroadcaster::LBroadcaster(const LBroadcaster& other) {
+ mBroadcasting = other.mBroadcasting;
+}
+
+/*virtual*/ LBroadcaster::~LBroadcaster() {
+ BroadcastMessage(0xFFFFFFFF, this);
+
+ LArrayIterator iter(mListeners);
+ LListener *listener;
+
+ while (iter.Next(&listener)) {
+ listener->RemoveBroadcaster(this);
+ }
+}
+
+void LBroadcaster::AddListener(LListener* listener) {
+ // bug - should pass &listener to FetchIndexOf
+ if (mListeners.FetchIndexOf(listener) == 0) {
+ mListeners.Add(&listener);
+ listener->AddBroadcaster(this);
+ }
+}
+
+void LBroadcaster::RemoveListener(LListener* listener) {
+ mListeners.Remove(&listener);
+ listener->RemoveBroadcaster(this);
+}
+
+void LBroadcaster::BroadcastMessage(unsigned int msg, void* data) {
+ if (mBroadcasting) {
+ LArrayIterator iter(mListeners);
+ LListener *listener;
+
+ while (iter.Next(&listener)) {
+ if (listener->IsListening())
+ listener->ListenToMessage(msg, data);
+ }
+ }
+}
diff --git a/src/T2DLL/LBroadcaster.h b/src/T2DLL/LBroadcaster.h
new file mode 100644
index 0000000..f439df3
--- /dev/null
+++ b/src/T2DLL/LBroadcaster.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+#include "LArray.h"
+
+class DLL_EXPORT LBroadcaster {
+public:
+ LBroadcaster();
+ LBroadcaster(const LBroadcaster& other);
+ virtual ~LBroadcaster();
+ void AddListener(LListener* listener);
+ void RemoveListener(LListener* listener);
+ void BroadcastMessage(unsigned int msg, void* data);
+
+ void StartBroadcasting() { mBroadcasting = true; }
+ void StopBroadcasting() { mBroadcasting = false; }
+ BOOL IsBroadcasting() const { return mBroadcasting; }
+
+private:
+ LArray mListeners;
+ BOOL mBroadcasting;
+};
diff --git a/src/T2DLL/LComparator.cpp b/src/T2DLL/LComparator.cpp
new file mode 100644
index 0000000..649075d
--- /dev/null
+++ b/src/T2DLL/LComparator.cpp
@@ -0,0 +1,79 @@
+#include "LComparator.h"
+
+LComparator* LComparator::sComparator;
+
+LComparator::LComparator() {
+ sComparator = NULL;
+}
+
+/*virtual*/ LComparator::~LComparator() {
+}
+
+/*virtual*/ int LComparator::Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const {
+ const unsigned char *a = (const unsigned char *) inItemOne;
+ const unsigned char *b = (const unsigned char *) inItemTwo;
+ unsigned int size = inSizeOne;
+ if (inSizeTwo < inSizeOne)
+ size = inSizeTwo;
+
+ while (size > 0) {
+ if (*a != *b)
+ return *a - *b;
+ a++;
+ b++;
+ size--;
+ }
+
+ return inSizeOne - inSizeTwo;
+}
+
+/*virtual*/ BOOL LComparator::IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const {
+ return Compare(inItemOne, inItemTwo, inSizeOne, inSizeTwo) == 0;
+}
+
+/*virtual*/ int LComparator::CompareToKey(const void* inItem, unsigned int inSize, const void* inKey) const {
+#line 86
+ _ASSERT("CompareToKey not implemented");
+ return 1;
+}
+
+/*virtual*/ BOOL LComparator::IsEqualToKey(const void* inItem, unsigned int inSize, const void* inKey) const {
+ return CompareToKey(inItem, inSize, inKey) == 0;
+}
+
+LComparator* LComparator::GetComparator() {
+ if (!sComparator)
+ sComparator = new LComparator;
+ return sComparator;
+}
+
+/*virtual*/ LComparator* LComparator::Clone() {
+ return new LComparator;
+}
+
+LLongComparator* LLongComparator::sLongComparator;
+
+LLongComparator::LLongComparator() {
+ sLongComparator = NULL;
+}
+
+/*virtual*/ LLongComparator::~LLongComparator() {
+}
+
+/*virtual*/ int LLongComparator::Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const {
+ return *((const long *) inItemOne) - *((const long *) inItemTwo);
+}
+
+/*virtual*/ BOOL LLongComparator::IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const {
+ return *((const long *) inItemOne) == *((const long *) inItemTwo);
+}
+
+LLongComparator* LLongComparator::GetComparator() {
+ if (!sLongComparator)
+ sLongComparator = new LLongComparator;
+ return sLongComparator;
+}
+
+/*virtual*/ LComparator* LLongComparator::Clone() {
+ return new LLongComparator;
+}
diff --git a/src/T2DLL/LComparator.h b/src/T2DLL/LComparator.h
new file mode 100644
index 0000000..8f51bd0
--- /dev/null
+++ b/src/T2DLL/LComparator.h
@@ -0,0 +1,28 @@
+#pragma once
+#include "common.h"
+
+class LComparator {
+public:
+ LComparator();
+ virtual ~LComparator();
+ virtual int Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
+ virtual BOOL IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
+ virtual int CompareToKey(const void* inItem, unsigned int inSize, const void* inKey) const;
+ virtual BOOL IsEqualToKey(const void* inItem, unsigned int inSize, const void* inKey) const;
+ static LComparator* GetComparator();
+ virtual LComparator* Clone();
+protected:
+ static LComparator* sComparator;
+};
+
+class LLongComparator : public LComparator {
+public:
+ LLongComparator();
+ virtual ~LLongComparator();
+ virtual int Compare(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
+ virtual BOOL IsEqualTo(const void* inItemOne, const void* inItemTwo, unsigned int inSizeOne, unsigned int inSizeTwo) const;
+ static LLongComparator* GetComparator();
+ virtual LComparator* Clone();
+protected:
+ static LLongComparator* sLongComparator;
+};
diff --git a/src/T2DLL/LListener.cpp b/src/T2DLL/LListener.cpp
new file mode 100644
index 0000000..bb4ca1f
--- /dev/null
+++ b/src/T2DLL/LListener.cpp
@@ -0,0 +1,26 @@
+#include "LBroadcaster.h"
+#include "LListener.h"
+
+LListener::LListener() {
+ mListening = true;
+}
+
+LListener::LListener(const LListener& other) {
+ mListening = other.mListening;
+}
+
+/*virtual*/ LListener::~LListener() {
+ for (int index = mBroadcasters.GetCount(); index > 0; index--) {
+ LBroadcaster *broadcaster;
+ if (mBroadcasters.FetchItemAt(index, &broadcaster))
+ broadcaster->RemoveListener(this);
+ }
+}
+
+void LListener::AddBroadcaster(LBroadcaster* broadcaster) {
+ mBroadcasters.Add(&broadcaster);
+}
+
+void LListener::RemoveBroadcaster(LBroadcaster* broadcaster) {
+ mBroadcasters.Remove(&broadcaster);
+}
diff --git a/src/T2DLL/LListener.h b/src/T2DLL/LListener.h
new file mode 100644
index 0000000..4632ff2
--- /dev/null
+++ b/src/T2DLL/LListener.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+#include "LArray.h"
+
+class DLL_EXPORT LListener {
+public:
+ LListener();
+ LListener(const LListener& other);
+ virtual ~LListener();
+
+ void StartListening() { mListening = true; }
+ void StopListening() { mListening = false; }
+ BOOL IsListening() const { return mListening; }
+ virtual void ListenToMessage(unsigned int msg, void* data) {}
+
+protected:
+ friend class LBroadcaster;
+ void AddBroadcaster(LBroadcaster* broadcaster);
+ void RemoveBroadcaster(LBroadcaster* broadcaster);
+
+private:
+ LArray mBroadcasters;
+ BOOL mListening;
+};
diff --git a/src/T2DLL/LPeriodical.cpp b/src/T2DLL/LPeriodical.cpp
new file mode 100644
index 0000000..1d75869
--- /dev/null
+++ b/src/T2DLL/LPeriodical.cpp
@@ -0,0 +1,71 @@
+#include "LArray.h"
+#include "LPeriodical.h"
+
+/*static*/ LArray* LPeriodical::sIdlerQ = NULL;
+/*static*/ LArray* LPeriodical::sRepeaterQ = NULL;
+
+LPeriodical::LPeriodical() {
+}
+
+/*virtual*/ LPeriodical::~LPeriodical() {
+ StopIdling();
+ StopRepeating();
+}
+
+/*virtual*/ void LPeriodical::StartIdling() {
+ if (!sIdlerQ)
+ sIdlerQ = new LArray;
+
+ // how the hell is this supposed to work??
+ // surely it should pass &this...
+ if (sIdlerQ->FetchIndexOf(this) == 0)
+ sIdlerQ->Add(this);
+}
+
+/*virtual*/ void LPeriodical::StopIdling() {
+ if (sIdlerQ)
+ sIdlerQ->Remove(this);
+}
+
+/*static*/ void LPeriodical::DevoteTimeToIdlers() {
+ if (sIdlerQ) {
+ LArrayIterator iter(*sIdlerQ);
+ LPeriodical *p;
+
+ while (iter.Next(&p))
+ p->SpendTime();
+ }
+}
+
+/*virtual*/ void LPeriodical::StartRepeating() {
+ if (!sRepeaterQ)
+ sRepeaterQ = new LArray;
+
+ // how the hell is this supposed to work??
+ // surely it should pass &this...
+ if (sRepeaterQ->FetchIndexOf(this) == 0)
+ sRepeaterQ->Add(this);
+}
+
+/*virtual*/ void LPeriodical::StopRepeating() {
+ if (sRepeaterQ)
+ sRepeaterQ->Remove(this);
+}
+
+/*static*/ void LPeriodical::DevoteTimeToRepeaters() {
+ if (sRepeaterQ) {
+ LArrayIterator iter(*sRepeaterQ);
+ LPeriodical *p;
+
+ while (iter.Next(&p))
+ p->SpendTime();
+ }
+}
+
+/*static*/ void LPeriodical::DeleteIdlerAndRepeaterQueues() {
+ delete sIdlerQ;
+ sIdlerQ = NULL;
+
+ delete sRepeaterQ;
+ sRepeaterQ = NULL;
+}
diff --git a/src/T2DLL/LPeriodical.h b/src/T2DLL/LPeriodical.h
new file mode 100644
index 0000000..ca66d6d
--- /dev/null
+++ b/src/T2DLL/LPeriodical.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT LPeriodical {
+public:
+ LPeriodical();
+ virtual ~LPeriodical();
+
+ virtual void StartIdling();
+ virtual void StopIdling();
+ static void DevoteTimeToIdlers();
+
+ virtual void StartRepeating();
+ virtual void StopRepeating();
+ static void DevoteTimeToRepeaters();
+ static void DeleteIdlerAndRepeaterQueues();
+
+ virtual void SpendTime() = 0;
+
+protected:
+ static LArray* sIdlerQ;
+ static LArray* sRepeaterQ;
+};
diff --git a/src/T2DLL/MMIO.h b/src/T2DLL/MMIO.h
new file mode 100644
index 0000000..11303fa
--- /dev/null
+++ b/src/T2DLL/MMIO.h
@@ -0,0 +1,54 @@
+#pragma once
+#include "common.h"
+
+class CMMChunk {
+protected:
+ CMMChunk();
+public:
+ CMMChunk& operator=(const CMMChunk&);
+};
+class CMMIdChunk {
+public:
+ CMMIdChunk& operator=(const CMMIdChunk&);
+ CMMIdChunk(char, char, char, char);
+ CMMIdChunk(const char*, unsigned int);
+};
+class CMMTypeChunk {
+public:
+ CMMTypeChunk& operator=(const CMMTypeChunk&);
+ CMMTypeChunk(char, char, char, char);
+ CMMTypeChunk(const char*, unsigned int);
+};
+class CMMIOInfo {
+public:
+ CMMIOInfo& operator=(const CMMIOInfo&);
+ CMMIOInfo();
+};
+class CMMMemoryIOInfo {
+public:
+ CMMMemoryIOInfo& operator=(const CMMMemoryIOInfo&);
+ CMMMemoryIOInfo(long, unsigned long);
+ CMMMemoryIOInfo(char*, long, unsigned long);
+};
+class CMMIO {
+public:
+ virtual ~CMMIO();
+ CMMIO();
+ CMMIO(HMMIO);
+ CMMIO(const char*, unsigned long);
+ CMMIO(CMMMemoryIOInfo&);
+ unsigned int Close(unsigned int);
+ long Read(char*, long);
+ unsigned int Ascend(CMMChunk&, unsigned int);
+ unsigned int Descend(CMMChunk&, unsigned int);
+ unsigned int Descend(CMMChunk&, CMMChunk&, unsigned int);
+ long Seek(long, int);
+ long SendMessageA(unsigned int, long, long);
+ unsigned int SetBuffer(char*, long, unsigned int);
+ long Write(const char*, long);
+ unsigned int GetInfo(CMMIOInfo&, unsigned int);
+ unsigned int SetInfo(CMMIOInfo&, unsigned int);
+ unsigned int Advance(CMMIOInfo&, unsigned int);
+ void Open(const char*, unsigned long);
+ void Open(CMMMemoryIOInfo&);
+};
diff --git a/src/T2DLL/Mmio.cpp b/src/T2DLL/Mmio.cpp
new file mode 100644
index 0000000..5a11e85
--- /dev/null
+++ b/src/T2DLL/Mmio.cpp
@@ -0,0 +1,97 @@
+#include "MMIO.h"
+
+CMMChunk::CMMChunk() {
+}
+
+CMMChunk& CMMChunk::operator=(const CMMChunk&) {
+}
+
+CMMIdChunk& CMMIdChunk::operator=(const CMMIdChunk&) {
+}
+
+CMMIdChunk::CMMIdChunk(char, char, char, char) {
+}
+
+CMMIdChunk::CMMIdChunk(const char*, unsigned int) {
+}
+
+CMMTypeChunk& CMMTypeChunk::operator=(const CMMTypeChunk&) {
+}
+
+CMMTypeChunk::CMMTypeChunk(char, char, char, char) {
+}
+
+CMMTypeChunk::CMMTypeChunk(const char*, unsigned int) {
+}
+
+CMMIOInfo& CMMIOInfo::operator=(const CMMIOInfo&) {
+}
+
+CMMIOInfo::CMMIOInfo() {
+}
+
+CMMMemoryIOInfo& CMMMemoryIOInfo::operator=(const CMMMemoryIOInfo&) {
+}
+
+CMMMemoryIOInfo::CMMMemoryIOInfo(long, unsigned long) {
+}
+
+CMMMemoryIOInfo::CMMMemoryIOInfo(char*, long, unsigned long) {
+}
+
+/*virtual*/ CMMIO::~CMMIO() {
+}
+
+CMMIO::CMMIO() {
+}
+
+CMMIO::CMMIO(HMMIO) {
+}
+
+CMMIO::CMMIO(const char*, unsigned long) {
+}
+
+CMMIO::CMMIO(CMMMemoryIOInfo&) {
+}
+
+unsigned int CMMIO::Close(unsigned int) {
+}
+
+long CMMIO::Read(char*, long) {
+}
+
+unsigned int CMMIO::Ascend(CMMChunk&, unsigned int) {
+}
+
+unsigned int CMMIO::Descend(CMMChunk&, unsigned int) {
+}
+
+unsigned int CMMIO::Descend(CMMChunk&, CMMChunk&, unsigned int) {
+}
+
+long CMMIO::Seek(long, int) {
+}
+
+long CMMIO::SendMessageA(unsigned int, long, long) {
+}
+
+unsigned int CMMIO::SetBuffer(char*, long, unsigned int) {
+}
+
+long CMMIO::Write(const char*, long) {
+}
+
+unsigned int CMMIO::GetInfo(CMMIOInfo&, unsigned int) {
+}
+
+unsigned int CMMIO::SetInfo(CMMIOInfo&, unsigned int) {
+}
+
+unsigned int CMMIO::Advance(CMMIOInfo&, unsigned int) {
+}
+
+void CMMIO::Open(const char*, unsigned long) {
+}
+
+void CMMIO::Open(CMMMemoryIOInfo&) {
+}
diff --git a/src/T2DLL/T2AdvertisePlugin.cpp b/src/T2DLL/T2AdvertisePlugin.cpp
new file mode 100644
index 0000000..8486955
--- /dev/null
+++ b/src/T2DLL/T2AdvertisePlugin.cpp
@@ -0,0 +1,65 @@
+#include "CResFile.h"
+#include "T2AdvertisePlugin.h"
+#include "T2BitImage.h"
+#include "T2ImageObj.h"
+
+T2AdvertisePlugin::T2AdvertisePlugin(DWORD type, T2PluginSpecifier& specifier)
+ : T2SubPlugin(type, specifier)
+{
+ mPath = "";
+ mCC = 0;
+ mD0 = 0;
+ mDay = 0;
+ mMoney = 0;
+ mSubType = 0;
+ mTieup = NULL;
+}
+
+/*virtual*/ T2AdvertisePlugin::~T2AdvertisePlugin() {
+}
+
+/*virtual*/ void T2AdvertisePlugin::LoadRsrcFromStream(CResFile& resFile) {
+ T2SubPlugin::LoadRsrcFromStream(resFile);
+ resFile >> mSubType;
+ resFile >> mCC;
+ resFile >> mD0;
+ resFile >> mDay;
+ resFile >> mMoney;
+ resFile >> mPath;
+}
+
+void T2AdvertisePlugin::UnfoldPluginSelf() {
+ if (mCC != 0) {
+ mBitImage = new T2BitImage(mSpecifier.mPath, mCC, 1);
+ mImageObj = new T2ImageObj;
+ mImageObj->AddObject("BILL", -1, *mBitImage, NULL, 0, 0);
+ }
+}
+
+unsigned int T2AdvertisePlugin::GetSubType() {
+ return mSubType;
+}
+
+unsigned int T2AdvertisePlugin::GetDay() {
+ return mDay;
+}
+
+int T2AdvertisePlugin::GetMoney() {
+ return mMoney;
+}
+
+void T2AdvertisePlugin::GetPath(CString& outStr) {
+ outStr = mPath;
+}
+
+/*virtual*/ unsigned long T2AdvertisePlugin::LoadSelf() {
+ unsigned long result = 0;
+
+ CResFile resFile;
+ if (resFile.OpenResource(mSpecifier.mPath, 128, 'ADDF'))
+ LoadRsrcFromStream(resFile);
+ else
+ result = 0xFFFFFFFF;
+
+ return result;
+}
diff --git a/src/T2DLL/T2AdvertisePlugin.h b/src/T2DLL/T2AdvertisePlugin.h
new file mode 100644
index 0000000..289e3f8
--- /dev/null
+++ b/src/T2DLL/T2AdvertisePlugin.h
@@ -0,0 +1,27 @@
+#pragma once
+#include "common.h"
+#include "T2SubPlugin.h"
+
+class DLL_EXPORT T2AdvertisePlugin : public T2SubPlugin {
+public:
+ T2AdvertisePlugin(DWORD type, T2PluginSpecifier& specifier);
+ virtual ~T2AdvertisePlugin();
+ void UnfoldPluginSelf();
+ unsigned int GetSubType();
+ unsigned int GetDay();
+ int GetMoney();
+ void GetPath(CString& outStr);
+ virtual unsigned long LoadSelf();
+
+ unsigned int GetRsrcType() { return 'AdPl'; }
+
+protected:
+ virtual void LoadRsrcFromStream(CResFile& resFile);
+
+ DWORD mSubType;
+ unsigned short mCC;
+ unsigned int mD0;
+ unsigned int mDay;
+ int mMoney;
+ CString mPath;
+};
diff --git a/src/T2DLL/T2AdvertiseTable.cpp b/src/T2DLL/T2AdvertiseTable.cpp
new file mode 100644
index 0000000..5362e34
--- /dev/null
+++ b/src/T2DLL/T2AdvertiseTable.cpp
@@ -0,0 +1,34 @@
+#include "T2AdvertiseTable.h"
+
+/*virtual*/ int T2AdvertiseTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+T2AdvertiseTable::T2AdvertiseTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+void T2AdvertiseTable::Add(T2AdvertisePlugin*, int) {
+}
+
+void T2AdvertiseTable::Add(CFilePluginList*) {
+}
+
+/*virtual*/ void T2AdvertiseTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+void T2AdvertiseTable::ClickCell(const TableCellT&, const CPoint&) {
+}
+
+int T2AdvertiseTable::IsMark(unsigned int) {
+}
+
+void T2AdvertiseTable::SetMark(unsigned int, int) {
+}
+
+/*virtual*/ void T2AdvertiseTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ int T2AdvertiseTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2AdvertiseTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
diff --git a/src/T2DLL/T2AdvertiseTable.h b/src/T2DLL/T2AdvertiseTable.h
new file mode 100644
index 0000000..4895db0
--- /dev/null
+++ b/src/T2DLL/T2AdvertiseTable.h
@@ -0,0 +1,27 @@
+#pragma once
+#include "common.h"
+
+class T2AdvertiseTable {
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+public:
+ T2AdvertiseTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ void Add(T2AdvertisePlugin*, int);
+ void Add(CFilePluginList*);
+protected:
+ virtual void DrawCell(CDC*, const TableCellT&);
+ void ClickCell(const TableCellT&, const CPoint&);
+public:
+ int IsMark(unsigned int);
+ void SetMark(unsigned int, int);
+protected:
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+
+public:
+ virtual ~T2AdvertiseTable() {}
+protected:
+ int GetUserCon() {}
+ void SetUserCon(int) {}
+};
diff --git a/src/T2DLL/T2Animation.cpp b/src/T2DLL/T2Animation.cpp
new file mode 100644
index 0000000..5b4aea4
--- /dev/null
+++ b/src/T2DLL/T2Animation.cpp
@@ -0,0 +1,34 @@
+#include "T2Animation.h"
+
+void T2Animation::Rewind() {
+}
+
+int T2Animation::HasNextStep() const {
+}
+
+int T2Animation::SetFrame(int) {
+}
+
+int T2Animation::GetFrame() const {
+}
+
+T2Animation::T2Animation(T2TowerDoc*, short, short, const SpriteDef*, const AnimationDef*, T2Sprite::ELayer) {
+}
+
+T2Animation::~T2Animation() {
+}
+
+int T2Animation::Start(POINT, int) {
+}
+
+int T2Animation::Idle() {
+}
+
+void T2Animation::Play(POINT, int) {
+}
+
+int T2Animation::Step() {
+}
+
+void T2Animation::Draw() {
+}
diff --git a/src/T2DLL/T2Animation.h b/src/T2DLL/T2Animation.h
new file mode 100644
index 0000000..410a449
--- /dev/null
+++ b/src/T2DLL/T2Animation.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "common.h"
+
+class T2Animation {
+public:
+ void Rewind();
+ int HasNextStep() const;
+ int SetFrame(int);
+ int GetFrame() const;
+ T2Animation(T2TowerDoc*, short, short, const SpriteDef*, const AnimationDef*, T2Sprite::ELayer);
+ ~T2Animation();
+ int Start(POINT, int);
+ int Idle();
+ void Play(POINT, int);
+ int Step();
+protected:
+ void Draw();
+};
diff --git a/src/T2DLL/T2Archive.cpp b/src/T2DLL/T2Archive.cpp
new file mode 100644
index 0000000..8aac959
--- /dev/null
+++ b/src/T2DLL/T2Archive.cpp
@@ -0,0 +1,394 @@
+#include "T2Archive.h"
+
+T2Archive::T2Archive() {
+ mFile = NULL;
+ m8 = 0;
+ mIsReadable = false;
+ mIsWritable = false;
+ mBuffer = NULL;
+ mBufferLen = 0;
+
+ mBuffer = (char *) malloc(0x10000);
+ mPtr = mBuffer;
+}
+
+/*virtual*/ T2Archive::~T2Archive() {
+ if (mFile)
+ Close();
+ if (mBuffer)
+ free(mBuffer);
+}
+
+/*virtual*/ BOOL T2Archive::OpenAsReadMode(const char* path) {
+ if (mFile)
+ Close();
+
+ mFile = new CFile;
+ CFileException exc;
+
+ BOOL success = mFile->Open(path, CFile::shareDenyWrite, &exc);
+ if (!success) {
+ delete mFile;
+ mFile = NULL;
+ } else {
+ mIsReadable = true;
+ mIsWritable = false;
+ mPtr = mBuffer;
+ }
+
+ return success;
+}
+
+/*virtual*/ BOOL T2Archive::OpenAsWriteMode(const char* path) {
+ if (mFile)
+ Close();
+
+ mFile = new CFile;
+
+ BOOL success = mFile->Open(path, CFile::modeCreate | CFile::modeWrite | CFile::shareDenyRead);
+ if (!success) {
+ delete mFile;
+ mFile = NULL;
+ } else {
+ mIsReadable = false;
+ mIsWritable = true;
+ }
+
+ return success;
+}
+
+/*virtual*/ BOOL T2Archive::Close() {
+#line 93
+ _ASSERT(mFile);
+
+ if (mBuffer && mBufferLen > 0 && mIsWritable) {
+ mFile->Write(mBuffer, mBufferLen);
+ mBufferLen = 0;
+ }
+
+ mFile->Close();
+ delete mFile;
+
+ mFile = NULL;
+ mIsReadable = false;
+ mIsWritable = false;
+
+ return true;
+}
+
+/*virtual*/ int T2Archive::Read(void* buffer, int size) {
+#line 111
+ _ASSERT(mIsReadable);
+ _ASSERT(size <= 0x10000);
+
+ int readAmount;
+ if (mBuffer) {
+ if (mBufferLen < size) {
+ memmove(mBuffer, mPtr, mBufferLen);
+ mPtr = mBuffer;
+ mBufferLen += mFile->Read(mBuffer + mBufferLen, 0x10000 - mBufferLen);
+#line 122
+ _ASSERT(mBufferLen >= size);
+ }
+
+ memcpy(buffer, mPtr, size);
+ mPtr += size;
+ mBufferLen -= size;
+ readAmount = size;
+ } else {
+ readAmount = mFile->Read(buffer, size);
+#line 132
+ _ASSERT(readAmount == size);
+ }
+
+ return readAmount;
+}
+
+/*virtual*/ int T2Archive::Write(const void* buffer, int size) {
+#line 139
+ _ASSERT(mIsWritable);
+ _ASSERT(size <= 0x10000);
+
+ if (mBuffer) {
+ if (mBufferLen + size > 0x10000) {
+ mFile->Write(mBuffer, mBufferLen);
+ mBufferLen = 0;
+ }
+ memcpy(mBuffer + mBufferLen, buffer, size);
+ mBufferLen += size;
+ } else {
+ mFile->Write(buffer, size);
+ }
+
+ return size;
+}
+
+/*virtual*/ void T2Archive::BeginCompressedStream() {
+}
+
+/*virtual*/ void T2Archive::EndCompressedStream() {
+}
+
+BOOL T2Archive::operator>>(unsigned char& v) {
+ if (Read(&v, 1) != 1)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(unsigned char v) {
+ if (Write(&v, 1) != 1)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(char& v) {
+ if (Read(&v, 1) != 1)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(char v) {
+ if (Write(&v, 1) != 1)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(int& v) {
+ if (Read(&v, 4) != 4)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(int v) {
+ if (Write(&v, 4) != 4)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(short& v) {
+ if (Read(&v, 2) != 2)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(short v) {
+ if (Write(&v, 2) != 2)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(unsigned int& v) {
+ if (Read(&v, 4) != 4)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(unsigned int v) {
+ if (Write(&v, 4) != 4)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(unsigned long& v) {
+ if (Read(&v, 4) != 4)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(unsigned long v) {
+ if (Write(&v, 4) != 4)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(unsigned short& v) {
+ if (Read(&v, 2) != 2)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(unsigned short v) {
+ if (Write(&v, 2) != 2)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(POINT& v) {
+ if (Read(&v, sizeof(v)) != sizeof(v))
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(POINT v) {
+ if (Write(&v, sizeof(v)) != sizeof(v))
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(RECT& v) {
+ if (Read(&v, sizeof(v)) != sizeof(v))
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator<<(RECT v) {
+ if (Write(&v, sizeof(v)) != sizeof(v))
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(CString& v) {
+ int maxSize = 16;
+ char buf[17];
+
+ v = "";
+
+ int sz = Read(buf, maxSize);
+ while (strlen(buf) == sz) {
+ buf[sz] = 0;
+ v += buf;
+ if (sz < maxSize)
+ return false;
+ sz = Read(buf, maxSize);
+ }
+
+ int len = strlen(buf);
+ mFile->Seek(len - sz + 1, CFile::current);
+ v += buf;
+
+ return true;
+}
+
+BOOL T2Archive::operator<<(CString& v) {
+ int len = v.GetLength() + 1;
+ if (Write(v, len) != len)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::operator>>(char* v) {
+ int maxSize = 16;
+ char buf[17];
+
+ v = ""; // BUG!!
+
+ int sz = Read(buf, maxSize);
+ while (strlen(buf) == sz) {
+ buf[sz] = 0;
+ strcat(v, buf);
+ if (sz < maxSize)
+ return false;
+ sz = Read(buf, maxSize);
+ }
+
+ int len = strlen(buf);
+ mFile->Seek(len - sz + 1, CFile::current);
+ strcat(v, buf);
+
+ return true;
+}
+
+BOOL T2Archive::operator<<(const char* v) {
+ int len = strlen(v) + 1;
+ if (Write(v, len) != len)
+ return false;
+ return true;
+}
+
+BOOL T2Archive::ReadPStr(char* v) {
+ unsigned char len;
+ Read(&len, 1);
+ memset(v, 0, len + 1);
+ Read(v, len);
+ return true;
+}
+
+BOOL T2Archive::ReadPStr(CString& v) {
+ unsigned char len;
+ Read(&len, 1);
+
+ char *buf = (char *) malloc(len + 1);
+ memset(buf, 0, len + 1);
+ Read(buf, len);
+ v = buf;
+ free(buf);
+
+ return true;
+}
+
+BOOL T2Archive::WritePStr(const char* v) {
+ int len = strlen(v) + 1;
+ if (len > 255)
+ return false;
+
+ unsigned char len8 = len;
+ Write(&len8, 1);
+ Write(v, strlen(v) + 1);
+
+ return true;
+}
+
+/*virtual*/ BOOL T2Archive::Skip(unsigned long v) {
+ int size;
+ BOOL result = true;
+
+ if (v > 1000)
+ size = 1000;
+ else
+ size = v;
+
+ void *buf = malloc(size);
+
+ while (v > 0) {
+ int howMuch = Read(buf, size);
+ v -= howMuch;
+ if (howMuch < size && v > 0) {
+ result = false;
+ break;
+ }
+ }
+
+ free(buf);
+
+ return result;
+}
+
+static short swap16(short v);
+
+BOOL T2Archive::ReadSRect(RECT& v) {
+ struct {
+ short top, left, bottom, right;
+ } r;
+ Read(&r, sizeof(r));
+ v.top = swap16(r.top);
+ v.left = swap16(r.left);
+ v.bottom = swap16(r.bottom);
+ v.right = swap16(r.right);
+ return true;
+}
+
+static short swap16(short v) {
+ union {
+ unsigned char b[2];
+ short s;
+ } work;
+ unsigned char tmp;
+
+ work.s = v;
+ tmp = work.b[0];
+ work.b[0] = work.b[1];
+ work.b[1] = tmp;
+ return work.s;
+}
+
+BOOL T2Archive::WriteSRect(const RECT& v) {
+ struct {
+ short top, left, bottom, right;
+ } r;
+ r.top = swap16(v.top);
+ r.left = swap16(v.left);
+ r.bottom = swap16(v.bottom);
+ r.right = swap16(v.right);
+ Write(&r, sizeof(r));
+ return true;
+}
diff --git a/src/T2DLL/T2Archive.h b/src/T2DLL/T2Archive.h
new file mode 100644
index 0000000..f24a386
--- /dev/null
+++ b/src/T2DLL/T2Archive.h
@@ -0,0 +1,52 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2Archive {
+public:
+ T2Archive();
+ virtual ~T2Archive();
+ virtual BOOL OpenAsReadMode(const char* path);
+ virtual BOOL OpenAsWriteMode(const char* path);
+ virtual BOOL Close();
+ virtual void BeginCompressedStream();
+ virtual void EndCompressedStream();
+ virtual BOOL Skip(unsigned long);
+ virtual int Read(void* buffer, int size);
+ virtual int Write(const void* buffer, int size);
+ BOOL operator>>(unsigned char& v);
+ BOOL operator<<(unsigned char v);
+ BOOL operator>>(char& v);
+ BOOL operator<<(char v);
+ BOOL operator>>(int& v);
+ BOOL operator<<(int v);
+ BOOL operator>>(short& v);
+ BOOL operator<<(short v);
+ BOOL operator>>(unsigned int& v);
+ BOOL operator<<(unsigned int v);
+ BOOL operator>>(unsigned long& v);
+ BOOL operator<<(unsigned long v);
+ BOOL operator>>(unsigned short& v);
+ BOOL operator<<(unsigned short v);
+ BOOL operator>>(POINT& v);
+ BOOL operator<<(POINT v);
+ BOOL operator>>(RECT& v);
+ BOOL operator<<(RECT v);
+ BOOL operator>>(CString& v);
+ BOOL operator<<(CString& v);
+ BOOL operator>>(char* v);
+ BOOL operator<<(const char* v);
+ BOOL ReadPStr(char* v);
+ BOOL ReadPStr(CString& v);
+ BOOL WritePStr(const char* v);
+ BOOL ReadSRect(RECT& v);
+ BOOL WriteSRect(const RECT& v);
+
+private:
+ CFile *mFile;
+ int m8;
+ BOOL mIsReadable;
+ BOOL mIsWritable;
+ char *mBuffer;
+ int mBufferLen;
+ char *mPtr;
+};
diff --git a/src/T2DLL/T2ArrowWnd.cpp b/src/T2DLL/T2ArrowWnd.cpp
new file mode 100644
index 0000000..495f0b9
--- /dev/null
+++ b/src/T2DLL/T2ArrowWnd.cpp
@@ -0,0 +1,43 @@
+#include "T2ArrowWnd.h"
+
+/*static*/ CObject* __stdcall T2ArrowWnd::CreateObject() {
+}
+
+/*static*/ CRuntimeClass* __stdcall T2ArrowWnd::_GetBaseClass() {
+}
+
+/*virtual*/ CRuntimeClass* T2ArrowWnd::GetRuntimeClass() const {
+}
+
+T2ArrowWnd::T2ArrowWnd() {
+}
+
+/*virtual*/ T2ArrowWnd::~T2ArrowWnd() {
+}
+
+void T2ArrowWnd::Show(int, int, T2TowerDoc*) {
+}
+
+/*static*/ const AFX_MSGMAP* __stdcall T2ArrowWnd::_GetBaseMessageMap() {
+}
+
+/*virtual*/ const AFX_MSGMAP* T2ArrowWnd::GetMessageMap() const {
+}
+
+int T2ArrowWnd::OnEraseBkgnd(CDC*) {
+}
+
+void T2ArrowWnd::OnTimer(unsigned int) {
+}
+
+void T2ArrowWnd::OnDestroy() {
+}
+
+/*static*/ const CRuntimeClass T2ArrowWnd::classT2ArrowWnd {
+}
+
+/*static*/ const AFX_MSGMAP T2ArrowWnd::messageMap {
+}
+
+/*static*/ const AFX_MSGMAP_ENTRY* const T2ArrowWnd::_messageEntries {
+}
diff --git a/src/T2DLL/T2ArrowWnd.h b/src/T2DLL/T2ArrowWnd.h
new file mode 100644
index 0000000..23c08d7
--- /dev/null
+++ b/src/T2DLL/T2ArrowWnd.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "common.h"
+
+class T2ArrowWnd {
+public:
+ static CObject* __stdcall CreateObject();
+protected:
+ static CRuntimeClass* __stdcall _GetBaseClass();
+public:
+ virtual CRuntimeClass* GetRuntimeClass() const;
+ T2ArrowWnd();
+ virtual ~T2ArrowWnd();
+ void Show(int, int, T2TowerDoc*);
+protected:
+ static const AFX_MSGMAP* __stdcall _GetBaseMessageMap();
+ virtual const AFX_MSGMAP* GetMessageMap() const;
+ int OnEraseBkgnd(CDC*);
+ void OnTimer(unsigned int);
+ void OnDestroy();
+public:
+ static const CRuntimeClass classT2ArrowWnd;
+protected:
+ static const AFX_MSGMAP messageMap;
+private:
+ static const AFX_MSGMAP_ENTRY* const _messageEntries;
+};
diff --git a/src/T2DLL/T2Balloon.cpp b/src/T2DLL/T2Balloon.cpp
new file mode 100644
index 0000000..100918f
--- /dev/null
+++ b/src/T2DLL/T2Balloon.cpp
@@ -0,0 +1,10 @@
+#include "T2Balloon.h"
+
+T2Balloon::T2Balloon() {
+}
+
+/*virtual*/ T2Balloon::~T2Balloon() {
+}
+
+void T2Balloon::Show(int, int, const CString&, int) {
+}
diff --git a/src/T2DLL/T2Balloon.h b/src/T2DLL/T2Balloon.h
new file mode 100644
index 0000000..e7c0bc1
--- /dev/null
+++ b/src/T2DLL/T2Balloon.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class T2Balloon {
+public:
+ T2Balloon();
+ virtual ~T2Balloon();
+ void Show(int, int, const CString&, int);
+
+ T2Balloon(const T2Balloon&) {}
+ T2Balloon& operator=(const T2Balloon&) {}
+};
diff --git a/src/T2DLL/T2BalloonWnd.cpp b/src/T2DLL/T2BalloonWnd.cpp
new file mode 100644
index 0000000..a17dc4f
--- /dev/null
+++ b/src/T2DLL/T2BalloonWnd.cpp
@@ -0,0 +1,52 @@
+#include "T2BalloonWnd.h"
+
+/*static*/ CObject* __stdcall T2BalloonWnd::CreateObject() {
+}
+
+/*static*/ CRuntimeClass* __stdcall T2BalloonWnd::_GetBaseClass() {
+}
+
+/*virtual*/ CRuntimeClass* T2BalloonWnd::GetRuntimeClass() const {
+}
+
+T2BalloonWnd::T2BalloonWnd() {
+}
+
+/*virtual*/ T2BalloonWnd::~T2BalloonWnd() {
+}
+
+/*static*/ const AFX_MSGMAP* __stdcall T2BalloonWnd::_GetBaseMessageMap() {
+}
+
+/*virtual*/ const AFX_MSGMAP* T2BalloonWnd::GetMessageMap() const {
+}
+
+void T2BalloonWnd::Show(int, int, const CString&, int) {
+}
+
+int T2BalloonWnd::OnEraseBkgnd(CDC*) {
+}
+
+void T2BalloonWnd::OnLButtonDown(unsigned int, CPoint) {
+}
+
+void T2BalloonWnd::OnRButtonDown(unsigned int, CPoint) {
+}
+
+void T2BalloonWnd::OnMouseMove(unsigned int, CPoint) {
+}
+
+void T2BalloonWnd::OnTimer(unsigned int) {
+}
+
+void T2BalloonWnd::OnDestroy() {
+}
+
+/*static*/ const CRuntimeClass T2BalloonWnd::classT2BalloonWnd {
+}
+
+/*static*/ const AFX_MSGMAP T2BalloonWnd::messageMap {
+}
+
+/*static*/ const AFX_MSGMAP_ENTRY* const T2BalloonWnd::_messageEntries {
+}
diff --git a/src/T2DLL/T2BalloonWnd.h b/src/T2DLL/T2BalloonWnd.h
new file mode 100644
index 0000000..35cd1a2
--- /dev/null
+++ b/src/T2DLL/T2BalloonWnd.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "common.h"
+
+class T2BalloonWnd {
+public:
+ static CObject* __stdcall CreateObject();
+protected:
+ static CRuntimeClass* __stdcall _GetBaseClass();
+public:
+ virtual CRuntimeClass* GetRuntimeClass() const;
+ T2BalloonWnd();
+ virtual ~T2BalloonWnd();
+protected:
+ static const AFX_MSGMAP* __stdcall _GetBaseMessageMap();
+ virtual const AFX_MSGMAP* GetMessageMap() const;
+public:
+ void Show(int, int, const CString&, int);
+protected:
+ int OnEraseBkgnd(CDC*);
+ void OnLButtonDown(unsigned int, CPoint);
+ void OnRButtonDown(unsigned int, CPoint);
+ void OnMouseMove(unsigned int, CPoint);
+ void OnTimer(unsigned int);
+ void OnDestroy();
+public:
+ static const CRuntimeClass classT2BalloonWnd;
+protected:
+ static const AFX_MSGMAP messageMap;
+private:
+ static const AFX_MSGMAP_ENTRY* const _messageEntries;
+};
diff --git a/src/T2DLL/T2BitImage.cpp b/src/T2DLL/T2BitImage.cpp
new file mode 100644
index 0000000..ea00253
--- /dev/null
+++ b/src/T2DLL/T2BitImage.cpp
@@ -0,0 +1,1228 @@
+#include "GlobalFunc.h"
+#include "T2BitImage.h"
+
+#define ALIGN_ROW_SIZE(s) ((((s) + 3) / 4) * 4)
+
+T2BitImage::T2BitImage(const char* path, unsigned int id, BOOL flip) {
+ mMemHandle = NULL;
+
+ SUBPLUGINFSENTRY fsEntry;
+ CFile *file = OpenSubPluginFS(path, id, 0, &fsEntry);
+ if (!file) {
+ CString idStr;
+ idStr.Format("%d", id);
+
+ CString err = "T2BitImage::T2BitImage ERROR : " + idStr + " @" + path + "\n";
+ OutputDebugString(err);
+ throw 0;
+ }
+
+ void *data = malloc(fsEntry.spfse_mC);
+ file->Read(data, fsEntry.spfse_mC);
+ SetupBitmap((BITMAPINFO *) data, flip);
+ free(data);
+
+ file->Close();
+ delete file;
+}
+
+T2BitImage::T2BitImage(HINSTANCE instance, unsigned int id, BOOL flip) {
+ mMemHandle = NULL;
+
+ HRSRC rsrc = FindResource(instance, MAKEINTRESOURCE(id), MAKEINTRESOURCE(2));
+ if (!rsrc) {
+ CString idStr;
+ idStr.Format("%d", id);
+
+ CString err = "T2BitImage::T2BitImage ERROR : " + idStr + " @" + GetModuleName(instance) + "\n";
+ OutputDebugString(err);
+ throw 0;
+ }
+
+ HGLOBAL h = LoadResource(instance, rsrc);
+ void *data = LockResource(h);
+ SetupBitmap((BITMAPINFO *) data, flip);
+ UnlockResource(h);
+ FreeResource(rsrc);
+}
+
+void T2BitImage::SetupBitmap(BITMAPINFO* info, BOOL flip) {
+ mBitmap.header = info->bmiHeader;
+
+ int colorCount = 256;
+ if (mBitmap.header.biClrUsed != 0)
+ colorCount = mBitmap.header.biClrUsed;
+
+ int dataSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth) * mBitmap.header.biHeight;
+ mMemHandle = GlobalAlloc(GHND, dataSize);
+ mData = (unsigned char *) GlobalLock(mMemHandle);
+
+ for (int i = 0; i < colorCount; i++)
+ mBitmap.palette[i] = i;
+
+ memcpy(mData, info->bmiColors + colorCount, dataSize);
+
+ if (flip) {
+ int rowSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth);
+ void *tmp = malloc(rowSize);
+ for (int y = 0; y < mBitmap.header.biHeight / 2; y++) {
+ int otherY = mBitmap.header.biHeight - y - 1;
+ memcpy(tmp, mData + y * rowSize, rowSize);
+ memcpy(mData + y * rowSize, mData + otherY * rowSize, rowSize);
+ memcpy(mData + otherY * rowSize, tmp, rowSize);
+ }
+ free(tmp);
+ }
+
+ mBackGndColor = -1;
+ mForeGndColor = -1;
+ mOrigin.x = 0;
+ mOrigin.y = 0;
+ mHalftoneMode = false;
+ SetClipRect(NULL);
+}
+
+T2BitImage::T2BitImage(const RECT& rect) {
+ int w = rect.right - rect.left;
+ int h = rect.bottom - rect.top;
+
+ memset(&mBitmap.header, 0, sizeof(mBitmap.header));
+ mBitmap.header.biSize = sizeof(mBitmap.header);
+ mBitmap.header.biWidth = w;
+ mBitmap.header.biHeight = h;
+ mBitmap.header.biPlanes = 1;
+ mBitmap.header.biBitCount = 8;
+ mBitmap.header.biSizeImage = ALIGN_ROW_SIZE(w) * h;
+ mBitmap.header.biClrUsed = 256;
+
+ for (int i = 0; i < 256; i++)
+ mBitmap.palette[i] = i;
+
+ mMemHandle = GlobalAlloc(GHND, mBitmap.header.biSizeImage);
+ mData = (unsigned char *) GlobalLock(mMemHandle);
+
+ mBackGndColor = -1;
+ mForeGndColor = -1;
+ mOrigin.x = 0;
+ mOrigin.y = 0;
+ mHalftoneMode = false;
+ SetClipRect(NULL);
+}
+
+/*virtual*/ T2BitImage::~T2BitImage() {
+ if (mMemHandle) {
+ GlobalUnlock(mMemHandle);
+ GlobalFree(mMemHandle);
+ }
+}
+
+BOOL T2BitImage::BeginDrawing() {
+ return true;
+}
+
+void T2BitImage::EndDrawing() {
+}
+
+void T2BitImage::CopyImage(T2BitImage& destImg, const RECT& inSrc, const RECT& inDest, int, CRgn* rgn) {
+ RECT src;
+ src.top = inSrc.top;
+ src.left = inSrc.left;
+ src.bottom = inSrc.bottom;
+ src.right = inSrc.right;
+ OffsetRect(&src, -mOrigin.x, -mOrigin.y);
+
+ RECT dest;
+ dest.top = inDest.top;
+ dest.left = inDest.left;
+ dest.bottom = inDest.bottom;
+ dest.right = inDest.right;
+ OffsetRect(&dest, -destImg.mOrigin.x, -destImg.mOrigin.y);
+
+ RECT clipSrc = mClipRect;
+ OffsetRect(&clipSrc, -mOrigin.x, -mOrigin.y);
+
+ RECT clipDest = destImg.mClipRect;
+ OffsetRect(&clipDest, -destImg.mOrigin.x, -destImg.mOrigin.y);
+
+ int align;
+
+ if ((dest.bottom - dest.top) == ((src.bottom - src.top) * 4)) {
+ align = 1; // Y scale /4
+ } else if ((dest.bottom - dest.top) == ((src.bottom - src.top) * 2)) {
+ align = 2; // Y scale /2
+ } else if ((dest.bottom - dest.top) == (src.bottom - src.top)) {
+ align = 4; // No scaling
+ } else if (((dest.bottom - dest.top) * 2) == (src.bottom - src.top)) {
+ align = 8; // Y scale *2
+ } else if (((dest.bottom - dest.top) * 4) == (src.bottom - src.top)) {
+ align = 16; // Y scale *4
+ } else {
+ CString err;
+ err.Format("•s³‚ÈŠg‘åk¬—¦\nSrc(%d,%d),Dest(%d,%d)", dest.top, dest.bottom, src.top, src.bottom);
+#line 183
+ __Rep0(__FILE__, __LINE__, err);
+ }
+
+ if (
+ ((src.right - src.left) != (((dest.right - dest.left) * align) / 4)) ||
+ ((src.bottom - src.top) != (((dest.bottom - dest.top) * align) / 4))
+ ) {
+ CString err;
+ err.Format("•s³‚ÈŠg‘åk¬—¦\nSrc(%d,%d),Dest(%d,%d)", dest.top, dest.bottom, src.top, src.bottom);
+#line 190
+ __Rep0(__FILE__, __LINE__, err);
+ }
+
+ RECT rect2;
+
+ int srcX = src.left;
+ int srcY = src.top;
+ rect2.top = 0;
+ rect2.left = 0;
+ rect2.bottom = mBitmap.header.biHeight;
+ rect2.right = mBitmap.header.biWidth;
+
+ if (!IntersectRect(&src, &rect2, &src))
+ return;
+ if (mHasClipRect && !IntersectRect(&src, &clipSrc, &src))
+ return;
+
+ int destX = dest.left;
+ int destY = dest.top;
+ rect2.top = 0;
+ rect2.left = 0;
+ rect2.bottom = destImg.mBitmap.header.biHeight;
+ rect2.right = destImg.mBitmap.header.biWidth;
+
+ if (!IntersectRect(&dest, &rect2, &dest))
+ return;
+ if (destImg.mHasClipRect && !IntersectRect(&dest, &clipDest, &dest))
+ return;
+
+ OffsetRect(&src, -srcX, -srcY);
+ OffsetRect(&dest, -destX, -destY);
+
+ dest.right = (dest.right * align) / 4;
+ dest.bottom = (dest.bottom * align) / 4;
+ dest.left = (dest.left * align) / 4;
+ dest.top = (dest.top * align) / 4;
+
+ if (!IntersectRect(&dest, &src, &dest))
+ return;
+
+ src = dest;
+
+ dest.right = (dest.right * 4) / align;
+ dest.bottom = (dest.bottom * 4) / align;
+ dest.left = (dest.left * 4) / align;
+ dest.top = (dest.top * 4) / align;
+
+ OffsetRect(&src, srcX, srcY);
+ OffsetRect(&dest, destX, destY);
+
+ int width = dest.right - dest.left;
+ int height = dest.bottom - dest.top;
+
+ int destRowSize = ALIGN_ROW_SIZE(destImg.mBitmap.header.biWidth);
+ int srcRowSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth);
+
+ unsigned char *destP = destImg.mData + dest.top * destRowSize + dest.left;
+ unsigned char *srcP = mData + src.top * srcRowSize + src.left;
+
+ int foreGndColor = mForeGndColor;
+ int backGndColor = mBackGndColor;
+ BOOL halftoneMode = mHalftoneMode;
+
+ int xAdjust = 0;
+ if (dest.left < 0) {
+ xAdjust = -dest.left;
+ destP += xAdjust;
+ width -= xAdjust;
+ }
+
+ int yAdjust = 0;
+ if (dest.top < 0) {
+ yAdjust = -dest.top;
+ destP += destRowSize * yAdjust;
+ height -= yAdjust;
+ }
+
+#define INC_SRC_ROW \
+ __asm mov eax, srcP \
+ __asm add eax, srcRowSize \
+ __asm mov srcP, eax
+
+#define INC_SRC_ROW_2 \
+ __asm mov eax, srcP \
+ __asm add eax, srcRowSize \
+ __asm add eax, srcRowSize \
+ __asm mov srcP, eax
+
+#define INC_SRC_ROW_4 \
+ __asm mov eax, srcP \
+ __asm mov ebx, srcRowSize \
+ __asm add eax, ebx \
+ __asm add eax, ebx \
+ __asm add eax, ebx \
+ __asm add eax, ebx \
+ __asm mov srcP, eax
+
+#define INC_DEST_ROW \
+ __asm mov eax, destP \
+ __asm add eax, destRowSize \
+ __asm mov destP, eax
+
+ if (!halftoneMode && foreGndColor == -1 && backGndColor == -1) {
+ // Simple drawing
+ if (align == 2) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ simple2_rowLoop:
+ or ecx, ecx
+ jle simple2_end
+ mov esi, srcP
+ mov edi, destP
+ mov edx, width
+ mov eax, xAdjust
+ or eax, eax
+ jnz simple2_midXAdjust
+ simple2_loopXAdjust:
+ or edx, edx
+ jle simple2_afterXAdjust
+ mov al, [esi]
+ mov [edi], al
+ inc edi
+ dec edx
+ or edx, edx
+ jle simple2_afterXAdjust
+ simple2_midXAdjust:
+ mov al, [esi]
+ mov [edi], al
+ inc esi
+ inc edi
+ dec edx
+ jmp simple2_loopXAdjust
+ simple2_afterXAdjust:
+ mov eax, yAdjust
+ inc eax
+ mov yAdjust, eax
+ and eax, 1
+ jnz simple2_skipRowInc
+ INC_SRC_ROW
+ simple2_skipRowInc:
+ INC_DEST_ROW
+ dec ecx
+ jmp simple2_rowLoop
+ simple2_end:
+ }
+#endif
+ } else if (align == 4) {
+ // No Y scaling at all
+ if ((width % 8) == 0) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ simple4a_outerLoop:
+ or ecx, ecx
+ jle simple4a_end
+ mov esi, srcP
+ mov edi, destP
+ mov edx, width
+ shr edx, 3
+ simple4a_innerLoop:
+ or edx, edx
+ jle simple4a_rowDone
+ ; copy an 8-byte chunk
+ mov eax, [esi]
+ mov [edi], eax
+ mov eax, [esi+4]
+ mov [edi+4], eax
+ add esi, 8
+ add edi, 8
+ dec edx
+ jmp simple4a_innerLoop
+ simple4a_rowDone:
+ INC_SRC_ROW
+ INC_DEST_ROW
+ dec ecx
+ jmp simple4a_outerLoop
+ simple4a_end:
+ }
+#endif
+ } else {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ simple4b_outerLoop:
+ or ecx, ecx
+ jle simple4b_end
+ mov esi, srcP
+ mov edi, destP
+ mov edx, width
+ simple4b_innerLoop:
+ or edx, edx
+ jle simple4b_rowDone
+ cmp edx, 4
+ jc simple4b_byteCopy
+ mov eax, [esi]
+ mov [edi], eax
+ add esi, 4
+ add edi, 4
+ sub edx, 4
+ jmp simple4b_innerLoop
+ simple4b_byteCopy:
+ mov al, [esi]
+ mov [edi], al
+ inc esi
+ inc edi
+ dec edx
+ jmp simple4b_innerLoop
+ simple4b_rowDone:
+ INC_SRC_ROW
+ INC_DEST_ROW
+ dec ecx
+ jmp simple4b_outerLoop
+ simple4b_end:
+ }
+#endif
+ }
+ } else if (align == 8) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ simple8_outerLoop:
+ or ecx, ecx
+ jle simple8_end
+ mov esi, srcP
+ mov edi, destP
+ mov edx, width
+ simple8_innerLoop:
+ or edx, edx
+ jle simple8_rowDone
+ mov al, [esi]
+ mov [edi], al
+ add esi, 4
+ inc edi
+ dec edx
+ jmp simple8_innerLoop
+ simple8_rowDone:
+ INC_SRC_ROW_2
+ INC_DEST_ROW
+ dec ecx
+ jmp simple8_outerLoop
+ simple8_end:
+ }
+#endif
+ } else if (align == 16) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ simple16_outerLoop:
+ or ecx, ecx
+ jle simple16_end
+ mov esi, srcP
+ mov edi, destP
+ mov edx, width
+ simple16_innerLoop:
+ or edx, edx
+ jle simple16_rowDone
+ mov al, [esi]
+ mov [edi], al
+ add esi, 4
+ inc edi
+ dec edx
+ jmp simple16_innerLoop
+ simple16_rowDone:
+ INC_SRC_ROW_4
+ INC_DEST_ROW
+ dec ecx
+ jmp simple16_outerLoop
+ simple16_end:
+ }
+#endif
+ }
+ return;
+ }
+
+ if (!halftoneMode && foreGndColor == -1 && backGndColor != -1) {
+ // Drawing with a background colour only
+ if (align == 4) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ bgc4_outerLoop:
+ or ecx, ecx
+ jle bgc4_end
+ mov esi, srcP
+ mov edi, destP
+ mov ah, byte ptr [backGndColor]
+ mov edx, width
+ bgc4_innerLoop:
+ or edx, edx
+ jle bgc4_rowDone
+ mov al, [esi]
+ cmp al, ah
+ jz bgc4_skipPixel
+ mov [edi], al
+ bgc4_skipPixel:
+ inc esi
+ inc edi
+ dec edx
+ jmp bgc4_innerLoop
+ bgc4_rowDone:
+ INC_SRC_ROW
+ INC_DEST_ROW
+ dec ecx
+ jmp bgc4_outerLoop
+ bgc4_end:
+ }
+#endif
+ } else if (align == 8) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ bgc8_outerLoop:
+ or ecx, ecx
+ jle bgc8_end
+ mov esi, srcP
+ mov edi, destP
+ mov ah, byte ptr [backGndColor]
+ mov edx, width
+ bgc8_innerLoop:
+ or edx, edx
+ jle bgc8_rowDone
+ mov al, [esi]
+ cmp al, ah
+ jz bgc8_skipPixel
+ mov [edi], al
+ bgc8_skipPixel:
+ add esi, 2
+ inc edi
+ dec edx
+ jmp bgc8_innerLoop
+ bgc8_rowDone:
+ INC_SRC_ROW_2
+ INC_DEST_ROW
+ dec ecx
+ jmp bgc8_outerLoop
+ bgc8_end:
+ }
+#endif
+ } else if (align == 16) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ bgc16_outerLoop:
+ or ecx, ecx
+ jle bgc16_end
+ mov esi, srcP
+ mov edi, destP
+ mov ah, byte ptr [backGndColor]
+ mov edx, width
+ bgc16_innerLoop:
+ or edx, edx
+ jle bgc16_rowDone
+ mov al, [esi]
+ cmp al, ah
+ jz bgc16_skipPixel
+ mov [edi], al
+ bgc16_skipPixel:
+ add esi, 4
+ inc edi
+ dec edx
+ jmp bgc16_innerLoop
+ bgc16_rowDone:
+ INC_SRC_ROW_4
+ INC_DEST_ROW
+ dec ecx
+ jmp bgc16_outerLoop
+ bgc16_end:
+ }
+#endif
+ }
+ return;
+ }
+
+ if (halftoneMode && foreGndColor == -1 && backGndColor == -1) {
+ // Simple drawing in halftone mode
+ if (align == 4) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ ht4_outerLoop:
+ or ecx, ecx
+ jle ht4_end
+ mov esi, srcP
+ mov edi, destP
+ mov edx, width
+ mov ebx, ecx
+ ht4_innerLoop:
+ or edx, edx
+ jle ht4_rowDone
+ test ebx, 1
+ jz ht4_skipPixel
+ mov al, [esi]
+ mov [edi], al
+ ht4_skipPixel:
+ inc esi
+ inc edi
+ dec edx
+ inc ebx
+ jmp ht4_innerLoop
+ ht4_rowDone:
+ INC_SRC_ROW
+ INC_DEST_ROW
+ dec ecx
+ jmp ht4_outerLoop
+ ht4_end:
+ }
+#endif
+ } else if (align == 8) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ ht8_outerLoop:
+ or ecx, ecx
+ jle ht8_end
+ mov esi, srcP
+ mov edi, destP
+ mov edx, width
+ mov ebx, ecx
+ ht8_innerLoop:
+ or edx, edx
+ jle ht8_rowDone
+ test ebx, 1
+ jz ht8_skipPixel
+ mov al, [esi]
+ mov [edi], al
+ ht8_skipPixel:
+ add esi, 2
+ inc edi
+ dec edx
+ inc ebx
+ jmp ht8_innerLoop
+ ht8_rowDone:
+ INC_SRC_ROW_2
+ INC_DEST_ROW
+ dec ecx
+ jmp ht8_outerLoop
+ ht8_end:
+ }
+#endif
+ } else if (align == 16) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ ht16_outerLoop:
+ or ecx, ecx
+ jle ht16_end
+ mov esi, srcP
+ mov edi, destP
+ mov edx, width
+ mov ebx, ecx
+ ht16_innerLoop:
+ or edx, edx
+ jle ht16_rowDone
+ test ebx, 1
+ jz ht16_skipPixel
+ mov al, [esi]
+ mov [edi], al
+ ht16_skipPixel:
+ add esi, 4
+ inc edi
+ dec edx
+ inc ebx
+ jmp ht16_innerLoop
+ ht16_rowDone:
+ INC_SRC_ROW_4
+ INC_DEST_ROW
+ dec ecx
+ jmp ht16_outerLoop
+ ht16_end:
+ }
+#endif
+ }
+ return;
+ }
+
+ if (halftoneMode && foreGndColor == -1 && backGndColor != -1) {
+ // Drawing with a background colour in halftone mode
+ if (align == 4) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ htBg4_outerLoop:
+ or ecx, ecx
+ jle htBg4_end
+ mov esi, srcP
+ mov edi, destP
+ mov ah, byte ptr [backGndColor]
+ mov edx, width
+ mov ebx, ecx
+ htBg4_innerLoop:
+ or edx, edx
+ jle htBg4_rowDone
+ test ebx, 1
+ jz htBg4_skipPixel
+ mov al, [esi]
+ cmp al, ah
+ jz htBg4_skipPixel
+ mov [edi], al
+ htBg4_skipPixel:
+ inc esi
+ inc edi
+ dec edx
+ inc ebx
+ jmp htBg4_innerLoop
+ htBg4_rowDone:
+ INC_SRC_ROW
+ INC_DEST_ROW
+ dec ecx
+ jmp htBg4_outerLoop
+ htBg4_end:
+ }
+#endif
+ } else if (align == 8) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ htBg8_outerLoop:
+ or ecx, ecx
+ jle htBg8_end
+ mov esi, srcP
+ mov edi, destP
+ mov ah, byte ptr [backGndColor]
+ mov edx, width
+ mov ebx, ecx
+ htBg8_innerLoop:
+ or edx, edx
+ jle htBg8_rowDone
+ test ebx, 1
+ jz htBg8_skipPixel
+ mov al, [esi]
+ cmp al, ah
+ jz htBg8_skipPixel
+ mov [edi], al
+ htBg8_skipPixel:
+ add esi, 2
+ inc edi
+ dec edx
+ inc ebx
+ jmp htBg8_innerLoop
+ htBg8_rowDone:
+ INC_SRC_ROW_2
+ INC_DEST_ROW
+ dec ecx
+ jmp htBg8_outerLoop
+ htBg8_end:
+ }
+#endif
+ } else if (align == 16) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ htBg16_outerLoop:
+ or ecx, ecx
+ jle htBg16_end
+ mov esi, srcP
+ mov edi, destP
+ mov ah, byte ptr [backGndColor]
+ mov edx, width
+ mov ebx, ecx
+ htBg16_innerLoop:
+ or edx, edx
+ jle htBg16_rowDone
+ test ebx, 1
+ jz htBg16_skipPixel
+ mov al, [esi]
+ cmp al, ah
+ jz htBg16_skipPixel
+ mov [edi], al
+ htBg16_skipPixel:
+ add esi, 4
+ inc edi
+ dec edx
+ inc ebx
+ jmp htBg16_innerLoop
+ htBg16_rowDone:
+ INC_SRC_ROW_4
+ INC_DEST_ROW
+ dec ecx
+ jmp htBg16_outerLoop
+ htBg16_end:
+ }
+#endif
+ }
+ return;
+ }
+
+ if (!halftoneMode && foreGndColor != -1 && backGndColor != -1) {
+ // Drawing with a foreground and background colour
+ if (align == 4) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ fgBg4_outerLoop:
+ or ecx, ecx
+ jle fgBg4_end
+ mov esi, srcP
+ mov edi, destP
+ mov bh, byte ptr [foreGndColor]
+ mov bl, byte ptr [backGndColor]
+ mov edx, width
+ fgBg4_innerLoop:
+ or edx, edx
+ jle fgBg4_rowDone
+ mov al, [esi]
+ cmp al, bl
+ jz fgBg4_skipPixel
+ mov [edi], bh
+ fgBg4_skipPixel:
+ inc esi
+ inc edi
+ dec edx
+ jmp fgBg4_innerLoop
+ fgBg4_rowDone:
+ INC_SRC_ROW
+ INC_DEST_ROW
+ dec ecx
+ jmp fgBg4_outerLoop
+ fgBg4_end:
+ }
+#endif
+ } else if (align == 8) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ fgBg8_outerLoop:
+ or ecx, ecx
+ jle fgBg8_end
+ mov esi, srcP
+ mov edi, destP
+ mov bh, byte ptr [foreGndColor]
+ mov bl, byte ptr [backGndColor]
+ mov edx, width
+ fgBg8_innerLoop:
+ or edx, edx
+ jle fgBg8_rowDone
+ mov al, [esi]
+ cmp al, bl
+ jz fgBg8_skipPixel
+ mov [edi], bh
+ fgBg8_skipPixel:
+ add esi, 2
+ inc edi
+ dec edx
+ jmp fgBg8_innerLoop
+ fgBg8_rowDone:
+ INC_SRC_ROW_2
+ INC_DEST_ROW
+ dec ecx
+ jmp fgBg8_outerLoop
+ fgBg8_end:
+ }
+#endif
+ } else if (align == 16) {
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, height
+ fgBg16_outerLoop:
+ or ecx, ecx
+ jle fgBg16_end
+ mov esi, srcP
+ mov edi, destP
+ mov bh, byte ptr [foreGndColor]
+ mov bl, byte ptr [backGndColor]
+ mov edx, width
+ fgBg16_innerLoop:
+ or edx, edx
+ jle fgBg16_rowDone
+ mov al, [esi]
+ cmp al, bl
+ jz fgBg16_skipPixel
+ mov [edi], bh
+ fgBg16_skipPixel:
+ add esi, 4
+ inc edi
+ dec edx
+ jmp fgBg16_innerLoop
+ fgBg16_rowDone:
+ INC_SRC_ROW_4
+ INC_DEST_ROW
+ dec ecx
+ jmp fgBg16_outerLoop
+ fgBg16_end:
+ }
+#endif
+ }
+ return;
+ }
+
+ _CrtDbgBreak();
+}
+
+void T2BitImage::CopyImage(CDC* dc, const RECT& inSrc, const RECT& inDest, int, CRgn*) {
+ RECT src;
+ src.top = inSrc.top;
+ src.left = inSrc.left;
+ src.bottom = inSrc.bottom;
+ src.right = inSrc.right;
+ OffsetRect(&src, -mOrigin.x, -mOrigin.y);
+
+ RECT dest;
+ dest.top = inDest.top;
+ dest.left = inDest.left;
+ dest.bottom = inDest.bottom;
+ dest.right = inDest.right;
+
+ if ((src.right - src.left) != (dest.right - dest.left) ||
+ (src.top - src.bottom) != (dest.top - dest.bottom))
+ return;
+
+ int diffX = src.left - dest.left;
+ int diffY = src.top - dest.top;
+
+ RECT tmp;
+ tmp.top = 0;
+ tmp.left = 0;
+ tmp.right = mBitmap.header.biWidth;
+ tmp.bottom = mBitmap.header.biHeight;
+
+ if (tmp.top > tmp.bottom) {
+ int save = tmp.top;
+ tmp.top = tmp.bottom;
+ tmp.bottom = save;
+ }
+
+ if (src.top > src.bottom) {
+ int save = src.top;
+ src.top = src.bottom;
+ src.bottom = save;
+ }
+
+ if (!IntersectRect(&src, &tmp, &src))
+ return;
+
+ OffsetRect(&dest, diffX, diffY);
+ if (!IntersectRect(&dest, &dest, &src))
+ return;
+ OffsetRect(&dest, -diffX, -diffY);
+
+ Bitmap bmp = mBitmap;
+ bmp.header.biHeight = -bmp.header.biHeight;
+
+ SetDIBitsToDevice(
+ dc->m_hDC,
+ dest.left,
+ dest.top,
+ src.right - src.left,
+ src.bottom - src.top,
+ src.left,
+ abs(bmp.header.biHeight) - src.bottom,
+ 0,
+ -bmp.header.biHeight,
+ mData,
+ (BITMAPINFO *) &bmp,
+ 1
+ );
+}
+
+void T2BitImage::Clear(int c) {
+ memset(mData, c, ALIGN_ROW_SIZE(mBitmap.header.biWidth) * abs(mBitmap.header.biHeight));
+}
+
+void T2BitImage::SetBackGndColor(int c) {
+ mBackGndColor = c;
+}
+
+void T2BitImage::SetForeGndColor(int c) {
+ mForeGndColor = c;
+}
+
+void T2BitImage::SetOrigin(int x, int y) {
+ mOrigin.x = x;
+ mOrigin.y = y;
+}
+
+void T2BitImage::SetClipRect(RECT* rect) {
+ if (!rect) {
+ SetRect(&mClipRect, 0, 0, mBitmap.header.biWidth, mBitmap.header.biHeight);
+ mHasClipRect = false;
+ } else {
+ mClipRect = *rect;
+ mHasClipRect = true;
+ }
+}
+
+void T2BitImage::SetHalftoneMode(BOOL m) {
+ mHalftoneMode = m;
+}
+
+void T2BitImage::DrawFocusRect(RECT rect) {
+ DrawFocusRect2(rect);
+ InsetRect(&rect, 1, 1);
+ DrawFocusRect2(rect);
+}
+
+void T2BitImage::DrawFocusRect2(RECT rect) {
+ OffsetRect(&rect, -mOrigin.x, -mOrigin.y);
+
+ RECT bitmapRect;
+ SetRect(&bitmapRect, 0, 0, mBitmap.header.biWidth, mBitmap.header.biHeight);
+
+ IntersectRect(&rect, &rect, &bitmapRect);
+
+ if (rect.top >= 0)
+ DrawFocusLine(rect.left, rect.top, rect.right, rect.top);
+ if (rect.right < mBitmap.header.biWidth)
+ DrawFocusLine(rect.right - 1, rect.top, rect.right - 1, rect.bottom);
+ if (rect.bottom < mBitmap.header.biHeight)
+ DrawFocusLine(rect.left, rect.bottom - 1, rect.right, rect.bottom - 1);
+ if (rect.left >= 0)
+ DrawFocusLine(rect.left, rect.top, rect.left, rect.bottom);
+}
+
+void T2BitImage::DrawFocusLine(int x1, int y1, int x2, int y2) {
+ if (x1 > x2) {
+ int tmp = x1;
+ x1 = x2;
+ x2 = tmp;
+ } else if (y1 > y2) {
+ int tmp = y1;
+ y1 = y2;
+ y2 = tmp;
+ }
+
+ int rowSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth);
+ int counter = 0;
+ unsigned char *p = mData + y1 * rowSize + x1;
+
+ if (x1 == x2) {
+ for (int y = y1; y < y2; y++) {
+ *p = (counter >= 3) ? 254 : 253;
+ p += rowSize;
+ counter++;
+ if (counter == 6)
+ counter = 0;
+ }
+ } else if (y1 == y2) {
+ for (int x = x1; x < x2; x++) {
+ *p = (counter >= 3) ? 254 : 253;
+ p++;
+ counter++;
+ if (counter == 6)
+ counter = 0;
+ }
+ } else {
+ _CrtDbgBreak();
+ }
+}
+
+void T2BitImage::FillMesh(RECT rect, int c) {
+ OffsetRect(&rect, -mOrigin.x, -mOrigin.y);
+
+ RECT bitmapRect;
+ SetRect(&bitmapRect, 0, 0, mBitmap.header.biWidth, mBitmap.header.biHeight);
+
+ if (mHasClipRect) {
+ RECT clipRect = mClipRect;
+ OffsetRect(&clipRect, -mOrigin.x, -mOrigin.y);
+ IntersectRect(&bitmapRect, &bitmapRect, &clipRect);
+ }
+
+ IntersectRect(&rect, &rect, &bitmapRect);
+ if (!IsRectEmpty(&rect)) {
+ unsigned char parity = rect.left + rect.top;
+ int rowSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth);
+ unsigned char *p = mData + rect.top * rowSize + rect.left;
+ int width = rect.right - rect.left;
+ int height = rect.bottom - rect.top;
+ unsigned char cByte = c;
+
+ if (width > 0 && height > 0) {
+#ifdef _MSC_VER
+ __asm {
+ mov al, cByte
+ mov ebx, p
+ mov ecx, height
+ rowLoop:
+ mov ah, parity
+ mov edi, ebx
+ mov edx, width
+ pixelLoop:
+ test ah, 1
+ jz skip
+ mov [edi], al
+ skip:
+ inc edi
+ inc ah
+ dec edx
+ jnz pixelLoop
+ add ebx, rowSize
+ mov ah, parity
+ inc ah
+ mov parity, ah
+ dec ecx
+ jnz rowLoop
+ }
+#endif
+ }
+ }
+}
+
+void T2BitImage::FillRect(RECT rect, int c) {
+ OffsetRect(&rect, -mOrigin.x, -mOrigin.y);
+
+ RECT bitmapRect;
+ SetRect(&bitmapRect, 0, 0, mBitmap.header.biWidth, mBitmap.header.biHeight);
+
+ if (mHasClipRect) {
+ RECT clipRect = mClipRect;
+ OffsetRect(&clipRect, -mOrigin.x, -mOrigin.y);
+ IntersectRect(&bitmapRect, &bitmapRect, &clipRect);
+ }
+
+ IntersectRect(&rect, &rect, &bitmapRect);
+ if (!IsRectEmpty(&rect)) {
+ int rowSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth);
+ unsigned char *p = mData + rect.top * rowSize + rect.left;
+ int width = rect.right - rect.left;
+ int height = rect.bottom - rect.top;
+ unsigned char cByte = c;
+
+ if (width > 0 && height > 0) {
+#ifdef _MSC_VER
+ __asm {
+ mov al, cByte
+ mov ebx, p
+ mov ecx, height
+ rowLoop:
+ mov edi, ebx
+ mov edx, width
+ pixelLoop:
+ mov [edi], al
+ inc edi
+ dec edx
+ jnz pixelLoop
+ add ebx, rowSize
+ dec ecx
+ jnz rowLoop
+ }
+#endif
+ }
+ }
+}
+
+int T2BitImage::GetPixel(int x, int y) {
+ x -= mOrigin.x;
+ y -= mOrigin.y;
+
+ if (x < 0 || x >= mBitmap.header.biWidth || y < 0 || y >= mBitmap.header.biHeight)
+ return -1;
+
+ int rowSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth);
+ return mData[y * rowSize + x];
+}
+
+int T2BitImage::GetPixel(const POINT& pt) {
+ return GetPixel(pt.x, pt.y);
+}
+
+/*virtual*/ BOOL T2BitImage::IsExist() {
+ return mMemHandle != NULL;
+}
+
+void T2BitImage::DrawFrameRect(RECT rect, int c) {
+ OffsetRect(&rect, -mOrigin.x, -mOrigin.y);
+
+ RECT bitmapRect;
+ SetRect(&bitmapRect, 0, 0, mBitmap.header.biWidth, mBitmap.header.biHeight);
+
+ if (mHasClipRect) {
+ RECT clipRect = mClipRect;
+ OffsetRect(&clipRect, -mOrigin.x, -mOrigin.y);
+ IntersectRect(&bitmapRect, &bitmapRect, &clipRect);
+ }
+
+ RECT frameRect;
+ IntersectRect(&frameRect, &rect, &bitmapRect);
+ if (!IsRectEmpty(&frameRect)) {
+ if (frameRect.top == rect.top)
+ DrawFrameLine(frameRect.left, frameRect.top, frameRect.right, frameRect.top, c);
+ if (frameRect.left == rect.left)
+ DrawFrameLine(frameRect.left, frameRect.top, frameRect.left, frameRect.bottom, c);
+ if (frameRect.bottom == rect.bottom)
+ DrawFrameLine(frameRect.left, frameRect.bottom - 1, frameRect.right, frameRect.bottom - 1, c);
+ if (frameRect.right == rect.right)
+ DrawFrameLine(frameRect.right - 1, frameRect.top, frameRect.right - 1, frameRect.bottom, c);
+ }
+}
+
+void T2BitImage::DrawFrameLine(int x1, int y1, int x2, int y2, int c) {
+ if (x1 == x2) {
+ if (y1 != y2) {
+ if (y2 < y1) {
+ int tmp = y1;
+ y1 = y2;
+ y2 = tmp;
+ }
+
+ int rowSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth);
+ unsigned char *p = mData + y1 * rowSize + x1;
+ int count = y2 - y1;
+ unsigned char cByte = c;
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, count
+ mov edi, p
+ mov al, cByte
+ mov edx, rowSize
+ pixelLoop:
+ mov [edi], al
+ add edi, edx
+ dec ecx
+ jnz pixelLoop
+ }
+#else
+ do {
+ *p = cByte;
+ p += rowSize;
+ } while (--count != 0);
+#endif
+ }
+ } else if (y1 == y2) {
+ if (x1 != x2) {
+ if (x2 < x1) {
+ int tmp = x1;
+ x1 = x2;
+ x2 = tmp;
+ }
+
+ int rowSize = ALIGN_ROW_SIZE(mBitmap.header.biWidth);
+ unsigned char *p = mData + y1 * rowSize + x1;
+ int count = x2 - x1;
+ unsigned char cByte = c;
+#ifdef _MSC_VER
+ __asm {
+ mov ecx, count
+ mov edi, p
+ mov al, cByte
+ pixelLoop2:
+ mov [edi], al
+ inc edi
+ dec ecx
+ jnz pixelLoop2
+ }
+#else
+ do {
+ *p = cByte;
+ p++;
+ } while (--count != 0);
+#endif
+ }
+ } else {
+#line 1457
+ _ASSERT(0);
+ }
+}
diff --git a/src/T2DLL/T2BitImage.h b/src/T2DLL/T2BitImage.h
new file mode 100644
index 0000000..5e23a62
--- /dev/null
+++ b/src/T2DLL/T2BitImage.h
@@ -0,0 +1,56 @@
+#pragma once
+#include "common.h"
+
+// unknown name
+struct Bitmap {
+ BITMAPINFOHEADER header;
+ short palette[256];
+};
+
+class DLL_EXPORT T2BitImage {
+public:
+ T2BitImage(const char* path, unsigned int id, BOOL flip);
+ T2BitImage(HINSTANCE path, unsigned int id, BOOL flip);
+ T2BitImage(const RECT&);
+ virtual ~T2BitImage();
+ virtual BOOL IsExist();
+
+ BOOL BeginDrawing();
+ void EndDrawing();
+ void CopyImage(T2BitImage&, const RECT&, const RECT&, int, CRgn*);
+ void CopyImage(CDC*, const RECT&, const RECT&, int, CRgn*);
+ void Clear(int);
+ void SetBackGndColor(int);
+ void SetForeGndColor(int);
+ void SetOrigin(int, int);
+ void SetClipRect(RECT*);
+ void SetHalftoneMode(BOOL);
+ void DrawFocusRect(RECT);
+ void FillMesh(RECT, int);
+ void FillRect(RECT, int);
+ int GetPixel(int, int);
+ int GetPixel(const POINT&);
+ void DrawFrameRect(RECT, int);
+
+ int GetParam() { return mParam; }
+ void SetParam(int v) { mParam = v; }
+
+protected:
+ friend class T2ImageObj;
+
+ void SetupBitmap(BITMAPINFO* info, BOOL flip);
+ void DrawFocusRect2(RECT);
+ void DrawFocusLine(int, int, int, int);
+ void DrawFrameLine(int, int, int, int, int);
+
+ Bitmap mBitmap;
+ unsigned char *mData;
+ POINT mOrigin;
+ HGLOBAL mMemHandle;
+ int mForeGndColor;
+ int mBackGndColor;
+ RECT mClipRect;
+ BOOL mHasClipRect;
+ BOOL mHalftoneMode;
+ int mParam;
+};
diff --git a/src/T2DLL/T2BlackOut.cpp b/src/T2DLL/T2BlackOut.cpp
new file mode 100644
index 0000000..c80bafb
--- /dev/null
+++ b/src/T2DLL/T2BlackOut.cpp
@@ -0,0 +1,49 @@
+#include "T2BlackOut.h"
+
+T2BlackOut::T2BlackOut(T2TowerEvent*, CResFile*, int) {
+}
+
+/*virtual*/ T2BlackOut::~T2BlackOut() {
+}
+
+/*virtual*/ int T2BlackOut::Start(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2BlackOut::Exec(T2TowerDoc*) {
+}
+
+void T2BlackOut::AddConsumptionPower(int) {
+}
+
+void T2BlackOut::SubConsumptionPower(int) {
+}
+
+void T2BlackOut::AddSupplyPower(int) {
+}
+
+void T2BlackOut::SubSupplyPower() {
+}
+
+void T2BlackOut::BreakerOn() {
+}
+
+int T2BlackOut::GetConsumptionPower() {
+}
+
+int T2BlackOut::GetSupplyPower() {
+}
+
+int T2BlackOut::GetDefSupply() {
+}
+
+int T2BlackOut::GetAddSupply() {
+}
+
+int T2BlackOut::GetTransforPrice() {
+}
+
+/*virtual*/ void T2BlackOut::Write(T2Archive&) {
+}
+
+/*virtual*/ void T2BlackOut::Read(T2Archive&) {
+}
diff --git a/src/T2DLL/T2BlackOut.h b/src/T2DLL/T2BlackOut.h
new file mode 100644
index 0000000..7d06eb5
--- /dev/null
+++ b/src/T2DLL/T2BlackOut.h
@@ -0,0 +1,27 @@
+#pragma once
+#include "common.h"
+
+class T2BlackOut {
+public:
+ T2BlackOut(T2TowerEvent*, CResFile*, int);
+ virtual ~T2BlackOut();
+ virtual int Start(T2TowerDoc*);
+ virtual int Exec(T2TowerDoc*);
+ void AddConsumptionPower(int);
+ void SubConsumptionPower(int);
+ void AddSupplyPower(int);
+ void SubSupplyPower();
+ void BreakerOn();
+ int GetConsumptionPower();
+ int GetSupplyPower();
+ int GetDefSupply();
+ int GetAddSupply();
+ int GetTransforPrice();
+ virtual void Write(T2Archive&);
+ virtual void Read(T2Archive&);
+
+ virtual unsigned long GetID() {}
+ int IsBlackOut() {}
+ T2BlackOut(const T2BlackOut&) {}
+ T2BlackOut& operator=(const T2BlackOut&) {}
+};
diff --git a/src/T2DLL/T2ClassFactory.cpp b/src/T2DLL/T2ClassFactory.cpp
new file mode 100644
index 0000000..cff2ee9
--- /dev/null
+++ b/src/T2DLL/T2ClassFactory.cpp
@@ -0,0 +1,25 @@
+#include "T2ClassFactory.h"
+
+/*static*/ void T2ClassFactory::Initialize() {
+}
+
+/*static*/ void T2ClassFactory::Discard() {
+}
+
+/*static*/ void T2ClassFactory::Register(CLASSFACTORY_CLASSINFO*) {
+}
+
+/*static*/ void* T2ClassFactory::Query(int) {
+}
+
+/*static*/ void* T2ClassFactory::new_T2Archive() {
+}
+
+/*static*/ void* T2ClassFactory::new_T2Dialog() {
+}
+
+/*static*/ void* T2ClassFactory::new_T2Balloon() {
+}
+
+/*static*/ void* T2ClassFactory::new_T2SoundPlayer(CWnd*, IDirectSound*) {
+}
diff --git a/src/T2DLL/T2ClassFactory.h b/src/T2DLL/T2ClassFactory.h
new file mode 100644
index 0000000..4df7068
--- /dev/null
+++ b/src/T2DLL/T2ClassFactory.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "common.h"
+
+class T2ClassFactory {
+public:
+ static void Initialize();
+ static void Discard();
+ static void Register(CLASSFACTORY_CLASSINFO*);
+ static void* Query(int);
+private:
+ static void* new_T2Archive();
+ static void* new_T2Dialog();
+ static void* new_T2Balloon();
+ static void* new_T2SoundPlayer(CWnd*, IDirectSound*);
+
+public:
+ T2ClassFactory& operator=(const T2ClassFactory&) {}
+};
diff --git a/src/T2DLL/T2CrossEquipArray.cpp b/src/T2DLL/T2CrossEquipArray.cpp
new file mode 100644
index 0000000..3e349aa
--- /dev/null
+++ b/src/T2DLL/T2CrossEquipArray.cpp
@@ -0,0 +1,87 @@
+#include "T2Archive.h"
+#include "T2CrossEquipArray.h"
+#include "T2FloorCEArray.h"
+#include "T2MoverCEArray.h"
+#include "T2RouteCEArray.h"
+#include "T2TenantCEArray.h"
+
+T2CrossEquipArray::T2CrossEquipArray() {
+}
+
+/*virtual*/ T2CrossEquipArray::~T2CrossEquipArray() {
+}
+
+void T2CrossEquipArray::AllClear() {
+ RemoveItemsAt(mItemCount, 1);
+}
+
+void T2CrossEquipArray::ReplaceID(unsigned int oldID, unsigned int newID) {
+ if (FetchIndexOf(&newID) == 0) {
+ int oldIDIndex = FetchIndexOf(&oldID);
+ if (oldIDIndex != 0)
+ AssignItemsAt(1, oldIDIndex, &newID);
+ } else {
+ int oldIDIndex = FetchIndexOf(&oldID);
+ if (oldIDIndex != 0)
+ RemoveItemsAt(1, oldIDIndex);
+ }
+}
+
+void T2CrossEquipArray::Union(T2CrossEquipArray* other) {
+ LArrayIterator iter(*other);
+ unsigned int id;
+ while (iter.Next(&id))
+ InsertItemsAt(1, mItemCount + 1, &id);
+}
+
+/*virtual*/ void T2CrossEquipArray::InsertItemsAt(int count, int where, unsigned int* id) {
+ if (FetchIndexOf(id) == 0)
+ LArray::InsertItemsAt(count, where, id);
+}
+
+/*virtual*/ void T2CrossEquipArray::Add(unsigned int id) {
+ if (FetchIndexOf(&id) == 0)
+ LArray::Add(&id);
+}
+
+/*static*/ T2CrossEquipArray* T2CrossEquipArray::ReadCEArray(T2Archive& archive) {
+ T2CrossEquipArray *array = NULL;
+ DWORD classID;
+ archive >> classID;
+
+ switch (classID) {
+ case '_CEA':
+ array = new T2CrossEquipArray;
+ break;
+ case 'TCEA':
+ array = new T2TenantCEArray;
+ break;
+ case 'RCEA':
+ array = new T2RouteCEArray;
+ break;
+ case 'FCEA':
+ array = new T2FloorCEArray;
+ break;
+ case 'MCEA':
+ array = new T2MoverCEArray;
+ break;
+ }
+
+ if (array)
+ array->ReadAsWord(archive);
+
+ return array;
+}
+
+/*static*/ void T2CrossEquipArray::WriteCEArray(T2CrossEquipArray* array, T2Archive& archive) {
+ DWORD classID;
+
+ if (!array) {
+ classID = 'xCEA';
+ archive << classID;
+ } else {
+ classID = array->GetCEClassID();
+ archive << classID;
+ array->WriteAsWord(archive);
+ }
+}
diff --git a/src/T2DLL/T2CrossEquipArray.h b/src/T2DLL/T2CrossEquipArray.h
new file mode 100644
index 0000000..016ea88
--- /dev/null
+++ b/src/T2DLL/T2CrossEquipArray.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "common.h"
+#include "LArray.h"
+
+class T2CrossEquipArray : public LArray {
+public:
+ T2CrossEquipArray();
+ virtual ~T2CrossEquipArray();
+ void AllClear();
+ void ReplaceID(unsigned int, unsigned int);
+ void Union(T2CrossEquipArray*);
+ virtual void InsertItemsAt(int, int, unsigned int*);
+ virtual void Add(unsigned int);
+ virtual DWORD GetCEClassID() { return '_CEA'; }
+
+ static T2CrossEquipArray* ReadCEArray(T2Archive&);
+ static void WriteCEArray(T2CrossEquipArray*, T2Archive&);
+};
diff --git a/src/T2DLL/T2CustomerTableIterator.cpp b/src/T2DLL/T2CustomerTableIterator.cpp
new file mode 100644
index 0000000..4e3fd46
--- /dev/null
+++ b/src/T2DLL/T2CustomerTableIterator.cpp
@@ -0,0 +1,13 @@
+#include "T2CustomerTableIterator.h"
+
+T2CustomerTableIterator::T2CustomerTableIterator(const T2TenantMemberTableDef*) {
+}
+
+T2CustomerTableIterator::~T2CustomerTableIterator() {
+}
+
+int T2CustomerTableIterator::Next(T2TenantMemberDef*&, unsigned int&) {
+}
+
+void T2CustomerTableIterator::CalcNextIndex() {
+}
diff --git a/src/T2DLL/T2CustomerTableIterator.h b/src/T2DLL/T2CustomerTableIterator.h
new file mode 100644
index 0000000..ba07778
--- /dev/null
+++ b/src/T2DLL/T2CustomerTableIterator.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class T2CustomerTableIterator {
+public:
+ T2CustomerTableIterator(const T2TenantMemberTableDef*);
+ ~T2CustomerTableIterator();
+ int Next(T2TenantMemberDef*&, unsigned int&);
+protected:
+ void CalcNextIndex();
+
+public:
+ T2CustomerTableIterator& operator=(const T2CustomerTableIterator&) {}
+};
diff --git a/src/T2DLL/T2DateTime.cpp b/src/T2DLL/T2DateTime.cpp
new file mode 100644
index 0000000..5cb704d
--- /dev/null
+++ b/src/T2DLL/T2DateTime.cpp
@@ -0,0 +1,153 @@
+#include "T2Archive.h"
+#include "T2DateTime.h"
+
+T2DateTime::T2DateTime() {
+ mYear = 0;
+ mMonth = 0;
+ mRawMinutes = 0;
+ mSeconds = 0;
+}
+
+T2DateTime::T2DateTime(int year, int month, int hours, int minutes, int seconds) {
+ mYear = year;
+ mMonth = month;
+ mRawMinutes = hours * 60 + minutes;
+ mSeconds = seconds;
+}
+
+T2DateTime::T2DateTime(T2Archive& archive) {
+ unsigned short v;
+
+ archive >> v;
+ mYear = v;
+ archive >> v;
+ mMonth = v;
+ archive >> v;
+ mRawMinutes = v;
+ archive >> v;
+ mSeconds = v;
+}
+
+/*virtual*/ T2DateTime::~T2DateTime() {
+}
+
+int T2DateTime::GetTimeZone() {
+ int h = Get24Hour();
+ if (h < 2) return 0;
+ if (h < 6) return 1;
+ if (h < 9) return 2;
+ if (h < 10) return 3;
+ if (h < 12) return 4;
+ if (h < 13) return 5;
+ if (h < 15) return 6;
+ if (h < 18) return 7;
+ if (h < 22) return 8;
+ return 9;
+}
+
+/*static*/ int T2DateTime::IsEqualDate(T2DateTime* a, T2DateTime* b) {
+ return (a->mYear == b->mYear) && (a->mMonth == b->mMonth);
+}
+
+/*static*/ int T2DateTime::IsEqualDateTime(T2DateTime* a, T2DateTime* b) {
+ return IsEqualDate(a, b) && (a->mRawMinutes == b->mRawMinutes);
+}
+
+void T2DateTime::AddMinutes(unsigned int m) {
+ mRawMinutes += m;
+ Validate();
+}
+
+int T2DateTime::IsIncDateTime() {
+ int result = false;
+
+ mSeconds++;
+ if (mSeconds >= 4) {
+ result = true;
+ mSeconds = 0;
+ mRawMinutes++;
+ if (mRawMinutes >= 1440) {
+ mMonth++;
+ mRawMinutes -= 1440;
+ }
+ if (mMonth >= 12) {
+ mYear++;
+ mMonth -= 12;
+ }
+ }
+
+ return result;
+}
+
+void T2DateTime::IncDate() {
+ mMonth++;
+ if (mMonth >= 12) {
+ mYear++;
+ mMonth -= 12;
+ }
+}
+
+unsigned int T2DateTime::CalcLapseDays(unsigned int d) const {
+ return CalcTotalDays() - d;
+}
+
+unsigned int T2DateTime::CalcLapseYears(unsigned int d) const {
+ return (CalcTotalDays() - d) / 12;
+}
+
+int T2DateTime::WithinHour(int a, int b) const {
+ return WithinMinutes(a * 60, b * 60);
+}
+
+int T2DateTime::WithinMinutes(int a, int b) const {
+ int ret = true;
+
+ int minA = AdjustMinutes(a);
+ int minB = AdjustMinutes(b);
+
+ if (minA < minB) {
+ if ((mRawMinutes < minA) || (mRawMinutes >= minB))
+ ret = false;
+ } else if (minA > minB) {
+ if ((mRawMinutes >= minB) && (mRawMinutes < minA))
+ ret = false;
+ }
+
+ return ret;
+}
+
+int T2DateTime::AdjustMinutes(int m) const {
+ int result = m;
+ if (result < 0)
+ result += 1440;
+ else if (result >= 1440)
+ result -= 1440;
+ return result;
+}
+
+/*virtual*/ void T2DateTime::Write(T2Archive& archive) {
+ unsigned short v = mYear;
+ archive << v;
+ v = mMonth;
+ archive << v;
+ v = mRawMinutes;
+ archive << v;
+ v = mSeconds;
+ archive << v;
+}
+
+int T2DateTime::IsHoliday(T2TowerDoc* doc) {
+ // TODO virt
+ return false;
+}
+
+void T2DateTime::Validate() {
+ mRawMinutes += (mSeconds / 4);
+ mSeconds = mSeconds % 4;
+
+ mMonth += (mRawMinutes / 1440);
+ mRawMinutes %= 1440;
+
+ mYear += (mMonth / 12);
+ mMonth %= 12;
+}
diff --git a/src/T2DLL/T2DateTime.h b/src/T2DLL/T2DateTime.h
new file mode 100644
index 0000000..288ef9b
--- /dev/null
+++ b/src/T2DLL/T2DateTime.h
@@ -0,0 +1,59 @@
+#pragma once
+#include "common.h"
+
+class T2DateTime {
+public:
+ T2DateTime();
+ T2DateTime(int year, int month, int hours, int minutes, int seconds);
+ T2DateTime(T2Archive& archive);
+ virtual ~T2DateTime();
+ int GetTimeZone();
+ static int IsEqualDate(T2DateTime* a, T2DateTime* b);
+ static int IsEqualDateTime(T2DateTime* a, T2DateTime* b);
+ void AddMinutes(unsigned int m);
+ int IsIncDateTime();
+ void IncDate();
+ unsigned int CalcLapseDays(unsigned int d) const;
+ unsigned int CalcLapseYears(unsigned int d) const;
+ int WithinHour(int a, int b) const;
+ int WithinMinutes(int a, int b) const;
+protected:
+ int AdjustMinutes(int m) const;
+public:
+ virtual void Write(T2Archive& archive);
+ int IsHoliday(T2TowerDoc* doc);
+ void Validate();
+
+ //T2DateTime(const T2DateTime&) {}
+ unsigned int GetYear() const { return mYear; }
+ unsigned int GetQuarter() const { return mMonth / 3 + 1; }
+ unsigned int GetSeason() const { return mMonth / 3 + 1; }
+ unsigned int GetDay() const { return mMonth % 3 + 1; }
+ unsigned int GetMonth() const { return mMonth + 1; }
+ unsigned int GetHour() const { return (mRawMinutes % 720) / 60; }
+ unsigned int Get24Hour() const { return mRawMinutes / 60; }
+ unsigned int GetMinutes() const { return mRawMinutes % 60; }
+ unsigned int GetRawMinutes() const { return mRawMinutes; }
+ int CalcTotalDays() const { return (mYear - 1) * 12 + mMonth; }
+ int IsWeekday(T2TowerDoc* doc) { return !IsHoliday(doc); }
+ int IsDay() const {
+ return (mRawMinutes >= 360 && mRawMinutes <= 1079);
+ }
+ int IsMidNight() const {
+ return mRawMinutes < 360;
+ }
+ int IsOclock24(unsigned int hour) const {
+ return (Get24Hour() == hour) && (GetMinutes() == 0) && (mSeconds == 0);
+ }
+protected:
+ unsigned int CalcTotalCount() const {
+ return mSeconds + ((mYear * 12 + mMonth) * 1440 + mRawMinutes) * 4;
+ }
+//public:
+ //T2DateTime& operator=(const T2DateTime&) {}
+
+ unsigned int mYear;
+ unsigned int mMonth;
+ unsigned int mRawMinutes;
+ unsigned int mSeconds;
+};
diff --git a/src/T2DLL/T2DayLightFilter.cpp b/src/T2DLL/T2DayLightFilter.cpp
new file mode 100644
index 0000000..696df67
--- /dev/null
+++ b/src/T2DLL/T2DayLightFilter.cpp
@@ -0,0 +1,111 @@
+#include "T2DayLightFilter.h"
+#include <MINMAX.H>
+
+T2DayLightFilter::T2DayLightFilter() {
+ mBaseCol.rgbRed = 0;
+ mBaseCol.rgbGreen = 0;
+ mBaseCol.rgbBlue = 0;
+ mTime = 0;
+}
+
+T2DayLightFilter::~T2DayLightFilter() {
+}
+
+void T2DayLightFilter::SetTime(int t1, int t2) {
+ double time;
+ double base = (sin(2.0 * (3.141592 * (t1 / 1000.0))) * 8.0) + 500.0;
+ double midpoint = 1000.0 - base;
+ double low = midpoint / 2.0;
+ double high = 1000.0 - (midpoint / 2.0);
+
+ if (t2 < low) {
+ time = -90.0 * cos((3.141592 * (t2 / (midpoint / 2.0))) / 2.0);
+ } else if (t2 < high) {
+ time = 90.0 * sin(3.141592 * ((t2 - low) / base));
+ } else {
+ time = -90.0 * sin((3.141592 * ((t2 - high) / (midpoint / 2.0))) / 2.0);
+ }
+
+ if (time < 0.0) {
+ mTime = -int(-time + 0.5);
+ } else {
+ mTime = int(time + 0.5);
+ }
+ if (mTime > 90)
+ mTime = 90;
+ if (mTime < -90)
+ mTime = -90;
+
+ while (mTime < 0)
+ mTime += 360;
+ while (mTime >= 360)
+ mTime -= 360;
+
+ CalcDayLightColor(&mBaseCol);
+}
+
+void T2DayLightFilter::RefractionColor(RGBQUAD* rgb) {
+ rgb->rgbRed = (mBaseCol.rgbRed * rgb->rgbRed) / 255;
+ rgb->rgbGreen = (mBaseCol.rgbGreen * rgb->rgbGreen) / 255;
+ rgb->rgbBlue = (mBaseCol.rgbBlue * rgb->rgbBlue) / 255;
+}
+
+void T2DayLightFilter::CalcDayLightColor(RGBQUAD* rgb) {
+ double base = (0.5 * sin((3.141592 * mTime) / 180.0)) + 0.5;
+ if (base < 0.0)
+ base = 0.0;
+
+ double outR = base;
+ double outG = base;
+ double outB = base;
+
+ double tint1 = 1.1 * sin((3.141592 * mTime) / 180.0);
+ if (tint1 > 1.0)
+ tint1 = 1.0;
+ else if (tint1 < 0.1)
+ tint1 = 0.1;
+
+ outG *= 1.0 - (0.8 * (1.0 - tint1));
+ outB *= tint1;
+
+ outR += 0.4;
+ outG += 0.4;
+ outB += 0.4;
+
+ double tint2 = 0.2 + (outR * 0.35) + (outG * 0.45) + (outB * 0.2);
+ if (tint2 > 1.0)
+ tint2 = 1.0;
+
+ outR *= tint2;
+ outG *= 1.0 - (0.7 * (1.0 - tint2));
+
+ outR = min(max(outR, 0.0), 1.0);
+ outG = min(max(outG, 0.0), 1.0);
+ outB = min(max(outB, 0.0), 1.0);
+
+ rgb->rgbRed = outR * 255.0;
+ rgb->rgbGreen = outG * 255.0;
+ rgb->rgbBlue = outB * 255.0;
+}
+
+void T2DayLightFilter::SkyColor(RGBQUAD* rgb) {
+ double inR = mBaseCol.rgbRed / 255.0;
+ double inG = mBaseCol.rgbGreen / 255.0;
+ double inB = mBaseCol.rgbBlue / 255.0;
+
+ double outR = inR;
+ double outG = inG;
+ double outB = inB;
+
+ outR *= (rgb->rgbRed / 255.0);
+ outG *= (rgb->rgbGreen / 255.0);
+ outB *= (rgb->rgbBlue / 255.0);
+
+ outR = (outR * 0.45) + (inR * 0.55);
+ outG = (outG * 0.6) + (inG * 0.4);
+ outB = (outB * 0.6) + (inB * 0.4);
+
+ rgb->rgbRed = 255.0 * outR;
+ rgb->rgbGreen = 255.0 * outG;
+ rgb->rgbBlue = 255.0 * outB;
+}
diff --git a/src/T2DLL/T2DayLightFilter.h b/src/T2DLL/T2DayLightFilter.h
new file mode 100644
index 0000000..727bd54
--- /dev/null
+++ b/src/T2DLL/T2DayLightFilter.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2DayLightFilter {
+public:
+ T2DayLightFilter();
+ ~T2DayLightFilter();
+ void SetTime(int, int);
+ void RefractionColor(RGBQUAD*);
+ void SkyColor(RGBQUAD*);
+protected:
+ void CalcDayLightColor(RGBQUAD*);
+
+ RGBQUAD mBaseCol;
+ int mTime;
+};
diff --git a/src/T2DLL/T2DayParamDef.cpp b/src/T2DLL/T2DayParamDef.cpp
new file mode 100644
index 0000000..889b0c9
--- /dev/null
+++ b/src/T2DLL/T2DayParamDef.cpp
@@ -0,0 +1,16 @@
+#include "CResFile.h"
+#include "T2DayParamDef.h"
+
+T2DayParamDef::T2DayParamDef(CResFile& resFile) {
+ float divisor = 100.0f;
+
+ for (unsigned int day = 0; day < kMaxDay; day++) {
+ for (unsigned int whether = 0; whether < kMaxWhether; whether++) {
+ resFile >> mEntries[day][whether].mPercent;
+ mEntries[day][whether].mRate = mEntries[day][whether].mPercent / divisor;
+ }
+ }
+}
+
+/*virtual*/ T2DayParamDef::~T2DayParamDef() {
+}
diff --git a/src/T2DLL/T2DayParamDef.h b/src/T2DLL/T2DayParamDef.h
new file mode 100644
index 0000000..50c7666
--- /dev/null
+++ b/src/T2DLL/T2DayParamDef.h
@@ -0,0 +1,32 @@
+#pragma once
+#include "common.h"
+
+class T2DayParamDef {
+public:
+ enum EDay {
+ Day_0,
+ Day_1,
+ kMaxDay
+ };
+ enum EWhether {
+ Whether_0,
+ Whether_1,
+ kMaxWhether
+ };
+
+ T2DayParamDef(CResFile&);
+ virtual ~T2DayParamDef();
+
+ unsigned int GetPercent(EDay day, EWhether whether) const {
+ return mEntries[day][whether].mPercent;
+ }
+ float GetRate(EDay day, EWhether whether) const {
+ return mEntries[day][whether].mRate;
+ }
+
+protected:
+ struct {
+ unsigned int mPercent;
+ float mRate;
+ } mEntries[kMaxDay][kMaxWhether];
+};
diff --git a/src/T2DLL/T2Dialog.cpp b/src/T2DLL/T2Dialog.cpp
new file mode 100644
index 0000000..c00b5d7
--- /dev/null
+++ b/src/T2DLL/T2Dialog.cpp
@@ -0,0 +1,331 @@
+#include "CTokenizer.h"
+#include "T2Dialog.h"
+#include "T2TowerDoc.h"
+#include "T2WorldDef.h"
+
+IMPLEMENT_DYNAMIC(T2Dialog, CWnd)
+
+T2Dialog::T2Dialog() {
+ mInModalLoop = false;
+ mUserCon = 0;
+ mDeleteOnClose = false;
+ mFontName = "�l�r �o�S�V�b�N";
+
+ for (int i = 0; i < 10; i++)
+ mFontNums[i] = 0;
+}
+
+/*virtual*/ T2Dialog::~T2Dialog() {
+ for (int i = 0; i < 10; i++) {
+ if (mFonts[i])
+ delete mFonts[i];
+ }
+}
+
+void T2Dialog::Realize(void* a, T2DLGTEMPLATE* tmpl, T2TowerDoc* towerDoc, T2ImageObj* imageObj, CPalette* palette, int b, CWnd* parentWnd, UINT nID, int d) {
+ mEC = a;
+ mTowerDoc = towerDoc;
+ mF4 = d;
+ mTemplate = *tmpl;
+ mImageObj = imageObj;
+
+ if (towerDoc && mTowerDoc->mWorldDef)
+ mPalette = mTowerDoc->mWorldDef->GetPalette();
+ else if (palette)
+ mPalette = palette;
+ else
+ mPalette = NULL;
+
+ if (!parentWnd)
+ parentWnd = AfxGetMainWnd();
+
+ for (int i = 0; i < 10; i++)
+ mFonts[i] = NULL;
+ mFontCount = 0;
+ mCurrentFont = -1;
+
+ RECT rect;
+ rect.left = 0;
+ rect.top = 0;
+ rect.right = 100;
+ rect.bottom = 100;
+
+ CString wndClass = AfxRegisterWndClass(
+ CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS,
+ LoadCursor(NULL, IDC_ARROW),
+ (HBRUSH) GetStockObject(WHITE_BRUSH),
+ NULL);
+
+ CreateEx(
+ b ? WS_EX_TOOLWINDOW : 0,
+ wndClass,
+ "",
+ b ? (WS_POPUP | WS_CAPTION) : WS_CHILD,
+ rect,
+ parentWnd,
+ nID
+ );
+}
+
+BEGIN_MESSAGE_MAP(T2Dialog, CWnd)
+ ON_WM_CREATE()
+ ON_WM_DESTROY()
+ ON_WM_QUERYNEWPALETTE()
+ ON_WM_ERASEBKGND()
+ ON_WM_LBUTTONDBLCLK()
+ ON_WM_LBUTTONDOWN()
+ ON_WM_LBUTTONUP()
+ ON_WM_ACTIVATEAPP()
+END_MESSAGE_MAP()
+
+int T2Dialog::OnCreate(CREATESTRUCT* cs) {
+ if (CWnd::OnCreate(cs) == -1)
+ return -1;
+
+ HRSRC rsrc = FindResource(mTemplate.moduleHandle, MAKEINTATOM(mTemplate.resID), "T2DLG");
+ if (!rsrc) {
+ MessageBox("�_�C�A���O������܂���B");
+ return 0;
+ }
+
+#line 90
+ _ASSERT(rsrc);
+
+ HGLOBAL hglobal = LoadResource(mTemplate.moduleHandle, rsrc);
+#line 92
+ _ASSERT(hglobal);
+
+ void *resData = LockResource(hglobal);
+#line 94
+ _ASSERT(resData);
+
+ DWORD resSize = SizeofResource(mTemplate.moduleHandle, rsrc);
+ char *buffer = (char *) malloc(resSize + 1);
+ memcpy(buffer, resData, resSize);
+ buffer[resSize] = 0;
+
+ DoOnCreate(buffer);
+ free(buffer);
+
+ OnT2Create();
+
+ if (mTowerDoc && !(GetWindowLong(m_hWnd, GWL_STYLE) & WS_CHILD)) {
+ if (mModal != 0)
+ mTowerDoc->towerDoc_vf1A0(1);
+ if (mModal == 1)
+ mTowerDoc->towerDoc_vf290(1);
+ }
+
+ if (mF4 && !(cs->style & WS_CHILD))
+ ShowWindow(SW_SHOW);
+
+ return 0;
+}
+
+T2Dialog::T2DialogDef::T2DialogDef()
+ : width(100)
+ , height(100)
+ , modal(1)
+ , title(NULL)
+ , center(true)
+ , flags(0x50000000) // is this a style?
+{
+}
+
+/*virtual*/ T2Dialog::T2DialogDef::~T2DialogDef() {
+}
+
+/*virtual*/ void T2Dialog::AfterBurner(T2DialogDef& def) {
+ mModal = def.modal;
+ SetWindowText(def.title);
+
+ CRect windowRect, clientRect, desktopRect;
+ GetWindowRect(windowRect);
+ GetClientRect(clientRect);
+ GetDesktopWindow()->GetClientRect(desktopRect);
+
+ def.width += (windowRect.Width() - clientRect.Width());
+ def.height += (windowRect.Height() - clientRect.Height());
+
+ int cx = def.center ? (mTemplate.pt.x - def.width / 2) : mTemplate.pt.x;
+ if (cx < desktopRect.left)
+ cx = desktopRect.left;
+ if (cx + def.width >= desktopRect.right)
+ cx = desktopRect.right - def.width;
+
+ int cy = def.center ? (mTemplate.pt.y - def.height / 2) : mTemplate.pt.y;
+ if (cy < desktopRect.top)
+ cy = desktopRect.top;
+ if (cy + def.height >= desktopRect.bottom)
+ cy = desktopRect.bottom - def.height;
+
+ SetWindowPos(NULL, cx, cy, def.width, def.height, SWP_NOZORDER);
+}
+
+/*virtual*/ void T2Dialog::DoOnCreate(char* data) {
+ T2DialogDef def;
+ CreateDlgItemLoop(def, data);
+ AfterBurner(def);
+}
+
+void T2Dialog::CreateDlgItemLoop(T2DialogDef& def, char* data) {
+ CTokenizer tokenizer(data);
+
+ while (tokenizer.NextWord()) {
+ if (tokenizer.Current()[0] == '#')
+ tokenizer.NextString("\r\n");
+ else
+ CreateDlgItem(tokenizer, def);
+ }
+}
+
+/*virtual*/ void T2Dialog::CreateDlgItem(CTokenizer& tokenizer, T2DialogDef& def) {
+ // TODO: this requires like 500 other classes lmfao
+}
+
+void T2Dialog::OnDestroy() {
+ OnT2Destroy();
+ CWnd::OnDestroy();
+
+ if (mTowerDoc && !(GetWindowLong(m_hWnd, GWL_STYLE) & WS_CHILD)) {
+ if (mModal != 0)
+ mTowerDoc->towerDoc_vf1A0(0);
+ if (mModal == 1)
+ mTowerDoc->towerDoc_vf290(0);
+ }
+}
+
+int T2Dialog::OnQueryNewPalette() {
+ return CWnd::OnQueryNewPalette();
+}
+
+int T2Dialog::OnEraseBkgnd(CDC* dc) {
+ int result = true;
+
+ if (!OnT2PreEraseBkgnd(dc)) {
+ int savedDC = dc->SaveDC();
+
+ dc->SelectPalette(mPalette, false);
+ dc->RealizePalette();
+
+ CBrush brush;
+ brush.CreateStockObject(LTGRAY_BRUSH);
+
+ CRect rect1;
+ GetClientRect(rect1);
+ dc->FillRect(rect1, &brush);
+
+ CPen pen1;
+ pen1.CreatePen(PS_SOLID, 0, PALETTERGB(255, 255, 255));
+
+ CPen pen2;
+ pen2.CreateStockObject(GRAY_BRUSH); // wait... that's not a pen
+
+ CRect rect2;
+ GetClientRect(rect2);
+
+ dc->SelectObject(pen1);
+ dc->MoveTo(rect2.right - 1, rect2.top);
+ dc->LineTo(rect2.left, rect2.top);
+ dc->LineTo(rect2.left, rect2.bottom);
+
+ dc->SelectObject(pen2);
+ dc->MoveTo(rect2.right - 1, rect2.top + 1);
+ dc->LineTo(rect2.right - 1, rect2.bottom - 1);
+ dc->LineTo(rect2.left, rect2.bottom - 1);
+
+ dc->RestoreDC(savedDC);
+
+ result = OnT2EraseBkgnd(dc);
+ }
+
+ return result;
+}
+
+/*virtual*/ int T2Dialog::OnCommand(UINT cmd, long data) {
+ int result = true;
+
+ WORD hi = HIWORD(cmd);
+ WORD lo = LOWORD(cmd);
+
+ if ((lo == 1 || lo == 2) && (hi == 0)) {
+ if (lo == 1)
+ OnT2OK();
+ else
+ OnT2Cancel();
+ DoClose(lo);
+ } else {
+ result = OnT2DialogCommand(cmd, data);
+ }
+
+ return result;
+}
+
+int T2Dialog::DoModal() {
+ mInModalLoop = true;
+ int result = RunModalLoop(MLF_NOIDLEMSG);
+ if (mInModalLoop)
+ DestroyWindow();
+ return result;
+}
+
+void T2Dialog::DoClose(int nResult) {
+ if (mInModalLoop)
+ EndModalLoop(nResult);
+ else
+ DestroyWindow();
+}
+
+/*virtual*/ int T2Dialog::PreTranslateMessage(MSG* msg) {
+ return CWnd::PreTranslateMessage(msg);
+}
+
+/*virtual*/ int T2Dialog::PreCreateWindow(CREATESTRUCT&) {
+ return 1;
+}
+
+void T2Dialog::MakeRadioGroup(int, int, int) {
+ // TODO - depends on vfCC of something
+}
+
+void T2Dialog::MakeTabPanel(int baseID1, int baseID2, int count, int currentIndex) {
+ for (unsigned short i = 1; i <= count; i++) {
+ unsigned short id2 = baseID2 + i;
+ unsigned short id1 = baseID1 + i;
+ GetDlgItem(id2)->EnableWindow(i != currentIndex);
+ if (baseID1 != 0)
+ GetDlgItem(id1)->ShowWindow((i != currentIndex) ? SW_HIDE : SW_SHOW);
+ }
+}
+
+void T2Dialog::OnLButtonDblClk(UINT nFlags, CPoint pt) {
+ OnT2DlgLButtonDblClk(nFlags, pt);
+}
+
+void T2Dialog::OnLButtonDown(UINT nFlags, CPoint pt) {
+ OnT2DlgLButtonDown(nFlags, pt);
+}
+
+void T2Dialog::OnLButtonUp(UINT nFlags, CPoint pt) {
+ OnT2DlgLButtonUp(nFlags, pt);
+}
+
+/*virtual*/ void T2Dialog::PostNcDestroy() {
+ if (mDeleteOnClose)
+ delete this;
+ else
+ CWnd::PostNcDestroy();
+}
+
+HFONT T2Dialog::GetFont() {
+ HFONT font = NULL;
+
+ if (mCurrentFont >= 0)
+ font = *mFonts[mCurrentFont];
+
+ return font;
+}
+
+void T2Dialog::OnActivateApp(BOOL bActive, HTASK hTask) {
+ CWnd::OnActivateApp(bActive, hTask);
+}
diff --git a/src/T2DLL/T2Dialog.h b/src/T2DLL/T2Dialog.h
new file mode 100644
index 0000000..48a35da
--- /dev/null
+++ b/src/T2DLL/T2Dialog.h
@@ -0,0 +1,91 @@
+#pragma once
+#include "common.h"
+#include "LListener.h"
+
+struct T2DLGTEMPLATE {
+ POINT pt;
+ HINSTANCE moduleHandle;
+ int resID;
+};
+
+class T2Dialog : public CWnd, public LListener {
+ DECLARE_DYNAMIC(T2Dialog)
+ DECLARE_MESSAGE_MAP()
+
+public:
+ T2Dialog();
+ virtual ~T2Dialog();
+ void Realize(void*, T2DLGTEMPLATE*, T2TowerDoc*, T2ImageObj*, CPalette*, int, CWnd* parentWnd, UINT nID, int);
+
+ int DoModal();
+ void DoClose(int nResult);
+ virtual int PreTranslateMessage(MSG*);
+ void MakeRadioGroup(int, int, int);
+ void MakeTabPanel(int, int, int, int);
+ HFONT GetFont();
+
+ T2TowerDoc* GetDocument() const { return mTowerDoc; }
+ T2DlgItem* GetT2DlgItem(int id) const {
+ return (T2DlgItem *) GetDlgItem(id);
+ }
+ void SetUserCon(long uc) { mUserCon = uc; }
+ long GetUserCon() { return mUserCon; }
+
+ class T2DialogDef {
+ public:
+ T2DialogDef();
+ virtual ~T2DialogDef();
+
+ int width;
+ int height;
+ int modal;
+ char *title;
+ int _14;
+ int center;
+ int flags;
+ };
+
+protected:
+ int OnCreate(CREATESTRUCT*);
+ void OnLButtonDblClk(UINT nFlags, CPoint pt);
+ void OnLButtonDown(UINT nFlags, CPoint pt);
+ void OnLButtonUp(UINT nFlags, CPoint pt);
+ void OnActivateApp(BOOL bActive, HTASK hTask);
+ void OnDestroy();
+ int OnQueryNewPalette();
+ int OnEraseBkgnd(CDC*);
+
+ virtual int PreCreateWindow(CREATESTRUCT&);
+ virtual int OnCommand(UINT cmd, long data);
+ virtual void PostNcDestroy();
+ virtual void AfterBurner(T2DialogDef& def);
+ virtual void DoOnCreate(char* data);
+ void CreateDlgItemLoop(T2DialogDef& def, char* data);
+ virtual void CreateDlgItem(CTokenizer& tokenizer, T2DialogDef& def);
+ virtual int OnT2DialogCommand(UINT cmd, long data) { return 1; }
+ virtual int OnT2EraseBkgnd(CDC* dc) { return 1; }
+ virtual int OnT2PreEraseBkgnd(CDC* dc) { return 0; }
+ virtual void OnT2Create() {}
+ virtual void OnT2Destroy() {}
+ virtual void OnT2DlgLButtonDown(UINT nFlags, CPoint pt) {}
+ virtual void OnT2DlgLButtonUp(UINT nFlags, CPoint pt) {}
+ virtual void OnT2DlgLButtonDblClk(UINT nFlags, CPoint pt) {}
+ virtual void OnT2OK() {}
+ virtual void OnT2Cancel() {}
+
+ int mDeleteOnClose;
+ T2DLGTEMPLATE mTemplate;
+ long mUserCon;
+ T2TowerDoc *mTowerDoc;
+ T2ImageObj *mImageObj;
+ CPalette *mPalette;
+ int mModal;
+ int mInModalLoop;
+ CFont *mFonts[10];
+ int mFontNums[10];
+ int mFontCount;
+ int mCurrentFont;
+ void *mEC;
+ CString mFontName;
+ int mF4;
+};
diff --git a/src/T2DLL/T2DlgItem.cpp b/src/T2DLL/T2DlgItem.cpp
new file mode 100644
index 0000000..f7b7b7e
--- /dev/null
+++ b/src/T2DLL/T2DlgItem.cpp
@@ -0,0 +1,200 @@
+#include "T2DlgItem.h"
+
+T2DlgItem::T2DlgItem() {
+}
+
+T2DlgItem::T2DlgItem(T2TowerDoc* towerDoc, T2ImageObj* imageObj, CPalette* palette) {
+ mTowerDoc = towerDoc;
+ mImageObj = imageObj;
+ mPalette = palette;
+ mPattern = 0;
+ m74 = 0;
+ mFont = NULL;
+ mValue = 0;
+}
+
+/*virtual*/ T2DlgItem::~T2DlgItem() {
+}
+
+BEGIN_MESSAGE_MAP(T2DlgItem, CWnd)
+ ON_WM_ERASEBKGND()
+ ON_WM_LBUTTONDOWN()
+ ON_WM_LBUTTONUP()
+ ON_WM_RBUTTONDOWN()
+ ON_WM_RBUTTONUP()
+ ON_WM_MOUSEMOVE()
+ ON_WM_ENABLE()
+ ON_WM_CREATE()
+ ON_WM_SIZE()
+ ON_WM_SETFOCUS()
+ ON_WM_KILLFOCUS()
+ ON_WM_TIMER()
+ ON_WM_CLOSE()
+END_MESSAGE_MAP()
+
+/*virtual*/ BOOL T2DlgItem::Create(const char* windowName, DWORD style, const RECT& rect, CWnd* parentWnd, UINT nId) {
+ CRect crect = rect;
+ CString className = AfxRegisterWndClass(
+ WS_EX_CLIENTEDGE,
+ LoadCursor(NULL, IDC_ARROW),
+ (HBRUSH) GetStockObject(WHITE_BRUSH),
+ NULL);
+ return CWnd::Create(className, windowName, style, crect, parentWnd, nId);
+}
+
+/*virtual*/ T2BitImage* T2DlgItem::GetObjectImage(RECT&, const char*, int, int, int, int) const {
+ // TODO T2ImageObj, T2TowerDoc, T2WorldDef
+ return 0;
+}
+
+/*virtual*/ void T2DlgItem::PostNcDestroy() {
+ DestroySelf();
+}
+
+/*virtual*/ void T2DlgItem::DestroySelf() {
+ delete this;
+}
+
+/*virtual*/ int T2DlgItem::OnT2DlgItemEraseBkgnd(CDC*) {
+ return false;
+}
+
+/*virtual*/ void T2DlgItem::OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt) {
+}
+
+/*virtual*/ void T2DlgItem::OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt) {
+}
+
+/*virtual*/ void T2DlgItem::OnT2DlgItemRButtonDown(UINT nFlags, CPoint pt) {
+}
+
+/*virtual*/ void T2DlgItem::OnT2DlgItemRButtonUp(UINT nFlags, CPoint pt) {
+}
+
+/*virtual*/ void T2DlgItem::OnT2DlgItemMouseMove(UINT nFlags, CPoint pt) {
+}
+
+/*virtual*/ void T2DlgItem::OnT2DlgItemEnable(int) {
+ Invalidate();
+}
+
+/*virtual*/ int T2DlgItem::OnT2DlgItemCreate(CREATESTRUCT*) {
+ return false;
+}
+
+int T2DlgItem::OnEraseBkgnd(CDC* dc) {
+ return OnT2DlgItemEraseBkgnd(dc);
+}
+
+void T2DlgItem::OnLButtonDown(UINT nFlags, CPoint pt) {
+ OnT2DlgItemLButtonDown(nFlags, pt);
+}
+
+void T2DlgItem::OnLButtonUp(UINT nFlags, CPoint pt) {
+ OnT2DlgItemLButtonUp(nFlags, pt);
+}
+
+void T2DlgItem::OnRButtonDown(UINT nFlags, CPoint pt) {
+ OnT2DlgItemRButtonDown(nFlags, pt);
+}
+
+void T2DlgItem::OnRButtonUp(UINT nFlags, CPoint pt) {
+ OnT2DlgItemRButtonUp(nFlags, pt);
+}
+
+void T2DlgItem::OnMouseMove(UINT nFlags, CPoint pt) {
+ OnT2DlgItemMouseMove(nFlags, pt);
+}
+
+void T2DlgItem::OnEnable(int v) {
+ CWnd::OnEnable(v);
+ OnT2DlgItemEnable(v);
+}
+
+int T2DlgItem::OnCreate(CREATESTRUCT* cs) {
+ if (CWnd::OnCreate(cs) == -1)
+ return -1;
+ return OnT2DlgItemCreate(cs);
+}
+
+/*virtual*/ void T2DlgItem::CreateSubItem(void*) {
+}
+
+/*virtual*/ void T2DlgItem::SetFont(HFONT font) {
+ mFont = font;
+ Invalidate();
+}
+
+/*virtual*/ int T2DlgItem::GetValue() {
+ return mValue;
+}
+
+/*virtual*/ void T2DlgItem::SetValue(int value) {
+ mValue = value;
+ Invalidate();
+}
+
+/*virtual*/ void T2DlgItem::GetDescriptor(CString& outStr) const {
+ GetWindowText(outStr);
+}
+
+/*virtual*/ void T2DlgItem::SetDescriptor(const CString& str) {
+ SetWindowText(str);
+}
+
+void T2DlgItem::Notify(unsigned short msg, void* data) {
+ Notify(GetDlgCtrlID(), msg, data);
+}
+
+void T2DlgItem::Notify(unsigned short id, unsigned short msg, void* data) {
+ BroadcastMessage(id, data);
+ GetParent()->SendMessage(WM_COMMAND, id | (msg << 16), (LPARAM) m_hWnd);
+}
+
+int T2DlgItem::GetPattern() const {
+ return IsWindowEnabled() ? mPattern : 200;
+}
+
+void T2DlgItem::SetPattern(int pattern) {
+ mPattern = pattern;
+}
+
+void T2DlgItem::OnSize(UINT nType, int cx, int cy) {
+ CWnd::OnSize(nType, cx, cy);
+ OnT2Size(nType, cx, cy);
+}
+
+/*virtual*/ void T2DlgItem::OnT2Size(UINT nType, int cx, int cy) {
+}
+
+void T2DlgItem::OnSetFocus(CWnd* wnd) {
+ CWnd::OnSetFocus(wnd);
+ OnT2SetFocus(wnd);
+}
+
+void T2DlgItem::OnKillFocus(CWnd* wnd) {
+ CWnd::OnKillFocus(wnd);
+ OnT2KillFocus(wnd);
+}
+
+/*virtual*/ void T2DlgItem::OnT2SetFocus(CWnd* wnd) {
+}
+
+/*virtual*/ void T2DlgItem::OnT2KillFocus(CWnd* wnd) {
+}
+
+void T2DlgItem::OnTimer(UINT id) {
+ OnT2Timer(id);
+ CWnd::OnTimer(id);
+}
+
+/*virtual*/ void T2DlgItem::OnT2Timer(UINT id) {
+}
+
+void T2DlgItem::OnClose() {
+ OnT2Close();
+ CWnd::OnClose();
+}
+
+/*virtual*/ void T2DlgItem::OnT2Close() {
+}
diff --git a/src/T2DLL/T2DlgItem.h b/src/T2DLL/T2DlgItem.h
new file mode 100644
index 0000000..ee0ffdf
--- /dev/null
+++ b/src/T2DLL/T2DlgItem.h
@@ -0,0 +1,67 @@
+#pragma once
+#include "common.h"
+#include "LBroadcaster.h"
+
+class T2DlgItem : public CWnd, private LBroadcaster {
+protected:
+ T2DlgItem();
+public:
+ T2DlgItem(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItem();
+public:
+ virtual BOOL Create(const char* windowName, DWORD style, const RECT& rect, CWnd* parentWnd, UINT nId);
+ virtual void SetFont(HFONT font);
+ virtual void CreateSubItem(void*);
+ virtual void SetValue(int value);
+ virtual int GetValue();
+ virtual void GetDescriptor(CString& outStr) const;
+ virtual void SetDescriptor(const CString& str);
+protected:
+ virtual void PostNcDestroy();
+ virtual void DestroySelf();
+ virtual T2BitImage* GetObjectImage(RECT&, const char*, int, int, int, int) const;
+
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemRButtonDown(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemRButtonUp(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemMouseMove(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemEnable(int);
+ virtual int OnT2DlgItemCreate(CREATESTRUCT*);
+ virtual void OnT2Size(UINT nType, int cx, int cy);
+ virtual void OnT2SetFocus(CWnd* wnd);
+ virtual void OnT2KillFocus(CWnd* wnd);
+ virtual void OnT2Timer(UINT id);
+ virtual void OnT2Close();
+
+ int OnEraseBkgnd(CDC*);
+ void OnLButtonDown(UINT nFlags, CPoint pt);
+ void OnLButtonUp(UINT nFlags, CPoint pt);
+ void OnRButtonDown(UINT nFlags, CPoint pt);
+ void OnRButtonUp(UINT nFlags, CPoint pt);
+ void OnMouseMove(UINT nFlags, CPoint pt);
+ void OnEnable(int);
+ int OnCreate(CREATESTRUCT*);
+ void Notify(unsigned short, void*);
+ void Notify(unsigned short, unsigned short, void*);
+ int GetPattern() const;
+ void SetPattern(int pattern);
+ void OnSize(UINT nType, int cx, int cy);
+ void OnSetFocus(CWnd* wnd);
+ void OnKillFocus(CWnd* wnd);
+ void OnTimer(UINT id);
+ void OnClose();
+
+ DECLARE_MESSAGE_MAP()
+
+protected:
+ T2TowerDoc *mTowerDoc;
+ T2ImageObj *mImageObj;
+ CPalette *mPalette;
+ int m74;
+ HFONT mFont;
+ int m7C;
+ int mValue;
+ int mPattern;
+};
diff --git a/src/T2DLL/T2DlgItemAPTable.cpp b/src/T2DLL/T2DlgItemAPTable.cpp
new file mode 100644
index 0000000..7e042f2
--- /dev/null
+++ b/src/T2DLL/T2DlgItemAPTable.cpp
@@ -0,0 +1,31 @@
+#include "T2DlgItemAPTable.h"
+
+TableCellT T2DlgItemAPTable::GetClickedCell() {
+}
+
+CPoint T2DlgItemAPTable::GetClickPoint() {
+}
+
+/*virtual*/ T2DlgItemAPTable::~T2DlgItemAPTable() {
+}
+
+T2DlgItemAPTable::T2DlgItemAPTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+T2DlgItemAPTable::T2DlgItemAPTable(int, int, int, int, int, T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ void T2DlgItemAPTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemAPTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ void T2DlgItemAPTable::HiliteCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemAPTable::UnhiliteCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemAPTable::ClickCell(const TableCellT&, const POINT&) {
+}
diff --git a/src/T2DLL/T2DlgItemAPTable.h b/src/T2DLL/T2DlgItemAPTable.h
new file mode 100644
index 0000000..3f80516
--- /dev/null
+++ b/src/T2DLL/T2DlgItemAPTable.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemAPTable {
+public:
+ TableCellT GetClickedCell();
+ CPoint GetClickPoint();
+ virtual ~T2DlgItemAPTable();
+ T2DlgItemAPTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ T2DlgItemAPTable(int, int, int, int, int, T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual void DrawCell(CDC*, const TableCellT&);
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+ virtual void HiliteCell(CDC*, const TableCellT&);
+ virtual void UnhiliteCell(CDC*, const TableCellT&);
+ virtual void ClickCell(const TableCellT&, const POINT&);
+};
diff --git a/src/T2DLL/T2DlgItemAllPurpose.cpp b/src/T2DLL/T2DlgItemAllPurpose.cpp
new file mode 100644
index 0000000..ae98b03
--- /dev/null
+++ b/src/T2DLL/T2DlgItemAllPurpose.cpp
@@ -0,0 +1,28 @@
+#include "T2DlgItemAllPurpose.h"
+
+T2DlgItemAllPurpose::T2DlgItemAllPurpose(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemAllPurpose::~T2DlgItemAllPurpose() {
+}
+
+/*virtual*/ int T2DlgItemAllPurpose::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2DlgItemAllPurpose::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemAllPurpose::OnT2DlgItemLButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemAllPurpose::OnT2DlgItemRButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemAllPurpose::OnT2DlgItemRButtonUp(unsigned int, CPoint) {
+}
+
+CPoint T2DlgItemAllPurpose::GetUpPoint() {
+}
+
+CPoint T2DlgItemAllPurpose::GetDownPoint() {
+}
diff --git a/src/T2DLL/T2DlgItemAllPurpose.h b/src/T2DLL/T2DlgItemAllPurpose.h
new file mode 100644
index 0000000..3797e11
--- /dev/null
+++ b/src/T2DLL/T2DlgItemAllPurpose.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemAllPurpose {
+public:
+ T2DlgItemAllPurpose(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemAllPurpose();
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual void OnT2DlgItemLButtonUp(unsigned int, CPoint);
+ virtual void OnT2DlgItemRButtonDown(unsigned int, CPoint);
+ virtual void OnT2DlgItemRButtonUp(unsigned int, CPoint);
+public:
+ CPoint GetUpPoint();
+ CPoint GetDownPoint();
+};
diff --git a/src/T2DLL/T2DlgItemAnimation.cpp b/src/T2DLL/T2DlgItemAnimation.cpp
new file mode 100644
index 0000000..ae5ff6b
--- /dev/null
+++ b/src/T2DLL/T2DlgItemAnimation.cpp
@@ -0,0 +1,25 @@
+#include "T2DlgItemAnimation.h"
+
+T2DlgItemAnimation::T2DlgItemAnimation(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemAnimation::~T2DlgItemAnimation() {
+}
+
+/*virtual*/ int T2DlgItemAnimation::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+void T2DlgItemAnimation::SetAnimation(HINSTANCE, int, int) {
+}
+
+void T2DlgItemAnimation::SetAnimationParam(int, int) {
+}
+
+/*virtual*/ int T2DlgItemAnimation::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+/*virtual*/ void T2DlgItemAnimation::OnT2Close() {
+}
+
+/*virtual*/ void T2DlgItemAnimation::OnT2Timer(unsigned int) {
+}
diff --git a/src/T2DLL/T2DlgItemAnimation.h b/src/T2DLL/T2DlgItemAnimation.h
new file mode 100644
index 0000000..e3ac516
--- /dev/null
+++ b/src/T2DLL/T2DlgItemAnimation.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemAnimation {
+public:
+ T2DlgItemAnimation(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemAnimation();
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+public:
+ void SetAnimation(HINSTANCE, int, int);
+ void SetAnimationParam(int, int);
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+ virtual void OnT2Close();
+ virtual void OnT2Timer(unsigned int);
+};
diff --git a/src/T2DLL/T2DlgItemBelongGage.cpp b/src/T2DLL/T2DlgItemBelongGage.cpp
new file mode 100644
index 0000000..7553062
--- /dev/null
+++ b/src/T2DLL/T2DlgItemBelongGage.cpp
@@ -0,0 +1,28 @@
+#include "T2DlgItemBelongGage.h"
+
+T2DlgItemBelongGage::T2DlgItemBelongGage(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemBelongGage::GetMinValue() {
+}
+
+/*virtual*/ int T2DlgItemBelongGage::GetMaxValue() {
+}
+
+/*virtual*/ int T2DlgItemBelongGage::GetValue() {
+}
+
+/*virtual*/ int T2DlgItemBelongGage::GetBlueValue() {
+}
+
+/*virtual*/ int T2DlgItemBelongGage::GetYellowValue() {
+}
+
+/*virtual*/ unsigned long T2DlgItemBelongGage::GetGageColor(int) {
+}
+
+void T2DlgItemBelongGage::SetTenant(T2Tenant*) {
+}
+
+/*virtual*/ int T2DlgItemBelongGage::IsDrawInterior() {
+}
diff --git a/src/T2DLL/T2DlgItemBelongGage.h b/src/T2DLL/T2DlgItemBelongGage.h
new file mode 100644
index 0000000..3080f88
--- /dev/null
+++ b/src/T2DLL/T2DlgItemBelongGage.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemBelongGage {
+public:
+ T2DlgItemBelongGage(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int GetMinValue();
+ virtual int GetMaxValue();
+ virtual int GetValue();
+ virtual int GetBlueValue();
+ virtual int GetYellowValue();
+ virtual unsigned long GetGageColor(int);
+public:
+ void SetTenant(T2Tenant*);
+protected:
+ virtual int IsDrawInterior();
+
+public:
+ virtual ~T2DlgItemBelongGage() {}
+};
diff --git a/src/T2DLL/T2DlgItemBox.cpp b/src/T2DLL/T2DlgItemBox.cpp
new file mode 100644
index 0000000..f1dfe3b
--- /dev/null
+++ b/src/T2DLL/T2DlgItemBox.cpp
@@ -0,0 +1,7 @@
+#include "T2DlgItemBox.h"
+
+T2DlgItemBox::T2DlgItemBox(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemBox::OnT2DlgItemEraseBkgnd(CDC*) {
+}
diff --git a/src/T2DLL/T2DlgItemBox.h b/src/T2DLL/T2DlgItemBox.h
new file mode 100644
index 0000000..f240321
--- /dev/null
+++ b/src/T2DLL/T2DlgItemBox.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemBox {
+public:
+ T2DlgItemBox(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+
+public:
+ virtual ~T2DlgItemBox() {}
+};
diff --git a/src/T2DLL/T2DlgItemButtonBase.cpp b/src/T2DLL/T2DlgItemButtonBase.cpp
new file mode 100644
index 0000000..24fd54c
--- /dev/null
+++ b/src/T2DLL/T2DlgItemButtonBase.cpp
@@ -0,0 +1,16 @@
+#include "T2DlgItemButtonBase.h"
+
+T2DlgItemButtonBase::T2DlgItemButtonBase(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ void T2DlgItemButtonBase::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemButtonBase::OnT2DlgItemLButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemButtonBase::OnT2DlgItemMouseMove(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemButtonBase::DrawButtonBase(CDC*, const RECT&, int) {
+}
diff --git a/src/T2DLL/T2DlgItemButtonBase.h b/src/T2DLL/T2DlgItemButtonBase.h
new file mode 100644
index 0000000..cba8156
--- /dev/null
+++ b/src/T2DLL/T2DlgItemButtonBase.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemButtonBase {
+public:
+ T2DlgItemButtonBase(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual void OnT2DlgItemLButtonUp(unsigned int, CPoint);
+ virtual void OnT2DlgItemMouseMove(unsigned int, CPoint);
+ virtual void DrawButtonBase(CDC*, const RECT&, int);
+
+public:
+ virtual ~T2DlgItemButtonBase() {}
+};
diff --git a/src/T2DLL/T2DlgItemCANCEL.cpp b/src/T2DLL/T2DlgItemCANCEL.cpp
new file mode 100644
index 0000000..4c5d193
--- /dev/null
+++ b/src/T2DLL/T2DlgItemCANCEL.cpp
@@ -0,0 +1,7 @@
+#include "T2DlgItemCANCEL.h"
+
+T2DlgItemCANCEL::T2DlgItemCANCEL(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemCANCEL::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
diff --git a/src/T2DLL/T2DlgItemCANCEL.h b/src/T2DLL/T2DlgItemCANCEL.h
new file mode 100644
index 0000000..a4c4489
--- /dev/null
+++ b/src/T2DLL/T2DlgItemCANCEL.h
@@ -0,0 +1,10 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemCANCEL {
+public:
+ T2DlgItemCANCEL(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+
+ virtual ~T2DlgItemCANCEL() {}
+};
diff --git a/src/T2DLL/T2DlgItemCheck.cpp b/src/T2DLL/T2DlgItemCheck.cpp
new file mode 100644
index 0000000..a84b9a6
--- /dev/null
+++ b/src/T2DLL/T2DlgItemCheck.cpp
@@ -0,0 +1,7 @@
+#include "T2DlgItemCheck.h"
+
+T2DlgItemCheck::T2DlgItemCheck(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemCheck::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
diff --git a/src/T2DLL/T2DlgItemCheck.h b/src/T2DLL/T2DlgItemCheck.h
new file mode 100644
index 0000000..856b77b
--- /dev/null
+++ b/src/T2DLL/T2DlgItemCheck.h
@@ -0,0 +1,10 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemCheck {
+public:
+ T2DlgItemCheck(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+
+ virtual ~T2DlgItemCheck() {}
+};
diff --git a/src/T2DLL/T2DlgItemCustomerGage.cpp b/src/T2DLL/T2DlgItemCustomerGage.cpp
new file mode 100644
index 0000000..42cd0a7
--- /dev/null
+++ b/src/T2DLL/T2DlgItemCustomerGage.cpp
@@ -0,0 +1,28 @@
+#include "T2DlgItemCustomerGage.h"
+
+T2DlgItemCustomerGage::T2DlgItemCustomerGage(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemCustomerGage::GetMinValue() {
+}
+
+/*virtual*/ int T2DlgItemCustomerGage::GetMaxValue() {
+}
+
+/*virtual*/ int T2DlgItemCustomerGage::GetValue() {
+}
+
+/*virtual*/ int T2DlgItemCustomerGage::GetBlueValue() {
+}
+
+/*virtual*/ int T2DlgItemCustomerGage::GetYellowValue() {
+}
+
+/*virtual*/ unsigned long T2DlgItemCustomerGage::GetGageColor(int) {
+}
+
+void T2DlgItemCustomerGage::SetTenant(T2Tenant*) {
+}
+
+/*virtual*/ int T2DlgItemCustomerGage::IsDrawInterior() {
+}
diff --git a/src/T2DLL/T2DlgItemCustomerGage.h b/src/T2DLL/T2DlgItemCustomerGage.h
new file mode 100644
index 0000000..2cb8780
--- /dev/null
+++ b/src/T2DLL/T2DlgItemCustomerGage.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemCustomerGage {
+public:
+ T2DlgItemCustomerGage(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int GetMinValue();
+ virtual int GetMaxValue();
+ virtual int GetValue();
+ virtual int GetBlueValue();
+ virtual int GetYellowValue();
+ virtual unsigned long GetGageColor(int);
+public:
+ void SetTenant(T2Tenant*);
+protected:
+ virtual int IsDrawInterior();
+
+public:
+ virtual ~T2DlgItemCustomerGage() {}
+};
diff --git a/src/T2DLL/T2DlgItemEdit.cpp b/src/T2DLL/T2DlgItemEdit.cpp
new file mode 100644
index 0000000..f906c49
--- /dev/null
+++ b/src/T2DLL/T2DlgItemEdit.cpp
@@ -0,0 +1,40 @@
+#include "T2DlgItemEdit.h"
+
+T2DlgItemEdit::T2DlgItemEdit(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemEdit::~T2DlgItemEdit() {
+}
+
+/*virtual*/ void T2DlgItemEdit::SetFont(HFONT) {
+}
+
+/*virtual*/ void T2DlgItemEdit::CreateSubItem(void*) {
+}
+
+/*virtual*/ int T2DlgItemEdit::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2DlgItemEdit::GetDescriptor(CString&) const {
+}
+
+/*virtual*/ void T2DlgItemEdit::SetDescriptor(const CString&) {
+}
+
+/*virtual*/ int T2DlgItemEdit::GetValue() {
+}
+
+/*virtual*/ void T2DlgItemEdit::SetValue(int) {
+}
+
+void T2DlgItemEdit::SelectAll() {
+}
+
+/*virtual*/ void T2DlgItemEdit::OnT2SetFocus(CWnd*) {
+}
+
+/*virtual*/ void T2DlgItemEdit::OnT2KillFocus(CWnd*) {
+}
+
+/*virtual*/ void T2DlgItemEdit::OnT2DlgItemEnable(int) {
+}
diff --git a/src/T2DLL/T2DlgItemEdit.h b/src/T2DLL/T2DlgItemEdit.h
new file mode 100644
index 0000000..5553e6e
--- /dev/null
+++ b/src/T2DLL/T2DlgItemEdit.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemEdit {
+public:
+ T2DlgItemEdit(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemEdit();
+ virtual void SetFont(HFONT);
+ virtual void CreateSubItem(void*);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+public:
+ virtual void GetDescriptor(CString&) const;
+ virtual void SetDescriptor(const CString&);
+ virtual int GetValue();
+ virtual void SetValue(int);
+ void SelectAll();
+ virtual void OnT2SetFocus(CWnd*);
+ virtual void OnT2KillFocus(CWnd*);
+ virtual void OnT2DlgItemEnable(int);
+};
diff --git a/src/T2DLL/T2DlgItemGageBase.cpp b/src/T2DLL/T2DlgItemGageBase.cpp
new file mode 100644
index 0000000..4ef48e2
--- /dev/null
+++ b/src/T2DLL/T2DlgItemGageBase.cpp
@@ -0,0 +1,19 @@
+#include "T2DlgItemGageBase.h"
+
+T2DlgItemGageBase::T2DlgItemGageBase(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemGageBase::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2DlgItemGageBase::DrawInterior(CDC*, const CRect&) {
+}
+
+void T2DlgItemGageBase::DrawBorderLines(CDC*, const CRect&) {
+}
+
+void T2DlgItemGageBase::DrawValueByText(CDC*, const CRect&) {
+}
+
+int T2DlgItemGageBase::CalcPos(const CRect&, int, int, int) {
+}
diff --git a/src/T2DLL/T2DlgItemGageBase.h b/src/T2DLL/T2DlgItemGageBase.h
new file mode 100644
index 0000000..f1e18d8
--- /dev/null
+++ b/src/T2DLL/T2DlgItemGageBase.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemGageBase {
+public:
+ T2DlgItemGageBase(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void DrawInterior(CDC*, const CRect&);
+ void DrawBorderLines(CDC*, const CRect&);
+ void DrawValueByText(CDC*, const CRect&);
+ int CalcPos(const CRect&, int, int, int);
+
+public:
+ virtual ~T2DlgItemGageBase() {}
+};
diff --git a/src/T2DLL/T2DlgItemHScr.cpp b/src/T2DLL/T2DlgItemHScr.cpp
new file mode 100644
index 0000000..e282124
--- /dev/null
+++ b/src/T2DLL/T2DlgItemHScr.cpp
@@ -0,0 +1,22 @@
+#include "T2DlgItemHScr.h"
+
+T2DlgItemHScr::T2DlgItemHScr(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemHScr::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ int T2DlgItemHScr::ScrollBarHittest(CPoint) const {
+}
+
+/*virtual*/ void T2DlgItemHScr::GetUpButtonRect(const CRect&, CRect&) const {
+}
+
+/*virtual*/ void T2DlgItemHScr::GetDnButtonRect(const CRect&, CRect&) const {
+}
+
+/*virtual*/ int T2DlgItemHScr::PositionToValue(const CPoint&) const {
+}
+
+/*virtual*/ int T2DlgItemHScr::PositionToValue(const CRect&) const {
+}
diff --git a/src/T2DLL/T2DlgItemHScr.h b/src/T2DLL/T2DlgItemHScr.h
new file mode 100644
index 0000000..010cf80
--- /dev/null
+++ b/src/T2DLL/T2DlgItemHScr.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemHScr {
+public:
+ T2DlgItemHScr(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual int ScrollBarHittest(CPoint) const;
+ virtual void GetUpButtonRect(const CRect&, CRect&) const;
+ virtual void GetDnButtonRect(const CRect&, CRect&) const;
+ virtual int PositionToValue(const CPoint&) const;
+ virtual int PositionToValue(const CRect&) const;
+
+public:
+ virtual ~T2DlgItemHScr() {}
+};
diff --git a/src/T2DLL/T2DlgItemIButton.cpp b/src/T2DLL/T2DlgItemIButton.cpp
new file mode 100644
index 0000000..e3bd91f
--- /dev/null
+++ b/src/T2DLL/T2DlgItemIButton.cpp
@@ -0,0 +1,7 @@
+#include "T2DlgItemIButton.h"
+
+T2DlgItemIButton::T2DlgItemIButton(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemIButton::OnT2DlgItemEraseBkgnd(CDC*) {
+}
diff --git a/src/T2DLL/T2DlgItemIButton.h b/src/T2DLL/T2DlgItemIButton.h
new file mode 100644
index 0000000..6529e0b
--- /dev/null
+++ b/src/T2DLL/T2DlgItemIButton.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemIButton {
+public:
+ T2DlgItemIButton(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+
+public:
+ virtual ~T2DlgItemIButton() {}
+};
diff --git a/src/T2DLL/T2DlgItemICheck.cpp b/src/T2DLL/T2DlgItemICheck.cpp
new file mode 100644
index 0000000..b138e73
--- /dev/null
+++ b/src/T2DLL/T2DlgItemICheck.cpp
@@ -0,0 +1,22 @@
+#include "T2DlgItemICheck.h"
+
+T2DlgItemICheck::T2DlgItemICheck(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemICheck::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
+
+/*virtual*/ void T2DlgItemICheck::SetValue(int) {
+}
+
+/*virtual*/ int T2DlgItemICheck::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2DlgItemICheck::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemICheck::OnT2DlgItemLButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemICheck::OnT2DlgItemMouseMove(unsigned int, CPoint) {
+}
diff --git a/src/T2DLL/T2DlgItemICheck.h b/src/T2DLL/T2DlgItemICheck.h
new file mode 100644
index 0000000..9c29d3a
--- /dev/null
+++ b/src/T2DLL/T2DlgItemICheck.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemICheck {
+public:
+ T2DlgItemICheck(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+ virtual void SetValue(int);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual void OnT2DlgItemLButtonUp(unsigned int, CPoint);
+ virtual void OnT2DlgItemMouseMove(unsigned int, CPoint);
+
+public:
+ virtual ~T2DlgItemICheck() {}
+};
diff --git a/src/T2DLL/T2DlgItemImage.cpp b/src/T2DLL/T2DlgItemImage.cpp
new file mode 100644
index 0000000..499e1dd
--- /dev/null
+++ b/src/T2DLL/T2DlgItemImage.cpp
@@ -0,0 +1,16 @@
+#include "T2DlgItemImage.h"
+
+T2DlgItemImage::T2DlgItemImage(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemImage::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
+
+/*virtual*/ int T2DlgItemImage::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+void T2DlgItemImage::AdjustSize() {
+}
+
+T2BitImage* T2DlgItemImage::GetDrawImage(CRect&) const {
+}
diff --git a/src/T2DLL/T2DlgItemImage.h b/src/T2DLL/T2DlgItemImage.h
new file mode 100644
index 0000000..96f16c9
--- /dev/null
+++ b/src/T2DLL/T2DlgItemImage.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemImage {
+public:
+ T2DlgItemImage(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+public:
+ void AdjustSize();
+protected:
+ T2BitImage* GetDrawImage(CRect&) const;
+
+public:
+ virtual ~T2DlgItemImage() {}
+};
diff --git a/src/T2DLL/T2DlgItemImageTable.cpp b/src/T2DLL/T2DlgItemImageTable.cpp
new file mode 100644
index 0000000..a54eb46
--- /dev/null
+++ b/src/T2DLL/T2DlgItemImageTable.cpp
@@ -0,0 +1,16 @@
+#include "T2DlgItemImageTable.h"
+
+T2DlgItemImageTable::T2DlgItemImageTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+T2DlgItemImageTable::T2DlgItemImageTable(int, int, int, int, int, T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ void T2DlgItemImageTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemImageTable::HiliteCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemImageTable::UnhiliteCell(CDC*, const TableCellT&) {
+}
diff --git a/src/T2DLL/T2DlgItemImageTable.h b/src/T2DLL/T2DlgItemImageTable.h
new file mode 100644
index 0000000..ab768ba
--- /dev/null
+++ b/src/T2DLL/T2DlgItemImageTable.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemImageTable {
+public:
+ T2DlgItemImageTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ T2DlgItemImageTable(int, int, int, int, int, T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual void DrawCell(CDC*, const TableCellT&);
+ virtual void HiliteCell(CDC*, const TableCellT&);
+ virtual void UnhiliteCell(CDC*, const TableCellT&);
+
+public:
+ virtual ~T2DlgItemImageTable() {}
+};
diff --git a/src/T2DLL/T2DlgItemListBox.cpp b/src/T2DLL/T2DlgItemListBox.cpp
new file mode 100644
index 0000000..d476f33
--- /dev/null
+++ b/src/T2DLL/T2DlgItemListBox.cpp
@@ -0,0 +1,40 @@
+#include "T2DlgItemListBox.h"
+
+T2DlgItemListBox::T2DlgItemListBox(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemListBox::~T2DlgItemListBox() {
+}
+
+/*virtual*/ void T2DlgItemListBox::SetFont(HFONT) {
+}
+
+/*virtual*/ void T2DlgItemListBox::CreateSubItem() {
+}
+
+/*virtual*/ int T2DlgItemListBox::GetCount() {
+}
+
+/*virtual*/ int T2DlgItemListBox::ResetContent() {
+}
+
+/*virtual*/ int T2DlgItemListBox::AddString(CString&) {
+}
+
+/*virtual*/ int T2DlgItemListBox::DeleteString(unsigned int) {
+}
+
+/*virtual*/ int T2DlgItemListBox::GetCurSel() {
+}
+
+/*virtual*/ int T2DlgItemListBox::SetItemData(int, unsigned long) {
+}
+
+/*virtual*/ unsigned long T2DlgItemListBox::GetItemData(int) {
+}
+
+/*virtual*/ int T2DlgItemListBox::SetItemDataPtr(int, void*) {
+}
+
+/*virtual*/ void* T2DlgItemListBox::GetItemDataPtr(int) {
+}
diff --git a/src/T2DLL/T2DlgItemListBox.h b/src/T2DLL/T2DlgItemListBox.h
new file mode 100644
index 0000000..ac69209
--- /dev/null
+++ b/src/T2DLL/T2DlgItemListBox.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemListBox {
+public:
+ T2DlgItemListBox(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemListBox();
+ virtual void SetFont(HFONT);
+ virtual void CreateSubItem();
+ virtual int GetCount();
+ virtual int ResetContent();
+ virtual int AddString(CString&);
+ virtual int DeleteString(unsigned int);
+ virtual int GetCurSel();
+ virtual int SetItemData(int, unsigned long);
+ virtual unsigned long GetItemData(int);
+ virtual int SetItemDataPtr(int, void*);
+ virtual void* GetItemDataPtr(int);
+};
diff --git a/src/T2DLL/T2DlgItemMovie.cpp b/src/T2DLL/T2DlgItemMovie.cpp
new file mode 100644
index 0000000..4644fe2
--- /dev/null
+++ b/src/T2DLL/T2DlgItemMovie.cpp
@@ -0,0 +1,31 @@
+#include "T2DlgItemMovie.h"
+
+T2DlgItemMovie::T2DlgItemMovie(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemMovie::~T2DlgItemMovie() {
+}
+
+/*virtual*/ int T2DlgItemMovie::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+/*virtual*/ int T2DlgItemMovie::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+void T2DlgItemMovie::SetStillScreenID(const char*, int) {
+}
+
+void T2DlgItemMovie::SetQTMovieName(CString&) {
+}
+
+void T2DlgItemMovie::PlayMovie(const char*) {
+}
+
+void T2DlgItemMovie::CloseMovie() {
+}
+
+/*virtual*/ long T2DlgItemMovie::WindowProc(unsigned int, unsigned int, long) {
+}
+
+/*virtual*/ void T2DlgItemMovie::OnT2Close() {
+}
diff --git a/src/T2DLL/T2DlgItemMovie.h b/src/T2DLL/T2DlgItemMovie.h
new file mode 100644
index 0000000..48b8dd7
--- /dev/null
+++ b/src/T2DLL/T2DlgItemMovie.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemMovie {
+public:
+ T2DlgItemMovie(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemMovie();
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+public:
+ void SetStillScreenID(const char*, int);
+ void SetQTMovieName(CString&);
+protected:
+ void PlayMovie(const char*);
+ void CloseMovie();
+public:
+ virtual long WindowProc(unsigned int, unsigned int, long);
+protected:
+ virtual void OnT2Close();
+};
diff --git a/src/T2DLL/T2DlgItemOK.cpp b/src/T2DLL/T2DlgItemOK.cpp
new file mode 100644
index 0000000..287d992
--- /dev/null
+++ b/src/T2DLL/T2DlgItemOK.cpp
@@ -0,0 +1,7 @@
+#include "T2DlgItemOK.h"
+
+T2DlgItemOK::T2DlgItemOK(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemOK::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
diff --git a/src/T2DLL/T2DlgItemOK.h b/src/T2DLL/T2DlgItemOK.h
new file mode 100644
index 0000000..4296ec1
--- /dev/null
+++ b/src/T2DLL/T2DlgItemOK.h
@@ -0,0 +1,10 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemOK {
+public:
+ T2DlgItemOK(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+
+ virtual ~T2DlgItemOK() {}
+};
diff --git a/src/T2DLL/T2DlgItemPPLEvalGage.cpp b/src/T2DLL/T2DlgItemPPLEvalGage.cpp
new file mode 100644
index 0000000..27e821b
--- /dev/null
+++ b/src/T2DLL/T2DlgItemPPLEvalGage.cpp
@@ -0,0 +1,28 @@
+#include "T2DlgItemPPLEvalGage.h"
+
+T2DlgItemPPLEvalGage::T2DlgItemPPLEvalGage(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemPPLEvalGage::GetMinValue() {
+}
+
+/*virtual*/ int T2DlgItemPPLEvalGage::GetMaxValue() {
+}
+
+/*virtual*/ int T2DlgItemPPLEvalGage::GetValue() {
+}
+
+/*virtual*/ int T2DlgItemPPLEvalGage::GetBlueValue() {
+}
+
+/*virtual*/ int T2DlgItemPPLEvalGage::GetYellowValue() {
+}
+
+void T2DlgItemPPLEvalGage::SetPeople(T2People*) {
+}
+
+/*virtual*/ unsigned long T2DlgItemPPLEvalGage::GetGageColor(int) {
+}
+
+/*virtual*/ int T2DlgItemPPLEvalGage::IsDrawInterior() {
+}
diff --git a/src/T2DLL/T2DlgItemPPLEvalGage.h b/src/T2DLL/T2DlgItemPPLEvalGage.h
new file mode 100644
index 0000000..fc61f9b
--- /dev/null
+++ b/src/T2DLL/T2DlgItemPPLEvalGage.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemPPLEvalGage {
+public:
+ T2DlgItemPPLEvalGage(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int GetMinValue();
+ virtual int GetMaxValue();
+ virtual int GetValue();
+ virtual int GetBlueValue();
+ virtual int GetYellowValue();
+public:
+ void SetPeople(T2People*);
+protected:
+ virtual unsigned long GetGageColor(int);
+ virtual int IsDrawInterior();
+
+public:
+ virtual ~T2DlgItemPPLEvalGage() {}
+};
diff --git a/src/T2DLL/T2DlgItemPeopleView.cpp b/src/T2DLL/T2DlgItemPeopleView.cpp
new file mode 100644
index 0000000..ff64ccc
--- /dev/null
+++ b/src/T2DLL/T2DlgItemPeopleView.cpp
@@ -0,0 +1,49 @@
+#include "T2DlgItemPeopleView.h"
+
+T2DlgItemPeopleView::T2DlgItemPeopleView(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemPeopleView::~T2DlgItemPeopleView() {
+}
+
+/*virtual*/ int T2DlgItemPeopleView::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
+
+/*virtual*/ int T2DlgItemPeopleView::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+/*virtual*/ int T2DlgItemPeopleView::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2DlgItemPeopleView::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemPeopleView::OnT2DlgItemLButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemPeopleView::OnT2DlgItemRButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemPeopleView::OnT2DlgItemRButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemPeopleView::OnT2DlgItemMouseMove(unsigned int, CPoint) {
+}
+
+void T2DlgItemPeopleView::SetMouseCursor(unsigned int) {
+}
+
+/*virtual*/ int T2DlgItemPeopleView::OnCommand(unsigned int, long) {
+}
+
+void T2DlgItemPeopleView::SetPeople(T2People*) {
+}
+
+void T2DlgItemPeopleView::StartAdd() {
+}
+
+void T2DlgItemPeopleView::FinishAdd() {
+}
+
+void T2DlgItemPeopleView::AddOne(T2People*) {
+}
diff --git a/src/T2DLL/T2DlgItemPeopleView.h b/src/T2DLL/T2DlgItemPeopleView.h
new file mode 100644
index 0000000..baed885
--- /dev/null
+++ b/src/T2DLL/T2DlgItemPeopleView.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemPeopleView {
+public:
+ T2DlgItemPeopleView(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemPeopleView();
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual void OnT2DlgItemLButtonUp(unsigned int, CPoint);
+ virtual void OnT2DlgItemRButtonDown(unsigned int, CPoint);
+ virtual void OnT2DlgItemRButtonUp(unsigned int, CPoint);
+ virtual void OnT2DlgItemMouseMove(unsigned int, CPoint);
+ void SetMouseCursor(unsigned int);
+ virtual int OnCommand(unsigned int, long);
+public:
+ void SetPeople(T2People*);
+ void StartAdd();
+ void FinishAdd();
+ void AddOne(T2People*);
+};
diff --git a/src/T2DLL/T2DlgItemPopup.cpp b/src/T2DLL/T2DlgItemPopup.cpp
new file mode 100644
index 0000000..97129b7
--- /dev/null
+++ b/src/T2DLL/T2DlgItemPopup.cpp
@@ -0,0 +1,25 @@
+#include "T2DlgItemPopup.h"
+
+T2DlgItemPopup::T2DlgItemPopup(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemPopup::~T2DlgItemPopup() {
+}
+
+/*virtual*/ int T2DlgItemPopup::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+/*virtual*/ int T2DlgItemPopup::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2DlgItemPopup::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemPopup::OnT2DlgItemLButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ int T2DlgItemPopup::OnCommand(unsigned int, long) {
+}
+
+void T2DlgItemPopup::AppendItem(const CString&) {
+}
diff --git a/src/T2DLL/T2DlgItemPopup.h b/src/T2DLL/T2DlgItemPopup.h
new file mode 100644
index 0000000..8b95cb2
--- /dev/null
+++ b/src/T2DLL/T2DlgItemPopup.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemPopup {
+public:
+ T2DlgItemPopup(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemPopup();
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual void OnT2DlgItemLButtonUp(unsigned int, CPoint);
+ virtual int OnCommand(unsigned int, long);
+public:
+ void AppendItem(const CString&);
+};
diff --git a/src/T2DLL/T2DlgItemProfitsGage.cpp b/src/T2DLL/T2DlgItemProfitsGage.cpp
new file mode 100644
index 0000000..9479e65
--- /dev/null
+++ b/src/T2DLL/T2DlgItemProfitsGage.cpp
@@ -0,0 +1,34 @@
+#include "T2DlgItemProfitsGage.h"
+
+T2DlgItemProfitsGage::T2DlgItemProfitsGage(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+void T2DlgItemProfitsGage::CalcCost() {
+}
+
+/*virtual*/ int T2DlgItemProfitsGage::GetMinValue() {
+}
+
+/*virtual*/ int T2DlgItemProfitsGage::GetMaxValue() {
+}
+
+/*virtual*/ int T2DlgItemProfitsGage::GetValue() {
+}
+
+/*virtual*/ int T2DlgItemProfitsGage::GetBlueValue() {
+}
+
+/*virtual*/ int T2DlgItemProfitsGage::GetYellowValue() {
+}
+
+/*virtual*/ unsigned long T2DlgItemProfitsGage::GetGageColor(int) {
+}
+
+void T2DlgItemProfitsGage::SetTenant(T2Tenant*) {
+}
+
+/*virtual*/ void T2DlgItemProfitsGage::DrawInterior(CDC*, const CRect&) {
+}
+
+/*virtual*/ int T2DlgItemProfitsGage::IsDrawInterior() {
+}
diff --git a/src/T2DLL/T2DlgItemProfitsGage.h b/src/T2DLL/T2DlgItemProfitsGage.h
new file mode 100644
index 0000000..6b555b7
--- /dev/null
+++ b/src/T2DLL/T2DlgItemProfitsGage.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemProfitsGage {
+public:
+ T2DlgItemProfitsGage(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ void CalcCost();
+ virtual int GetMinValue();
+ virtual int GetMaxValue();
+ virtual int GetValue();
+ virtual int GetBlueValue();
+ virtual int GetYellowValue();
+ virtual unsigned long GetGageColor(int);
+public:
+ void SetTenant(T2Tenant*);
+protected:
+ virtual void DrawInterior(CDC*, const CRect&);
+ virtual int IsDrawInterior();
+
+public:
+ virtual ~T2DlgItemProfitsGage() {}
+};
diff --git a/src/T2DLL/T2DlgItemProgress.cpp b/src/T2DLL/T2DlgItemProgress.cpp
new file mode 100644
index 0000000..75bf2ac
--- /dev/null
+++ b/src/T2DLL/T2DlgItemProgress.cpp
@@ -0,0 +1,28 @@
+#include "T2DlgItemProgress.h"
+
+T2DlgItemProgress::T2DlgItemProgress(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemProgress::~T2DlgItemProgress() {
+}
+
+/*virtual*/ void T2DlgItemProgress::SetFont(HFONT) {
+}
+
+/*virtual*/ void T2DlgItemProgress::CreateSubItem() {
+}
+
+/*virtual*/ void T2DlgItemProgress::SetRange(int, int) {
+}
+
+/*virtual*/ int T2DlgItemProgress::SetPos(int) {
+}
+
+/*virtual*/ int T2DlgItemProgress::OffsetPos(int) {
+}
+
+/*virtual*/ int T2DlgItemProgress::SetStep(int) {
+}
+
+/*virtual*/ int T2DlgItemProgress::StepIt() {
+}
diff --git a/src/T2DLL/T2DlgItemProgress.h b/src/T2DLL/T2DlgItemProgress.h
new file mode 100644
index 0000000..7f35b86
--- /dev/null
+++ b/src/T2DLL/T2DlgItemProgress.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemProgress {
+public:
+ T2DlgItemProgress(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemProgress();
+ virtual void SetFont(HFONT);
+ virtual void CreateSubItem();
+ virtual void SetRange(int, int);
+ virtual int SetPos(int);
+ virtual int OffsetPos(int);
+ virtual int SetStep(int);
+ virtual int StepIt();
+};
diff --git a/src/T2DLL/T2DlgItemSTimeTbl.cpp b/src/T2DLL/T2DlgItemSTimeTbl.cpp
new file mode 100644
index 0000000..a837aa5
--- /dev/null
+++ b/src/T2DLL/T2DlgItemSTimeTbl.cpp
@@ -0,0 +1,19 @@
+#include "T2DlgItemSTimeTbl.h"
+
+T2DlgItemSTimeTbl::T2DlgItemSTimeTbl(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemSTimeTbl::~T2DlgItemSTimeTbl() {
+}
+
+/*virtual*/ int T2DlgItemSTimeTbl::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
+
+void T2DlgItemSTimeTbl::SetGrade(int) {
+}
+
+/*virtual*/ int T2DlgItemSTimeTbl::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+void T2DlgItemSTimeTbl::DrawTime(CDC*, unsigned int, int, CRect&) {
+}
diff --git a/src/T2DLL/T2DlgItemSTimeTbl.h b/src/T2DLL/T2DlgItemSTimeTbl.h
new file mode 100644
index 0000000..c4c65e6
--- /dev/null
+++ b/src/T2DLL/T2DlgItemSTimeTbl.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemSTimeTbl {
+public:
+ T2DlgItemSTimeTbl(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemSTimeTbl();
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+ void SetGrade(int);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+private:
+ void DrawTime(CDC*, unsigned int, int, CRect&);
+};
diff --git a/src/T2DLL/T2DlgItemScr.cpp b/src/T2DLL/T2DlgItemScr.cpp
new file mode 100644
index 0000000..692c9a6
--- /dev/null
+++ b/src/T2DLL/T2DlgItemScr.cpp
@@ -0,0 +1,183 @@
+#include "T2DlgItemScr.h"
+
+T2DlgItemScr::T2DlgItemScr(T2TowerDoc* towerDoc, T2ImageObj* imageObj, CPalette* palette)
+ : T2DlgItem(towerDoc, imageObj, palette)
+{
+ mUpImage = 200;
+ mDownImage = 200;
+ mValue = 0;
+ mRange = 0;
+ mPage = 0;
+ mMouseDownPoint = CPoint(0, 0);
+ mClickedArea = 0;
+}
+
+/*virtual*/ void T2DlgItemScr::SetPage(int page) {
+ mPage = page;
+ if (!IsScrollable() && mValue != 0) {
+ mValue = 0;
+ Notify(GetDlgCtrlID(), 0, &mValue);
+ }
+ Invalidate();
+}
+
+/*virtual*/ void T2DlgItemScr::SetRange(int range) {
+ mRange = range;
+ if (!IsScrollable() && mValue != 0) {
+ mValue = 0;
+ Notify(GetDlgCtrlID(), 0, &mValue);
+ }
+ Invalidate();
+}
+
+/*virtual*/ void T2DlgItemScr::SetValue(int value) {
+ if (!IsScrollable())
+ value = 0;
+
+ if (mValue != value) {
+ mValue = value;
+ Notify(GetDlgCtrlID(), 0, &mValue);
+ Invalidate();
+ }
+}
+
+/*virtual*/ void T2DlgItemScr::OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt) {
+ SetCapture();
+ m74 = true;
+ mTimerID = 0;
+ mClickedArea = ScrollBarHittest(pt);
+
+ if (mClickedArea != 0) {
+ if (mClickedArea == Area_SetAbsolute) {
+ mMouseDownPoint = pt;
+ mMouseDownValue = mValue;
+ } else {
+ if (mClickedArea == Area_Up)
+ mUpImage = 100;
+ else if (mClickedArea == Area_Down)
+ mDownImage = 100;
+
+ ScrollBarAction(mClickedArea, 0);
+ if (mClickedArea == Area_Up || mClickedArea == Area_Down)
+ mTimerID = SetTimer(999, 100, NULL);
+ }
+ }
+}
+
+/*virtual*/ void T2DlgItemScr::OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt) {
+ if (mClickedArea && mTimerID)
+ KillTimer(mTimerID);
+
+ ReleaseCapture();
+ m74 = false;
+ mUpImage = 0;
+ mDownImage = 0;
+ mClickedArea = 0;
+ Invalidate();
+}
+
+/*virtual*/ void T2DlgItemScr::OnT2DlgItemMouseMove(UINT nFlags, CPoint pt) {
+ if (mClickedArea) {
+ CRect clientRect;
+ GetClientRect(clientRect);
+
+ switch (mClickedArea) {
+ case Area_SetAbsolute: {
+ int a, b;
+ clientRect.DeflateRect(0, 16);
+ CalcScrollBarThumb(&a, &b);
+
+ int val = PositionToValue(clientRect) - b;
+ if (val == 0)
+ val = 1;
+
+ ScrollBarAction(
+ Area_SetAbsolute,
+ mMouseDownValue + ((PositionToValue(pt) - PositionToValue(mMouseDownPoint)) * (mRange - mPage)) / val
+ );
+ break;
+ }
+ case Area_Up: {
+ CRect upButtonRect;
+ GetUpButtonRect(clientRect, upButtonRect);
+ BOOL inUpButton = upButtonRect.PtInRect(pt);
+ if (inUpButton != m74) {
+ m74 = inUpButton;
+ mUpImage = m74 ? 100 : 0;
+ InvalidateRect(upButtonRect);
+ }
+ break;
+ }
+ case Area_Down: {
+ CRect downButtonRect;
+ GetDnButtonRect(clientRect, downButtonRect);
+ BOOL inDownButton = downButtonRect.PtInRect(pt);
+ if (inDownButton != m74) {
+ m74 = inDownButton;
+ mDownImage = m74 ? 100 : 0;
+ InvalidateRect(downButtonRect);
+ }
+ break;
+ }
+ }
+ }
+}
+
+void T2DlgItemScr::CalcScrollBarThumb(int* a, int* b) const {
+ if (!IsScrollable()) {
+ *a = 16;
+ *b = 0;
+ } else {
+ CRect clientRect;
+ GetClientRect(clientRect);
+
+ int value = PositionToValue(clientRect);
+ value -= 32;
+
+ *b = (value * mPage) / mRange;
+ if (*b < 10)
+ *b = 10;
+ *a = (((value - *b) * mValue) / (mRange - mPage)) + 16;
+ }
+}
+
+void T2DlgItemScr::ScrollBarAction(int area, int arg) {
+ if (!IsScrollable()) {
+ mValue = 0;
+ } else {
+ switch (area) {
+ case Area_Up:
+ mValue--;
+ break;
+ case Area_PageUp:
+ mValue -= mPage / 2;
+ break;
+ case Area_SetAbsolute:
+ mValue = arg;
+ break;
+ case Area_PageDown:
+ mValue += mPage / 2;
+ break;
+ case Area_Down:
+ mValue++;
+ break;
+ }
+
+ if (mValue < 0)
+ mValue = 0;
+ if (mValue > (mRange - mPage))
+ mValue = mRange - mPage;
+ }
+
+ Notify(GetDlgCtrlID(), 0, &mValue);
+ Invalidate();
+}
+
+BOOL T2DlgItemScr::IsScrollable() const {
+ return (mRange > 0) && (mPage < mRange);
+}
+
+/*virtual*/ void T2DlgItemScr::OnT2Timer(UINT id) {
+ if (id == mTimerID && m74 && (mClickedArea == Area_Up || mClickedArea == Area_Down))
+ ScrollBarAction(mClickedArea, 0);
+}
diff --git a/src/T2DLL/T2DlgItemScr.h b/src/T2DLL/T2DlgItemScr.h
new file mode 100644
index 0000000..55698bb
--- /dev/null
+++ b/src/T2DLL/T2DlgItemScr.h
@@ -0,0 +1,45 @@
+#pragma once
+#include "common.h"
+#include "T2DlgItem.h"
+
+class DLL_EXPORT T2DlgItemScr : public T2DlgItem {
+public:
+ T2DlgItemScr(T2TowerDoc* towerDoc, T2ImageObj* imageObj, CPalette* palette);
+ virtual void SetValue(int);
+
+ virtual void SetPage(int);
+ virtual void SetRange(int);
+
+ enum {
+ Area_Up = 1,
+ Area_PageUp = 2,
+ Area_SetAbsolute = 3,
+ Area_PageDown = 4,
+ Area_Down = 5
+ };
+
+protected:
+ virtual void OnT2DlgItemLButtonDown(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemLButtonUp(UINT nFlags, CPoint pt);
+ virtual void OnT2DlgItemMouseMove(UINT nFlags, CPoint pt);
+ virtual void OnT2Timer(UINT id);
+
+ virtual int ScrollBarHittest(CPoint) const = 0;
+ virtual void GetUpButtonRect(const CRect&, CRect&) const = 0;
+ virtual void GetDnButtonRect(const CRect&, CRect&) const = 0;
+ virtual int PositionToValue(const CPoint&) const = 0;
+ virtual int PositionToValue(const CRect&) const = 0;
+
+ void CalcScrollBarThumb(int*, int*) const;
+ void ScrollBarAction(int, int);
+ BOOL IsScrollable() const;
+
+ int mUpImage;
+ int mDownImage;
+ int mRange;
+ int mPage;
+ CPoint mMouseDownPoint;
+ int mMouseDownValue;
+ int mClickedArea;
+ UINT mTimerID;
+};
diff --git a/src/T2DLL/T2DlgItemStressGage.cpp b/src/T2DLL/T2DlgItemStressGage.cpp
new file mode 100644
index 0000000..098f8fb
--- /dev/null
+++ b/src/T2DLL/T2DlgItemStressGage.cpp
@@ -0,0 +1,28 @@
+#include "T2DlgItemStressGage.h"
+
+T2DlgItemStressGage::T2DlgItemStressGage(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemStressGage::GetMinValue() {
+}
+
+/*virtual*/ int T2DlgItemStressGage::GetMaxValue() {
+}
+
+/*virtual*/ int T2DlgItemStressGage::GetValue() {
+}
+
+/*virtual*/ int T2DlgItemStressGage::GetBlueValue() {
+}
+
+/*virtual*/ int T2DlgItemStressGage::GetYellowValue() {
+}
+
+void T2DlgItemStressGage::SetPeople(T2People*) {
+}
+
+/*virtual*/ unsigned long T2DlgItemStressGage::GetGageColor(int) {
+}
+
+/*virtual*/ int T2DlgItemStressGage::IsDrawInterior() {
+}
diff --git a/src/T2DLL/T2DlgItemStressGage.h b/src/T2DLL/T2DlgItemStressGage.h
new file mode 100644
index 0000000..8e90fa0
--- /dev/null
+++ b/src/T2DLL/T2DlgItemStressGage.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemStressGage {
+public:
+ T2DlgItemStressGage(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int GetMinValue();
+ virtual int GetMaxValue();
+ virtual int GetValue();
+ virtual int GetBlueValue();
+ virtual int GetYellowValue();
+public:
+ void SetPeople(T2People*);
+protected:
+ virtual unsigned long GetGageColor(int);
+ virtual int IsDrawInterior();
+
+public:
+ virtual ~T2DlgItemStressGage() {}
+};
diff --git a/src/T2DLL/T2DlgItemTButton.cpp b/src/T2DLL/T2DlgItemTButton.cpp
new file mode 100644
index 0000000..e81b41d
--- /dev/null
+++ b/src/T2DLL/T2DlgItemTButton.cpp
@@ -0,0 +1,7 @@
+#include "T2DlgItemTButton.h"
+
+T2DlgItemTButton::T2DlgItemTButton(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ int T2DlgItemTButton::OnT2DlgItemEraseBkgnd(CDC*) {
+}
diff --git a/src/T2DLL/T2DlgItemTButton.h b/src/T2DLL/T2DlgItemTButton.h
new file mode 100644
index 0000000..3b79f2c
--- /dev/null
+++ b/src/T2DLL/T2DlgItemTButton.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemTButton {
+public:
+ T2DlgItemTButton(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+
+public:
+ virtual ~T2DlgItemTButton() {}
+};
diff --git a/src/T2DLL/T2DlgItemTab.cpp b/src/T2DLL/T2DlgItemTab.cpp
new file mode 100644
index 0000000..f9989b0
--- /dev/null
+++ b/src/T2DLL/T2DlgItemTab.cpp
@@ -0,0 +1,22 @@
+#include "T2DlgItemTab.h"
+
+T2DlgItemTab::T2DlgItemTab(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemTab::~T2DlgItemTab() {
+}
+
+/*virtual*/ int T2DlgItemTab::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+/*virtual*/ void T2DlgItemTab::SetFont(HFONT) {
+}
+
+/*virtual*/ void T2DlgItemTab::CreateSubItem(void*) {
+}
+
+/*virtual*/ int T2DlgItemTab::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ long T2DlgItemTab::WindowProc(unsigned int, unsigned int, long) {
+}
diff --git a/src/T2DLL/T2DlgItemTab.h b/src/T2DLL/T2DlgItemTab.h
new file mode 100644
index 0000000..234cd0a
--- /dev/null
+++ b/src/T2DLL/T2DlgItemTab.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemTab {
+public:
+ T2DlgItemTab(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2DlgItemTab();
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+ virtual void SetFont(HFONT);
+ virtual void CreateSubItem(void*);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+public:
+ virtual long WindowProc(unsigned int, unsigned int, long);
+};
diff --git a/src/T2DLL/T2DlgItemTable.cpp b/src/T2DLL/T2DlgItemTable.cpp
new file mode 100644
index 0000000..a550c75
--- /dev/null
+++ b/src/T2DLL/T2DlgItemTable.cpp
@@ -0,0 +1,172 @@
+#include "T2DlgItemTable.h"
+
+T2DlgItemTable::T2DlgItemTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+T2DlgItemTable::T2DlgItemTable(int, int, int, int, int, T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2DlgItemTable::~T2DlgItemTable() {
+}
+
+void T2DlgItemTable::InitTable(int, int, int, int, int) {
+}
+
+/*virtual*/ int T2DlgItemTable::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
+
+/*virtual*/ int T2DlgItemTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+void T2DlgItemTable::GetTableSize(unsigned int&, unsigned int&) const {
+}
+
+int T2DlgItemTable::IsMultiSelectable() const {
+}
+
+void T2DlgItemTable::EnableMultiSelect(int) {
+}
+
+/*virtual*/ void T2DlgItemTable::ClearSelectedCells() {
+}
+
+int T2DlgItemTable::IsValidCell(const TableCellT&) const {
+}
+
+int T2DlgItemTable::EqualCell(const TableCellT&, const TableCellT&) const {
+}
+
+/*virtual*/ void T2DlgItemTable::InsertRows(int, unsigned int, void*) {
+}
+
+/*virtual*/ void T2DlgItemTable::InsertCols(int, unsigned int, void*) {
+}
+
+/*virtual*/ void T2DlgItemTable::RemoveRows(int, unsigned int) {
+}
+
+/*virtual*/ void T2DlgItemTable::RemoveCols(int, unsigned int) {
+}
+
+/*virtual*/ void T2DlgItemTable::SetRowHeight(int, unsigned int, unsigned int) {
+}
+
+/*virtual*/ void T2DlgItemTable::SetColWidth(int, unsigned int, unsigned int) {
+}
+
+void T2DlgItemTable::SetCellDataSize(int) {
+}
+
+/*virtual*/ void T2DlgItemTable::SetCellData(const TableCellT&, void*) {
+}
+
+/*virtual*/ void T2DlgItemTable::GetCellData(const TableCellT&, void*) {
+}
+
+/*virtual*/ int T2DlgItemTable::FetchLocalCellFrame(const TableCellT&, RECT&) {
+}
+
+/*virtual*/ void T2DlgItemTable::FetchCellHitBy(const POINT&, TableCellT&) {
+}
+
+int T2DlgItemTable::FetchCellDataIndex(const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemTable::ClickSelf(const POINT&, unsigned int) {
+}
+
+/*virtual*/ int T2DlgItemTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2DlgItemTable::HiliteCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemTable::UnhiliteCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemTable::HiliteCells(CDC*, LArrayIterator&) {
+}
+
+/*virtual*/ void T2DlgItemTable::UnhiliteCells(CDC*, LArrayIterator&) {
+}
+
+/*virtual*/ void T2DlgItemTable::ClickCell(const TableCellT&, const POINT&) {
+}
+
+/*virtual*/ void T2DlgItemTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemTable::SelectCell(const TableCellT&) {
+}
+
+/*virtual*/ void T2DlgItemTable::ToggleCell(const TableCellT&) {
+}
+
+int T2DlgItemTable::IsSelected(const TableCellT&) const {
+}
+
+void T2DlgItemTable::GetSelectedCell(TableCellT&) const {
+}
+
+void T2DlgItemTable::InvalidateCell(const TableCellT&) {
+}
+
+int T2DlgItemTable::Resized() {
+}
+
+void T2DlgItemTable::ViewToClient(POINT*, int) {
+}
+
+void T2DlgItemTable::ClientToView(POINT*, int) {
+}
+
+/*virtual*/ void T2DlgItemTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemTable::OnT2DlgItemLButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2DlgItemTable::OnT2DlgItemMouseMove(unsigned int, CPoint) {
+}
+
+/*virtual*/ int T2DlgItemTable::OnCommand(unsigned int, long) {
+}
+
+/*virtual*/ void T2DlgItemTable::OnT2Size(unsigned int, int, int) {
+}
+
+void T2DlgItemTable::DoScroll() {
+}
+
+/*virtual*/ void T2DlgItemTable::ListenToMessage(unsigned int, void*) {
+}
+
+T2DlgItemHScr* T2DlgItemTable::GetHScroller() const {
+}
+
+T2DlgItemVScr* T2DlgItemTable::GetVScroller() const {
+}
+
+void T2DlgItemTable::AttachHScroller(T2DlgItemHScr*, int) {
+}
+
+void T2DlgItemTable::AttachVScroller(T2DlgItemVScr*, int) {
+}
+
+void T2DlgItemTable::SetHScrollerStyle(T2DlgItemTable::ScrollerStyle) {
+}
+
+void T2DlgItemTable::SetVScrollerStyle(T2DlgItemTable::ScrollerStyle) {
+}
+
+int T2DlgItemTable::IsOwnHScroller() const {
+}
+
+int T2DlgItemTable::IsOwnVScroller() const {
+}
+
+TableCellIterator::TableCellIterator(const TableCellT&, const TableCellT&) {
+}
+
+int TableCellIterator::Next(TableCellT&) {
+}
diff --git a/src/T2DLL/T2DlgItemTable.h b/src/T2DLL/T2DlgItemTable.h
new file mode 100644
index 0000000..577fb52
--- /dev/null
+++ b/src/T2DLL/T2DlgItemTable.h
@@ -0,0 +1,81 @@
+#pragma once
+#include "common.h"
+#include "LListener.h"
+#include "T2DlgItem.h"
+
+class DLL_EXPORT T2DlgItemTable : public T2DlgItem, public LListener {
+public:
+ enum ScrollerStyle {
+ ScrollerStyle_0
+ };
+
+ T2DlgItemTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ T2DlgItemTable(int, int, int, int, int, T2TowerDoc*, T2ImageObj*, CPalette*);
+
+ virtual ~T2DlgItemTable();
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+ virtual void InsertRows(int, unsigned int, void*);
+ virtual void InsertCols(int, unsigned int, void*);
+ virtual void RemoveRows(int, unsigned int);
+ virtual void RemoveCols(int, unsigned int);
+ virtual void SetRowHeight(int, unsigned int, unsigned int);
+ virtual void SetColWidth(int, unsigned int, unsigned int);
+ virtual void SetCellData(const TableCellT&, void*);
+ virtual void GetCellData(const TableCellT&, void*);
+ virtual void SelectCell(const TableCellT&);
+ virtual void ToggleCell(const TableCellT&);
+ virtual void ClearSelectedCells();
+
+ void GetTableSize(unsigned int&, unsigned int&) const;
+ int IsMultiSelectable() const;
+ void EnableMultiSelect(int);
+ int IsValidCell(const TableCellT&) const;
+ int EqualCell(const TableCellT&, const TableCellT&) const;
+ void SetCellDataSize(int);
+ int IsSelected(const TableCellT&) const;
+ void GetSelectedCell(TableCellT&) const;
+ virtual void ListenToMessage(unsigned int, void*);
+ T2DlgItemHScr* GetHScroller() const;
+ T2DlgItemVScr* GetVScroller() const;
+ void AttachHScroller(T2DlgItemHScr*, int);
+ void AttachVScroller(T2DlgItemVScr*, int);
+ void SetHScrollerStyle(ScrollerStyle);
+ void SetVScrollerStyle(ScrollerStyle);
+
+protected:
+ virtual int OnCommand(unsigned int, long);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void OnT2DlgItemLButtonDown(UINT, CPoint);
+ virtual void OnT2DlgItemLButtonUp(UINT, CPoint);
+ virtual void OnT2DlgItemMouseMove(UINT, CPoint);
+ virtual int OnT2DlgItemCreate(CREATESTRUCT*);
+ virtual void OnT2Size(unsigned int, int, int);
+
+ virtual void ClickSelf(const POINT&, unsigned int);
+ virtual void HiliteCells(CDC*, LArrayIterator&);
+ virtual void UnhiliteCells(CDC*, LArrayIterator&);
+ virtual void HiliteCell(CDC*, const TableCellT&);
+ virtual void UnhiliteCell(CDC*, const TableCellT&);
+ virtual void ClickCell(const TableCellT&, const POINT&);
+ virtual void DrawCell(CDC*, const TableCellT&);
+ virtual int FetchLocalCellFrame(const TableCellT&, RECT&);
+ virtual void FetchCellHitBy(const POINT&, TableCellT&);
+
+ int FetchCellDataIndex(const TableCellT&);
+ void InvalidateCell(const TableCellT&);
+ void ViewToClient(POINT*, int);
+ void ClientToView(POINT*, int);
+ void DoScroll();
+ int IsOwnHScroller() const;
+ int IsOwnVScroller() const;
+
+private:
+ void InitTable(int, int, int, int, int);
+ int Resized();
+};
+
+class DLL_EXPORT TableCellIterator {
+public:
+ TableCellIterator(const TableCellT&, const TableCellT&);
+ int Next(TableCellT&);
+};
diff --git a/src/T2DLL/T2DlgItemText.cpp b/src/T2DLL/T2DlgItemText.cpp
new file mode 100644
index 0000000..71f9242
--- /dev/null
+++ b/src/T2DLL/T2DlgItemText.cpp
@@ -0,0 +1,28 @@
+#include "T2DlgItemText.h"
+
+T2DlgItemText::T2DlgItemText(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+void T2DlgItemText::SetTextColor(unsigned long) {
+}
+
+/*virtual*/ void T2DlgItemText::GetDescriptor(CString&) const {
+}
+
+/*virtual*/ void T2DlgItemText::SetDescriptor(const CString&) {
+}
+
+/*virtual*/ int T2DlgItemText::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+char T2DlgItemText::GetJustification() const {
+}
+
+void T2DlgItemText::GetContentText(CString&) const {
+}
+
+void T2DlgItemText::InfoDialogMessage(CString&, long) {
+}
+
+/*virtual*/ void T2DlgItemText::OnT2Timer(unsigned int) {
+}
diff --git a/src/T2DLL/T2DlgItemText.h b/src/T2DLL/T2DlgItemText.h
new file mode 100644
index 0000000..83fa1f6
--- /dev/null
+++ b/src/T2DLL/T2DlgItemText.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2DlgItemText {
+public:
+ T2DlgItemText(T2TowerDoc*, T2ImageObj*, CPalette*);
+ void SetTextColor(unsigned long);
+ virtual void GetDescriptor(CString&) const;
+ virtual void SetDescriptor(const CString&);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ char GetJustification() const;
+ void GetContentText(CString&) const;
+public:
+ void InfoDialogMessage(CString&, long);
+protected:
+ virtual void OnT2Timer(unsigned int);
+
+public:
+ virtual ~T2DlgItemText() {}
+};
diff --git a/src/T2DLL/T2DlgItemVScr.cpp b/src/T2DLL/T2DlgItemVScr.cpp
new file mode 100644
index 0000000..3b4b55a
--- /dev/null
+++ b/src/T2DLL/T2DlgItemVScr.cpp
@@ -0,0 +1,24 @@
+#include "T2DlgItemVScr.h"
+
+T2DlgItemVScr::T2DlgItemVScr(T2TowerDoc* towerDoc, T2ImageObj* imageObj, CPalette* palette)
+ : T2DlgItemScr(towerDoc, imageObj, palette)
+{
+}
+
+/*virtual*/ int T2DlgItemVScr::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ int T2DlgItemVScr::ScrollBarHittest(CPoint) const {
+}
+
+/*virtual*/ void T2DlgItemVScr::GetUpButtonRect(const CRect&, CRect&) const {
+}
+
+/*virtual*/ void T2DlgItemVScr::GetDnButtonRect(const CRect&, CRect&) const {
+}
+
+/*virtual*/ int T2DlgItemVScr::PositionToValue(const CPoint&) const {
+}
+
+/*virtual*/ int T2DlgItemVScr::PositionToValue(const CRect&) const {
+}
diff --git a/src/T2DLL/T2DlgItemVScr.h b/src/T2DLL/T2DlgItemVScr.h
new file mode 100644
index 0000000..4b44052
--- /dev/null
+++ b/src/T2DLL/T2DlgItemVScr.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+#include "T2DlgItemScr.h"
+
+class DLL_EXPORT T2DlgItemVScr : public T2DlgItemScr {
+public:
+ T2DlgItemVScr(T2TowerDoc*, T2ImageObj*, CPalette*);
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual int ScrollBarHittest(CPoint) const;
+ virtual void GetUpButtonRect(const CRect&, CRect&) const;
+ virtual void GetDnButtonRect(const CRect&, CRect&) const;
+ virtual int PositionToValue(const CPoint&) const;
+ virtual int PositionToValue(const CRect&) const;
+};
diff --git a/src/T2DLL/T2DrawableObject.cpp b/src/T2DLL/T2DrawableObject.cpp
new file mode 100644
index 0000000..5775da7
--- /dev/null
+++ b/src/T2DLL/T2DrawableObject.cpp
@@ -0,0 +1,38 @@
+#include "T2DrawableObject.h"
+#include "T2InfoDialog.h"
+
+T2DrawableObject::T2DrawableObject() {
+}
+
+/*virtual*/ T2DrawableObject::~T2DrawableObject() {
+}
+
+/*virtual*/ void T2DrawableObject::Draw(T2TowerDoc* towerDoc, const RECT& rect) {
+ DrawSelf(towerDoc, rect);
+}
+
+/*virtual*/ void T2DrawableObject::DrawSelf(T2TowerDoc*, const RECT&) {
+}
+
+/*virtual*/ T2InfoDialog* T2DrawableObject::ShowInfoDialog(T2TowerDoc* towerDoc) {
+ CRect rect;
+ AfxGetMainWnd()->GetWindowRect(rect);
+
+ T2DLGTEMPLATE tmpl;
+ tmpl.pt = rect.CenterPoint();
+ tmpl.moduleHandle = AfxGetInstanceHandle();
+ tmpl.resID = 1000;
+
+ T2InfoDialog *dialog = ConstructInfoDialog();
+ dialog->Realize(this, &tmpl, towerDoc, NULL, NULL, true, NULL, 0, 1);
+ return dialog;
+}
+
+/*virtual*/ T2InfoDialog* T2DrawableObject::ConstructInfoDialog() {
+ return new T2InfoDialog(this);
+}
+
+/*virtual*/ void T2DrawableObject::DrawHitMask(T2TowerDoc*) {
+#line 78
+ _ASSERT(0);
+}
diff --git a/src/T2DLL/T2DrawableObject.h b/src/T2DLL/T2DrawableObject.h
new file mode 100644
index 0000000..bb66edc
--- /dev/null
+++ b/src/T2DLL/T2DrawableObject.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+#include "T2Object.h"
+
+class T2DrawableObject : public T2Object {
+public:
+ T2DrawableObject();
+ virtual ~T2DrawableObject();
+ virtual void Draw(T2TowerDoc*, const RECT&);
+ virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*);
+ virtual void DrawHitMask(T2TowerDoc*);
+protected:
+ virtual void DrawSelf(T2TowerDoc*, const RECT&);
+ virtual T2InfoDialog* ConstructInfoDialog();
+};
diff --git a/src/T2DLL/T2ElevatorModule.cpp b/src/T2DLL/T2ElevatorModule.cpp
new file mode 100644
index 0000000..5159c69
--- /dev/null
+++ b/src/T2DLL/T2ElevatorModule.cpp
@@ -0,0 +1,100 @@
+#include "T2ElevatorModule.h"
+
+T2ElevatorModule::T2ElevatorModule(int) {
+}
+
+/*virtual*/ T2ElevatorModule::~T2ElevatorModule() {
+}
+
+void T2ElevatorModule::Init(int, int) {
+}
+
+/*virtual*/ void T2ElevatorModule::SetUsed(int) {
+}
+
+int T2ElevatorModule::IsPtInArea(POINT, const RECT&) const {
+}
+
+/*virtual*/ void T2ElevatorModule::StopAdded(T2TowerDoc*, T2Mover*, int) {
+}
+
+/*virtual*/ void T2ElevatorModule::StopRemoved(T2TowerDoc*, T2Mover*, int) {
+}
+
+void T2ElevatorModule::Remove(T2TowerDoc*, T2Mover*) {
+}
+
+void T2ElevatorModule::RemoveContents(T2TowerDoc*, T2Mover*, int) {
+}
+
+int T2ElevatorModule::HomePosRemoved(T2Mover*, int) {
+}
+
+void T2ElevatorModule::TopTurnPosRemoved(int) {
+}
+
+void T2ElevatorModule::BottomTurnPosRemoved(int) {
+}
+
+void T2ElevatorModule::NextStopRemoved() {
+}
+
+void T2ElevatorModule::MoverExpanded(T2Mover*, EEquipPos, int) {
+}
+
+int T2ElevatorModule::IsStopPos(int, ERequestUpDown) const {
+}
+
+int T2ElevatorModule::IsOnStopPos(int, ERequestUpDown) const {
+}
+
+int T2ElevatorModule::IsOffStopPos(int, ERequestUpDown) const {
+}
+
+void T2ElevatorModule::SetOnStop(int, ERequestUpDown) {
+}
+
+void T2ElevatorModule::SetOffStop(int, ERequestUpDown) {
+}
+
+void T2ElevatorModule::ClearOnStop(T2Request*) {
+}
+
+void T2ElevatorModule::ClearOffStop(T2Request*) {
+}
+
+void T2ElevatorModule::SetNextStop() {
+}
+
+void T2ElevatorModule::ChangeTurnPos() {
+}
+
+void T2ElevatorModule::StartToHomePos() {
+}
+
+T2Request* T2ElevatorModule::GetAppointRequest(T2FloorInfo*, T2Mover*) {
+}
+
+T2Request* T2ElevatorModule::GetAnyRequest(T2FloorInfo*, T2Mover*) {
+}
+
+void T2ElevatorModule::CalcUintArea(const T2Mover*, RECT&) const {
+}
+
+void T2ElevatorModule::CalcUintArea(const T2Mover*, int, RECT&) const {
+}
+
+int T2ElevatorModule::IsPatChanged(T2Mover*) {
+}
+
+T2People* T2ElevatorModule::LeaveToDstFloor(int) {
+}
+
+/*virtual*/ void T2ElevatorModule::Enter(T2Mover*, T2People*) {
+}
+
+/*virtual*/ void T2ElevatorModule::LoadSelf(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2ElevatorModule::SaveSelf(T2Archive&) {
+}
diff --git a/src/T2DLL/T2ElevatorModule.h b/src/T2DLL/T2ElevatorModule.h
new file mode 100644
index 0000000..66438d9
--- /dev/null
+++ b/src/T2DLL/T2ElevatorModule.h
@@ -0,0 +1,57 @@
+#pragma once
+#include "common.h"
+
+class T2ElevatorModule {
+public:
+ T2ElevatorModule(int);
+ virtual ~T2ElevatorModule();
+ void Init(int, int);
+ virtual void SetUsed(int);
+ int IsPtInArea(POINT, const RECT&) const;
+ virtual void StopAdded(T2TowerDoc*, T2Mover*, int);
+ virtual void StopRemoved(T2TowerDoc*, T2Mover*, int);
+ void Remove(T2TowerDoc*, T2Mover*);
+protected:
+ void RemoveContents(T2TowerDoc*, T2Mover*, int);
+ int HomePosRemoved(T2Mover*, int);
+ void TopTurnPosRemoved(int);
+ void BottomTurnPosRemoved(int);
+ void NextStopRemoved();
+public:
+ void MoverExpanded(T2Mover*, EEquipPos, int);
+ int IsStopPos(int, ERequestUpDown) const;
+ int IsOnStopPos(int, ERequestUpDown) const;
+ int IsOffStopPos(int, ERequestUpDown) const;
+ void SetOnStop(int, ERequestUpDown);
+ void SetOffStop(int, ERequestUpDown);
+ void ClearOnStop(T2Request*);
+ void ClearOffStop(T2Request*);
+ void SetNextStop();
+ void ChangeTurnPos();
+ void StartToHomePos();
+ T2Request* GetAppointRequest(T2FloorInfo*, T2Mover*);
+ T2Request* GetAnyRequest(T2FloorInfo*, T2Mover*);
+ void CalcUintArea(const T2Mover*, RECT&) const;
+protected:
+ void CalcUintArea(const T2Mover*, int, RECT&) const;
+public:
+ int IsPatChanged(T2Mover*);
+ T2People* LeaveToDstFloor(int);
+ virtual void Enter(T2Mover*, T2People*);
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+
+public:
+ int GetIndex() const {}
+ void SetHomePosition(int) {}
+ int GetOffsetPos() {}
+ void SetOffsetPos(int) {}
+ void AddOffsetPos(int) {}
+ int GetNextStop() const {}
+ int GetTopTurn() const {}
+ int GetBottomTurn() const {}
+ T2ElevatorModule(const T2ElevatorModule&) {}
+ T2ElevatorModule& operator=(const T2ElevatorModule&) {}
+ int GetHomePosition() const {}
+};
diff --git a/src/T2DLL/T2ElvModuleList.cpp b/src/T2DLL/T2ElvModuleList.cpp
new file mode 100644
index 0000000..69a087e
--- /dev/null
+++ b/src/T2DLL/T2ElvModuleList.cpp
@@ -0,0 +1,43 @@
+#include "T2ElvModuleList.h"
+
+T2ElvModuleList::T2ElvModuleList() {
+}
+
+/*virtual*/ T2ElvModuleList::~T2ElvModuleList() {
+}
+
+/*virtual*/ int T2ElvModuleList::Init(T2MoverDef*, const RECT&) {
+}
+
+void T2ElvModuleList::AddModule(T2TowerDoc*, int, int) {
+}
+
+/*virtual*/ void T2ElvModuleList::Destruct(T2TowerDoc*) {
+}
+
+/*virtual*/ T2MoverModule* T2ElvModuleList::ConstructModule() {
+}
+
+void T2ElvModuleList::CalcBaseQDRect(RECT&) {
+}
+
+int T2ElvModuleList::DestructModule(T2TowerDoc*, T2Mover*, POINT) {
+}
+
+int T2ElvModuleList::IsHomePosition(int) {
+}
+
+void T2ElvModuleList::MoverExpanded(T2Mover*, EEquipPos, int) {
+}
+
+/*virtual*/ void T2ElvModuleList::StopAdded(T2TowerDoc*, T2Mover*, int) {
+}
+
+/*virtual*/ void T2ElvModuleList::StopRemoved(T2TowerDoc*, T2Mover*, int) {
+}
+
+/*virtual*/ void T2ElvModuleList::Read(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2ElvModuleList::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2ElvModuleList.h b/src/T2DLL/T2ElvModuleList.h
new file mode 100644
index 0000000..894af22
--- /dev/null
+++ b/src/T2DLL/T2ElvModuleList.h
@@ -0,0 +1,28 @@
+#pragma once
+#include "common.h"
+
+class T2ElvModuleList {
+public:
+ T2ElvModuleList();
+ virtual ~T2ElvModuleList();
+ virtual int Init(T2MoverDef*, const RECT&);
+ void AddModule(T2TowerDoc*, int, int);
+ virtual void Destruct(T2TowerDoc*);
+ virtual T2MoverModule* ConstructModule();
+protected:
+ void CalcBaseQDRect(RECT&);
+public:
+ int DestructModule(T2TowerDoc*, T2Mover*, POINT);
+ int IsHomePosition(int);
+ void MoverExpanded(T2Mover*, EEquipPos, int);
+ virtual void StopAdded(T2TowerDoc*, T2Mover*, int);
+ virtual void StopRemoved(T2TowerDoc*, T2Mover*, int);
+ virtual void Read(T2Archive&, T2TowerDoc*);
+ virtual void Write(T2Archive&);
+
+protected:
+ virtual unsigned long GetMMClassID() {}
+public:
+ T2ElvModuleList(const T2ElvModuleList&) {}
+ T2ElvModuleList& operator=(const T2ElvModuleList&) {}
+};
diff --git a/src/T2DLL/T2Equip.cpp b/src/T2DLL/T2Equip.cpp
new file mode 100644
index 0000000..b6af51b
--- /dev/null
+++ b/src/T2DLL/T2Equip.cpp
@@ -0,0 +1,215 @@
+#include "GlobalFunc.h"
+#include "T2Archive.h"
+#include "T2CrossEquipArray.h"
+#include "T2DateTime.h"
+#include "T2Equip.h"
+#include "T2SoundPlayer.h"
+#include "T2TowerDoc.h"
+
+T2Equip::T2Equip() {
+ mEquipID = 0;
+ SetRect(&mArea, 0, 0, 0, 0);
+ mEquipType = 0;
+ mDrawMode = 0;
+ mPatIndex = 0;
+ mCapacity = 0;
+ m44 = 0;
+ mInMoneyIndex = 0;
+ m48 = 0;
+ mBuildDay = 0;
+ mAttribute = 0;
+ mCEArray = NULL;
+ m58 = 0;
+}
+
+/*virtual*/ T2Equip::~T2Equip() {
+ if (mCEArray)
+ delete mCEArray;
+}
+
+int T2Equip::InitEquip(T2EquipDef* def, const RECT& area, unsigned int valiation) {
+ if (def) {
+ mEquipType = def->GetEquipType();
+ mCapacity = def->GetCapacity();
+ mAttribute = def->GetAttribute();
+ mToolDef = def;
+ }
+ mValiation = valiation;
+ mArea = area;
+
+ mDrawMode = 0;
+ m44 = 0;
+ m48 = 0;
+ mPatIndex = 0;
+
+ T2TowerDoc *towerDoc = GetCurrentT2TowerDoc();
+ if (towerDoc)
+ mBuildDay = towerDoc->towerDoc_vf120()->CalcTotalDays();
+ else
+ mBuildDay = 0;
+
+ mInMoneyIndex = (GetEquipDef()->GetNumOfInMoney() > 1) ? (GetEquipDef()->GetNumOfInMoney() / 2) : 0;
+
+ SetUsed(true);
+ return true;
+}
+
+/*virtual*/ void T2Equip::SetUsed(int used) {
+ if (!used && mCEArray) {
+ delete mCEArray;
+ mCEArray = NULL;
+ }
+ T2HaveOutViewObject::SetUsed(used);
+}
+
+int T2Equip::DaysSinceBuilt(const T2TowerDoc* towerDoc) const {
+ return towerDoc->towerDoc_vf120()->CalcLapseDays(mBuildDay);
+}
+
+void T2Equip::SetEquipArea(const RECT& rect) {
+ mArea = rect;
+}
+
+/*virtual*/ int T2Equip::GetOutMoney() const {
+ int cost = 0;
+ cost = GetEquipDef()->GetOutMoney(0);
+ return cost;
+}
+
+/*virtual*/ int T2Equip::GetInMoney() const {
+ int cost = 0;
+ cost = GetEquipDef()->GetInMoney(mInMoneyIndex);
+ return cost;
+}
+
+/*virtual*/ PARTCODE T2Equip::GetClickPart(T2TowerDoc* towerDoc, CPoint pt, int* val) {
+ return GetEquipDef()->GetPartFromPoint(towerDoc, this, pt, val);
+}
+
+/*virtual*/ PROCCODE T2Equip::DoDestruct(T2TowerDoc*, POINT, RECT&) {
+ if (mCEArray)
+ delete mCEArray;
+ return ProcCode_2;
+}
+
+void T2Equip::InsertCEID(int a, int b) {
+ if (mCEArray)
+ mCEArray->Insert(a, b);
+}
+
+void T2Equip::RemoveCEID(int id) {
+ if (mCEArray)
+ mCEArray->Remove(&id);
+}
+
+void T2Equip::ReplaceCEID(unsigned int oldID, unsigned int newID) {
+ if (mCEArray)
+ mCEArray->ReplaceID(oldID, newID);
+}
+
+/*virtual*/ PARTCODE T2Equip::GetPartFromPoint(T2TowerDoc* towerDoc, POINT pt, int* val) {
+ return GetEquipDef()->GetPartFromPoint(towerDoc, this, pt, val);
+}
+
+/*virtual*/ void T2Equip::LoadSelf(T2Archive& archive, T2TowerDoc* towerDoc) {
+ T2Object::LoadSelf(archive, towerDoc);
+
+ if (IsUsed()) {
+ unsigned short us;
+ short s;
+ unsigned char uc;
+
+ archive >> us;
+ mEquipID = us;
+
+ archive.ReadSRect(mArea);
+
+ archive >> s;
+ mEquipType = s;
+ archive >> s;
+ mDrawMode = s;
+ archive >> uc;
+ mPatIndex = uc;
+ archive >> s;
+ m44 = s;
+ archive >> s;
+ mInMoneyIndex = s;
+ archive >> s;
+ m48 = s;
+
+ archive >> mBuildDay;
+ mCEArray = (T2RouteCEArray *) T2CrossEquipArray::ReadCEArray(archive);
+ archive >> mValiation;
+ }
+}
+
+/*virtual*/ void T2Equip::SaveSelf(T2Archive& archive) {
+ T2Object::SaveSelf(archive);
+
+ if (IsUsed()) {
+ unsigned short us;
+ short s;
+ unsigned char uc;
+
+ us = mEquipID;
+ archive << us;
+
+ archive.WriteSRect(mArea);
+
+ s = mEquipType;
+ archive << s;
+ s = mDrawMode;
+ archive << s;
+ uc = mPatIndex;
+ archive << uc;
+ s = m44;
+ archive << s;
+ s = mInMoneyIndex;
+ archive << s;
+ s = m48;
+ archive << s;
+
+ archive << mBuildDay;
+ T2CrossEquipArray::WriteCEArray(mCEArray, archive);
+ archive << mValiation;
+ }
+}
+
+/*virtual*/ T2InfoDialog* T2Equip::ShowInfoDialog(T2TowerDoc* towerDoc) {
+ return GetEquipDef()->ShowInfoDialog(towerDoc, this);
+}
+
+/*virtual*/ void T2Equip::PlaySound(T2TowerDoc* towerDoc, int id, unsigned int a, unsigned int b) const {
+ if (towerDoc->towerDoc_vf15C(mArea)) {
+ T2EquipDef *equipDef = GetEquipDef();
+ T2SoundPlayer *soundPlayer = towerDoc->towerDoc_vf134();
+ if (equipDef && soundPlayer) {
+ CRect rect;
+ GetEquipArea(rect);
+ CPoint pt = rect.CenterPoint();
+ CString name = equipDef->CalcSoundID(id);
+ soundPlayer->Play(
+ name,
+ a,
+ b,
+ &pt,
+ PlayMode_0,
+ 100
+ );
+ }
+ }
+}
+
+/*virtual*/ void T2Equip::DrawHitMask(T2TowerDoc* towerDoc) {
+ m58 = true;
+ if (mToolDef->DrawHitMask(towerDoc, this) == ProcCode_0) {
+ RECT rect;
+ GetEquipArea(rect);
+ Draw(towerDoc, rect);
+ }
+ m58 = false;
+}
+
+void T2Equip::GetTypicalName(CString& outStr) const {
+ GetEquipDef()->GetName(outStr, GetValiation());
+}
diff --git a/src/T2DLL/T2Equip.h b/src/T2DLL/T2Equip.h
new file mode 100644
index 0000000..7e4c914
--- /dev/null
+++ b/src/T2DLL/T2Equip.h
@@ -0,0 +1,82 @@
+#pragma once
+#include "common.h"
+#include "T2EquipDef.h"
+#include "T2HaveOutViewObject.h"
+#include "T2RouteCEArray.h"
+
+class T2Equip : public T2HaveOutViewObject {
+public:
+ T2Equip();
+ virtual ~T2Equip();
+ virtual void SetUsed(int);
+ virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*);
+ virtual void DrawHitMask(T2TowerDoc*);
+ virtual int IsNeedDraw() const { return true; }
+ virtual int GetOutMoney() const;
+ virtual int GetInMoney() const;
+ virtual void BuildStart(T2TowerDoc*) {}
+ virtual int IsBuildFinish() { return true; }
+ virtual PARTCODE GetPartFromPoint(T2TowerDoc*, POINT, int*);
+ virtual PARTCODE GetClickPart(T2TowerDoc*, CPoint, int*);
+ virtual PROCCODE DoDestruct(T2TowerDoc*, POINT, RECT&);
+ virtual void SetDrawMode(int drawMode) {
+ if (mDrawMode != drawMode)
+ mDrawMode = drawMode;
+ }
+ virtual void ClearDrawMode() {
+ mDrawMode = 0;
+ }
+ virtual void PlaySound(T2TowerDoc*, int, unsigned int, unsigned int) const;
+
+ int InitEquip(T2EquipDef* def, const RECT& area, unsigned int valiation);
+ int DaysSinceBuilt(const T2TowerDoc*) const;
+ void SetEquipArea(const RECT&);
+ void InsertCEID(int, int);
+ void RemoveCEID(int);
+ void ReplaceCEID(unsigned int, unsigned int);
+ void GetTypicalName(CString&) const;
+
+ unsigned int GetAttribute() const { return mAttribute; }
+ int IsSetAttribute(unsigned int a) const { return (mAttribute & a) != 0; }
+ int IsMover() const { return IsSetAttribute(2); }
+ int IsNormalMenteCost() const { return IsSetAttribute(0x100); }
+ unsigned int GetEquipID() const { return mEquipID; }
+ void SetEquipDef(T2EquipDef* equipDef) {
+ SetToolDef(equipDef);
+ }
+ void GetEquipArea(RECT& rect) const {
+ rect = mArea;
+ }
+ int GetAreaWidth() const { return mArea.right - mArea.left; }
+ int GetAreaHeight() const { return mArea.bottom - mArea.top; }
+ int GetEquipType() const { return mEquipType; }
+ int GetCapacity() const { return mCapacity; }
+ int GetInMoneyIndex() const { return mInMoneyIndex; }
+ int GetBuildDay() const { return mBuildDay; }
+ int GetDrawMode() const { return mDrawMode; }
+ T2CrossEquipArray* GetCEArray() const { return mCEArray; }
+ T2EquipDef* GetEquipDef() const { return (T2EquipDef *) mToolDef; }
+ void SetInMoneyIndex(int i) { mInMoneyIndex = i; }
+ int GetPatIndex() const { return mPatIndex; }
+ void SetPatIndex(int i) { mPatIndex = i; }
+
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+
+ friend class T2EquipDef;
+
+ unsigned int mEquipID;
+ RECT mArea;
+ int mEquipType;
+ int mDrawMode;
+ int mPatIndex;
+ int mCapacity;
+ int m44;
+ int m48;
+ int mBuildDay;
+ unsigned int mAttribute;
+ T2RouteCEArray *mCEArray;
+ int m58;
+ int mInMoneyIndex;
+};
diff --git a/src/T2DLL/T2EquipDef.cpp b/src/T2DLL/T2EquipDef.cpp
new file mode 100644
index 0000000..bb694d6
--- /dev/null
+++ b/src/T2DLL/T2EquipDef.cpp
@@ -0,0 +1,187 @@
+#include "CResFile.h"
+#include "T2Archive.h"
+#include "T2BitImage.h"
+#include "T2Equip.h"
+#include "T2EquipDef.h"
+#include "T2EquipPlugin.h"
+#include "T2ImageObj.h"
+#include "T2InfoDialog.h"
+#include "T2People.h"
+#include "T2PeopleLinkIterator.h"
+#include "T2TowerDoc.h"
+#include "T2WorldDef.h"
+#include "UT2Coordinate.h"
+
+T2EquipDef::T2EquipDef(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile, T2WorldDef* worldDef, T2EquipPlugin* plugin)
+ : T2ToolDef(type, specifier, resFile, worldDef, plugin)
+{
+ unsigned long tmp;
+
+ *resFile >> mCapacity;
+ *resFile >> mStress;
+ *resFile >> tmp;
+
+ for (int j = 0; j < mValiationCount; j++) {
+ *resFile >> m154;
+ *resFile >> tmp;
+ *resFile >> tmp;
+ }
+
+ *resFile >> mOutSpan;
+ *resFile >> mInSpan;
+ *resFile >> mNumOfInMoney;
+
+ for (int i = 0; i < mNumOfInMoney; i++) {
+ if (i < 4) {
+ *resFile >> mInMoney[i];
+ } else {
+ int moneyTmp;
+ *resFile >> moneyTmp;
+ }
+ }
+
+ m124 = NULL;
+ m128 = NULL;
+ m130 = NULL;
+ m140 = 0;
+
+ if (mNumOfInMoney > 4)
+ mNumOfInMoney = 4;
+
+ try {
+ int outViewKind = worldDef->GetOutViewKind() + 1001;
+ m124 = new T2BitImage(mModuleHandle, outViewKind, 1);
+ mImageObj->AddObject(mModuleHandle, outViewKind, m124);
+ } catch (int e) {
+ }
+
+ try {
+ m128 = new T2BitImage(mModuleHandle, 1010, 1);
+ mImageObj->AddObject(mModuleHandle, 1010, m128);
+ } catch (int e) {
+ }
+
+ try {
+ m130 = new T2BitImage(mModuleHandle, 1100, 1);
+ mImageObj->AddObject(mModuleHandle, 1100, m130);
+ } catch (int e) {
+ }
+
+ mWordDefArray = MakeWordDefArray();
+}
+
+/*virtual*/ T2EquipDef::~T2EquipDef() {
+ if (m124)
+ delete m124;
+ if (m128)
+ delete m128;
+ if (m130)
+ delete m130;
+
+ if (mWordDefArray)
+ delete mWordDefArray;
+}
+
+/*virtual*/ int T2EquipDef::InitObject(T2Object* object) {
+ object->SetUsed(true);
+ ((T2Equip *) object)->mEquipType = GetEquipType();
+ ((T2Equip *) object)->mCapacity = mCapacity;
+ ((T2Equip *) object)->mAttribute = mAttribute;
+ ((T2Equip *) object)->SetEquipDef(this);
+ return true;
+}
+
+/*virtual*/ int T2EquipDef::ClickProc(T2TowerDoc*, RECT*, unsigned int&) {
+ return 1;
+}
+
+/*virtual*/ int T2EquipDef::GetDestructPartProc(int, POINT, POINT, T2Equip*) {
+ return -1;
+}
+
+/*virtual*/ AREACHECKCODE T2EquipDef::AreaCheck(T2TowerDoc*, RECT&, unsigned int, int) {
+ return AreaCheckCode_0;
+}
+
+/*virtual*/ PARTCODE T2EquipDef::GetPartFromPoint(T2TowerDoc* towerDoc, T2Equip* equip, POINT pt, int*) {
+ UT2Coordinate::QDToUnit(pt, towerDoc->mZoomLevel);
+ if (PtInRect(&equip->mArea, pt))
+ return PartCode_2;
+ else
+ return PartCode_0;
+}
+
+/*virtual*/ void T2EquipDef::BuildFinish(T2TowerDoc* towerDoc, T2Equip* equip) {
+ towerDoc->towerDoc_vf170()->CalcOptionObj(towerDoc, equip);
+}
+
+/*virtual*/ unsigned long T2EquipDef::OptionProc(T2TowerDoc*, T2Equip*, void*) {
+ return 0;
+}
+
+/*virtual*/ void T2EquipDef::DebugInfo(CWnd&, CListCtrl&, T2Equip*) {
+}
+
+/*virtual*/ int T2EquipDef::FingerToolProc(T2TowerDoc*, T2Equip*, const POINT&, MOUSEEVENT) {
+ return 0;
+}
+
+/*virtual*/ T2InfoDialog* T2EquipDef::ShowInfoDialog(T2TowerDoc* towerDoc, T2Equip* equip) {
+ CRect rect;
+ AfxGetMainWnd()->GetWindowRect(rect);
+
+ T2DLGTEMPLATE tmpl;
+ tmpl.pt = rect.CenterPoint();
+ tmpl.moduleHandle = mModuleHandle;
+ tmpl.resID = GetInfoDialogID(towerDoc, equip);
+
+ T2InfoDialog *dialog = ConstructInfoDialog(equip);
+ dialog->Realize(this, &tmpl, towerDoc, mImageObj, NULL, true, NULL, 0, 1);
+ return dialog;
+}
+
+/*virtual*/ int T2EquipDef::GetInfoDialogID(T2TowerDoc*, const T2Equip*) const {
+ return 1000;
+}
+
+/*virtual*/ T2InfoDialog* T2EquipDef::ConstructInfoDialog(T2Equip* equip) {
+ return new T2InfoDialog(equip);
+}
+
+/*virtual*/ void T2EquipDef::DrawPeople(T2TowerDoc* towerDoc, T2Equip* equip) {
+ //T2People *people = (T2People *) equip;
+ //T2PeopleLinkIterator iter(people);
+ //T2People *i;
+ //while (iter.Next(&i))
+ // i->Draw(towerDoc, people);
+ // TODO: which subclass is this...?
+}
+
+int T2EquipDef::GetInMoney(int i) {
+ int cost = 0;
+ if (i < mNumOfInMoney)
+ cost = mInMoney[i];
+ return cost;
+}
+
+/*virtual*/ void T2EquipDef::LoadExtraData(T2Archive& archive, T2TowerDoc*, T2HaveOutViewObject*) {
+ int len;
+ archive >> len;
+
+ for (int i = 0; i < len; i++) {
+ unsigned char b;
+ archive >> b;
+ }
+}
+
+/*virtual*/ void T2EquipDef::SaveExtraData(T2Archive& archive, T2HaveOutViewObject*) {
+ int len = 0;
+ archive << len;
+}
+
+T2WordDefArray* T2EquipDef::MakeWordDefArray() {
+ return 0; // TODO
+}
+
+void T2EquipDef::GetWords(T2People*, CString&) const {
+}
diff --git a/src/T2DLL/T2EquipDef.h b/src/T2DLL/T2EquipDef.h
new file mode 100644
index 0000000..de66a3c
--- /dev/null
+++ b/src/T2DLL/T2EquipDef.h
@@ -0,0 +1,68 @@
+#pragma once
+#include "common.h"
+#include "T2ToolDef.h"
+
+class T2EquipDef : public T2ToolDef {
+public:
+ T2EquipDef(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile, T2WorldDef* worldDef, T2EquipPlugin* plugin);
+ virtual ~T2EquipDef();
+ virtual int InitObject(T2Object*);
+ virtual int IsMover() { return IsSetAttribute(2); }
+ virtual void LoadExtraData(T2Archive&, T2TowerDoc*, T2HaveOutViewObject*);
+ virtual void SaveExtraData(T2Archive&, T2HaveOutViewObject*);
+ virtual AREACHECKCODE AreaCheck(T2TowerDoc*, RECT&, unsigned int, int);
+ virtual int ClickProc(T2TowerDoc*, RECT*, unsigned int&);
+ virtual int GetDestructPartProc(int, POINT, POINT, T2Equip*);
+ virtual PARTCODE GetPartFromPoint(T2TowerDoc*, T2Equip*, POINT, int*);
+ virtual PROCCODE DoBuildProc(T2TowerDoc*, RECT&, unsigned int) {
+ return ProcCode_0;
+ }
+ virtual int FingerToolProc(T2TowerDoc*, T2Equip*, const POINT&, MOUSEEVENT);
+ virtual void BuildFinish(T2TowerDoc*, T2Equip*);
+ virtual unsigned long OptionProc(T2TowerDoc*, T2Equip*, void*);
+ virtual void DrawPeople(T2TowerDoc*, T2Equip*);
+ virtual int GetInfoDialogID(T2TowerDoc*, const T2Equip*) const;
+ virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*, T2Equip*);
+ virtual T2InfoDialog* ConstructInfoDialog(T2Equip*);
+ virtual int EmergencyProc(T2TowerDoc*, T2Equip*) {
+ return 0;
+ }
+ virtual int BurntDownProc(T2TowerDoc*, T2Equip*) {
+ return 0;
+ }
+ virtual void DebugInfo(CWnd&, CListCtrl&, T2Equip*);
+
+ int GetInMoney(int);
+ void GetWords(T2People*, CString&) const;
+
+ int IsSetAttribute(unsigned int a) {
+ return (mAttribute & a) != 0;
+ }
+ int IsAbleDragMaking() { return IsSetAttribute(0x80); }
+ int GetNumOfInMoney() const { return mNumOfInMoney; }
+ int GetEquipType() const { return mToolType; }
+ void CalcEquipRect(RECT& rect) const {
+ rect.top = 0;
+ rect.left = 0;
+ rect.bottom = mHeight;
+ rect.right = mWidth;
+ }
+ int GetCapacity() const { return mCapacity; }
+ unsigned int GetAttribute() const { return mAttribute; }
+
+protected:
+ T2WordDefArray* MakeWordDefArray();
+
+ int mCapacity;
+ int mStress;
+ T2BitImage *m124;
+ T2BitImage *m128;
+ T2WordDefArray *mWordDefArray;
+ T2BitImage *m130;
+ int mOutSpan;
+ int mInSpan;
+ int mNumOfInMoney;
+ int m140;
+ int mInMoney[4];
+ int m154;
+};
diff --git a/src/T2DLL/T2EquipInfoDialog.cpp b/src/T2DLL/T2EquipInfoDialog.cpp
new file mode 100644
index 0000000..7fd307a
--- /dev/null
+++ b/src/T2DLL/T2EquipInfoDialog.cpp
@@ -0,0 +1,7 @@
+#include "T2EquipInfoDialog.h"
+
+T2EquipInfoDialog::T2EquipInfoDialog(T2Equip*) {
+}
+
+/*virtual*/ T2EquipInfoDialog::~T2EquipInfoDialog() {
+}
diff --git a/src/T2DLL/T2EquipInfoDialog.h b/src/T2DLL/T2EquipInfoDialog.h
new file mode 100644
index 0000000..cc6ce0b
--- /dev/null
+++ b/src/T2DLL/T2EquipInfoDialog.h
@@ -0,0 +1,11 @@
+#pragma once
+#include "common.h"
+
+class T2EquipInfoDialog {
+public:
+ T2EquipInfoDialog(T2Equip*);
+ virtual ~T2EquipInfoDialog();
+
+ T2Equip* GetEquip() const {}
+ T2EquipDef* GetEquipDef() const {}
+};
diff --git a/src/T2DLL/T2EquipPlugin.cpp b/src/T2DLL/T2EquipPlugin.cpp
new file mode 100644
index 0000000..bd5fabf
--- /dev/null
+++ b/src/T2DLL/T2EquipPlugin.cpp
@@ -0,0 +1,9 @@
+#include "T2EquipPlugin.h"
+
+T2EquipPlugin::T2EquipPlugin(DWORD type, T2PluginSpecifier& specifier)
+ : T2ToolPlugin(type, specifier)
+{
+}
+
+/*virtual*/ T2EquipPlugin::~T2EquipPlugin() {
+}
diff --git a/src/T2DLL/T2EquipPlugin.h b/src/T2DLL/T2EquipPlugin.h
new file mode 100644
index 0000000..1c60f38
--- /dev/null
+++ b/src/T2DLL/T2EquipPlugin.h
@@ -0,0 +1,9 @@
+#pragma once
+#include "common.h"
+#include "T2ToolPlugin.h"
+
+class T2EquipPlugin : public T2ToolPlugin {
+public:
+ T2EquipPlugin(DWORD type, T2PluginSpecifier& specifier);
+ virtual ~T2EquipPlugin();
+};
diff --git a/src/T2DLL/T2EquipPtrList.cpp b/src/T2DLL/T2EquipPtrList.cpp
new file mode 100644
index 0000000..472790a
--- /dev/null
+++ b/src/T2DLL/T2EquipPtrList.cpp
@@ -0,0 +1,28 @@
+#include "T2EquipPtrList.h"
+
+T2EquipPtrList::T2EquipPtrList(unsigned int) {
+}
+
+/*virtual*/ T2EquipPtrList::~T2EquipPtrList() {
+}
+
+void T2EquipPtrList::AddItem(T2Equip*) {
+}
+
+void T2EquipPtrList::RemoveItem(T2Equip*) {
+}
+
+void T2EquipPtrList::RemoveItem(int) {
+}
+
+int T2EquipPtrList::GetIndex(T2Equip*) {
+}
+
+int T2EquipPtrList::GetIndex(unsigned int) {
+}
+
+T2Equip* T2EquipPtrList::GetItem(int) {
+}
+
+void T2EquipPtrList::SetRelatedTenantID(unsigned int) {
+}
diff --git a/src/T2DLL/T2EquipPtrList.h b/src/T2DLL/T2EquipPtrList.h
new file mode 100644
index 0000000..01241b0
--- /dev/null
+++ b/src/T2DLL/T2EquipPtrList.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+
+class T2EquipPtrList {
+public:
+ T2EquipPtrList(unsigned int);
+ virtual ~T2EquipPtrList();
+ void AddItem(T2Equip*);
+ void RemoveItem(T2Equip*);
+ void RemoveItem(int);
+ int GetIndex(T2Equip*);
+ int GetIndex(unsigned int);
+ T2Equip* GetItem(int);
+ void SetRelatedTenantID(unsigned int);
+
+ unsigned int GetAttribute() const {}
+ T2EquipPtrList(const T2EquipPtrList&) {}
+ T2EquipPtrList& operator=(const T2EquipPtrList&) {}
+ void `default constructor closure'() {}
+};
diff --git a/src/T2DLL/T2EventItem.cpp b/src/T2DLL/T2EventItem.cpp
new file mode 100644
index 0000000..3a83cbb
--- /dev/null
+++ b/src/T2DLL/T2EventItem.cpp
@@ -0,0 +1,79 @@
+#include "T2EventItem.h"
+
+T2EventItem::T2EventItem(T2TowerEvent*, CResFile*, int) {
+}
+
+T2EventItem::T2EventItem(T2TowerEvent*, int, int, int, int, int, int) {
+}
+
+T2EventItem::T2EventItem(T2EventItem*, int) {
+}
+
+/*virtual*/ T2EventItem::~T2EventItem() {
+}
+
+/*virtual*/ void T2EventItem::Init(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2EventItem::Start(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2EventItem::ReStart(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2EventItem::StopEvent(T2TowerDoc*) {
+}
+
+T2WorldDef* T2EventItem::GetWorldDef() {
+}
+
+T2TowerDoc* T2EventItem::GetTowerDoc() const {
+}
+
+T2TowerEvent* T2EventItem::GetTowerEvent() {
+}
+
+int T2EventItem::GetLevelBit() {
+}
+
+int T2EventItem::IsExclusive() {
+}
+
+int T2EventItem::GetCycleDay() {
+}
+
+int T2EventItem::GetBeginTime() {
+}
+
+void T2EventItem::SetBeginTime(int) {
+}
+
+int T2EventItem::GetEndTime() {
+}
+
+/*virtual*/ int T2EventItem::IsBeginTime(unsigned int) {
+}
+
+/*virtual*/ int T2EventItem::IsBeginDay(int) {
+}
+
+int T2EventItem::GetStatus() {
+}
+
+void T2EventItem::SetStatus(int) {
+}
+
+T2EventItem* T2EventItem::GetOriginalDef() {
+}
+
+/*virtual*/ unsigned int T2EventItem::DoDialog(T2TowerDoc*, int, int, int, const char*) {
+}
+
+/*virtual*/ void T2EventItem::DoAlert(T2TowerDoc*, CString&, int) {
+}
+
+/*virtual*/ void T2EventItem::Write(T2Archive&) {
+}
+
+/*virtual*/ void T2EventItem::Read(T2Archive&) {
+}
diff --git a/src/T2DLL/T2EventItem.h b/src/T2DLL/T2EventItem.h
new file mode 100644
index 0000000..e166c22
--- /dev/null
+++ b/src/T2DLL/T2EventItem.h
@@ -0,0 +1,46 @@
+#pragma once
+#include "common.h"
+
+class T2EventItem {
+public:
+ T2EventItem(T2TowerEvent*, CResFile*, int);
+ T2EventItem(T2TowerEvent*, int, int, int, int, int, int);
+ T2EventItem(T2EventItem*, int);
+ virtual ~T2EventItem();
+ virtual void Init(T2TowerDoc*);
+ virtual int Start(T2TowerDoc*);
+ virtual int ReStart(T2TowerDoc*);
+ virtual void StopEvent(T2TowerDoc*);
+ T2WorldDef* GetWorldDef();
+ T2TowerDoc* GetTowerDoc() const;
+ T2TowerEvent* GetTowerEvent();
+ int GetLevelBit();
+ int IsExclusive();
+ int GetCycleDay();
+ int GetBeginTime();
+ void SetBeginTime(int);
+ int GetEndTime();
+ virtual int IsBeginTime(unsigned int);
+ virtual int IsBeginDay(int);
+ int GetStatus();
+ void SetStatus(int);
+ T2EventItem* GetOriginalDef();
+protected:
+ virtual unsigned int DoDialog(T2TowerDoc*, int, int, int, const char*);
+ virtual void DoAlert(T2TowerDoc*, CString&, int);
+public:
+ virtual void Write(T2Archive&);
+ virtual void Read(T2Archive&);
+
+ virtual unsigned long GetID() {}
+ int GetSubID() {}
+ virtual void ViewModeChanged(T2TowerDoc*, VIEWMODE) {}
+ virtual unsigned long OptionProc(unsigned long, void*) {}
+ virtual int IsXEvent() {}
+protected:
+ virtual unsigned int DialogHook(T2EventDialog*, unsigned int, T2TowerDoc*) {}
+ virtual void SetupDialog(T2Dialog*) {}
+public:
+ T2EventItem(const T2EventItem&) {}
+ T2EventItem& operator=(const T2EventItem&) {}
+};
diff --git a/src/T2DLL/T2FInfoAreaIterator.cpp b/src/T2DLL/T2FInfoAreaIterator.cpp
new file mode 100644
index 0000000..c7452ab
--- /dev/null
+++ b/src/T2DLL/T2FInfoAreaIterator.cpp
@@ -0,0 +1,64 @@
+#include "T2FInfoAreaIterator.h"
+
+T2FInfoAreaIterator::T2FInfoAreaIterator(const T2FloorInfo&, const RECT&) {
+}
+
+/*virtual*/ T2FInfoAreaIterator::~T2FInfoAreaIterator() {
+}
+
+void T2FInfoAreaIterator::Reset() {
+}
+
+int T2FInfoAreaIterator::CalcNextUnitInfo() {
+}
+
+int T2FInfoAreaIterator::CurrentV(int&) const {
+}
+
+int T2FInfoAreaIterator::Current(T2UnitInfo*&) {
+}
+
+int T2FInfoAreaIterator::Next(T2UnitInfo*&) {
+}
+
+int T2FInfoAreaIterator::NextTenant(T2Tenant*&) {
+}
+
+void T2FInfoAreaIterator::GetTenantRect(RECT&) {
+}
+
+int T2FInfoAreaIterator::NextRequest(T2Request*&) {
+}
+
+int T2FInfoAreaIterator::NextMover(T2Mover*&) {
+}
+
+T2FInfoPtIterator::T2FInfoPtIterator(const T2FloorInfo&, POINT) {
+}
+
+/*virtual*/ T2FInfoPtIterator::~T2FInfoPtIterator() {
+}
+
+int T2FInfoPtIterator::CurrentH(int&) const {
+}
+
+int T2FInfoPtIterator::CalcRightUnitInfo() {
+}
+
+int T2FInfoPtIterator::CalcLeftUnitInfo() {
+}
+
+int T2FInfoPtIterator::Current(T2UnitInfo*&) {
+}
+
+int T2FInfoPtIterator::Right(T2UnitInfo*&) {
+}
+
+int T2FInfoPtIterator::Left(T2UnitInfo*&) {
+}
+
+int T2FInfoPtIterator::RightTenant(T2Tenant*&) {
+}
+
+int T2FInfoPtIterator::LeftTenant(T2Tenant*&) {
+}
diff --git a/src/T2DLL/T2FInfoAreaIterator.h b/src/T2DLL/T2FInfoAreaIterator.h
new file mode 100644
index 0000000..59ab38e
--- /dev/null
+++ b/src/T2DLL/T2FInfoAreaIterator.h
@@ -0,0 +1,42 @@
+#pragma once
+#include "common.h"
+
+class T2FInfoAreaIterator {
+public:
+ T2FInfoAreaIterator(const T2FloorInfo&, const RECT&);
+ virtual ~T2FInfoAreaIterator();
+ void Reset();
+protected:
+ int CalcNextUnitInfo();
+public:
+ int CurrentV(int&) const;
+ int Current(T2UnitInfo*&);
+ int Next(T2UnitInfo*&);
+ int NextTenant(T2Tenant*&);
+ void GetTenantRect(RECT&);
+ int NextRequest(T2Request*&);
+ int NextMover(T2Mover*&);
+
+ T2FInfoAreaIterator(const T2FInfoAreaIterator&) {}
+protected:
+ int IsValidPosition() const {}
+};
+class T2FInfoPtIterator {
+public:
+ T2FInfoPtIterator(const T2FloorInfo&, POINT);
+ virtual ~T2FInfoPtIterator();
+ int CurrentH(int&) const;
+protected:
+ int CalcRightUnitInfo();
+ int CalcLeftUnitInfo();
+public:
+ int Current(T2UnitInfo*&);
+ int Right(T2UnitInfo*&);
+ int Left(T2UnitInfo*&);
+ int RightTenant(T2Tenant*&);
+ int LeftTenant(T2Tenant*&);
+
+ T2FInfoPtIterator(const T2FInfoPtIterator&) {}
+protected:
+ int IsValidPosition() const {}
+};
diff --git a/src/T2DLL/T2FireBurning.cpp b/src/T2DLL/T2FireBurning.cpp
new file mode 100644
index 0000000..b07e3c9
--- /dev/null
+++ b/src/T2DLL/T2FireBurning.cpp
@@ -0,0 +1,82 @@
+#include "T2FireBurning.h"
+
+T2FireBurning::T2FireBurning(T2TowerEvent*, CResFile*, int) {
+}
+
+/*virtual*/ T2FireBurning::~T2FireBurning() {
+}
+
+/*virtual*/ int T2FireBurning::Start(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2FireBurning::Exec(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2FireBurning::StartEvent(T2TowerDoc*, POINT, const T2Tenant*) {
+}
+
+/*virtual*/ void T2FireBurning::SetupDialog(T2Dialog*) {
+}
+
+/*virtual*/ unsigned int T2FireBurning::DialogHook(T2EventDialog*, unsigned int, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2FireBurning::IdleEvent(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2FireBurning::StopEvent(T2TowerDoc*) {
+}
+
+int T2FireBurning::MakeFire(POINT, T2TowerDoc*) {
+}
+
+int T2FireBurning::AdjustFirePos(T2FloorInfo*, POINT&, RECT&) const {
+}
+
+void T2FireBurning::Extinguish(T2Fire*) {
+}
+
+int T2FireBurning::DoExtinguish(CPoint&) {
+}
+
+void T2FireBurning::CallFireman(T2TowerDoc*, const T2Tenant*) {
+}
+
+int T2FireBurning::IsBreakoutFire(const T2TowerDoc*, POINT&, T2Tenant*&) const {
+}
+
+T2Fire::T2Fire(POINT&, T2TowerDoc*, int, T2ImageObj*) {
+}
+
+T2Fire::~T2Fire() {
+}
+
+void T2Fire::SetFireman(T2People*) {
+}
+
+int T2Fire::Move() {
+}
+
+int T2Fire::HitTest(CPoint&, CRect&) {
+}
+
+int T2Fire::ExtinguishByFireman(T2TowerDoc*, T2PeoplePtrList*) {
+}
+
+T2Helicopter::T2Helicopter(T2TowerDoc*, const T2Tenant*) {
+}
+
+T2Helicopter::~T2Helicopter() {
+}
+
+void T2Helicopter::Move(T2TowerDoc*) {
+}
+
+T2FireAttach::T2FireAttach(T2EventItem*, unsigned int, int) {
+}
+
+/*virtual*/ T2FireAttach::~T2FireAttach() {
+}
+
+/*virtual*/ void T2FireAttach::ExecuteSelf(unsigned int, void*) {
+}
diff --git a/src/T2DLL/T2FireBurning.h b/src/T2DLL/T2FireBurning.h
new file mode 100644
index 0000000..6db462c
--- /dev/null
+++ b/src/T2DLL/T2FireBurning.h
@@ -0,0 +1,67 @@
+#pragma once
+#include "common.h"
+
+class T2FireBurning {
+public:
+ T2FireBurning(T2TowerEvent*, CResFile*, int);
+ virtual ~T2FireBurning();
+ virtual int Start(T2TowerDoc*);
+ virtual int Exec(T2TowerDoc*);
+ virtual void StartEvent(T2TowerDoc*, POINT, const T2Tenant*);
+protected:
+ virtual void SetupDialog(T2Dialog*);
+public:
+ virtual unsigned int DialogHook(T2EventDialog*, unsigned int, T2TowerDoc*);
+ virtual void IdleEvent(T2TowerDoc*);
+ virtual void StopEvent(T2TowerDoc*);
+ int MakeFire(POINT, T2TowerDoc*);
+protected:
+ int AdjustFirePos(T2FloorInfo*, POINT&, RECT&) const;
+public:
+ void Extinguish(T2Fire*);
+ int DoExtinguish(CPoint&);
+protected:
+ void CallFireman(T2TowerDoc*, const T2Tenant*);
+ int IsBreakoutFire(const T2TowerDoc*, POINT&, T2Tenant*&) const;
+
+public:
+ virtual unsigned long GetID() {}
+ int IsEmergency() {}
+ T2FireBurning(const T2FireBurning&) {}
+ T2FireBurning& operator=(const T2FireBurning&) {}
+};
+class T2Fire {
+public:
+ T2Fire(POINT&, T2TowerDoc*, int, T2ImageObj*);
+ ~T2Fire();
+protected:
+ void SetFireman(T2People*);
+public:
+ int Move();
+ int HitTest(CPoint&, CRect&);
+ int ExtinguishByFireman(T2TowerDoc*, T2PeoplePtrList*);
+
+ void SetArsonTenant(T2Tenant*) {}
+ T2Tenant* GetArsonTenant() {}
+ T2People* GetFireman() const {}
+ T2Fire& operator=(const T2Fire&) {}
+};
+class T2Helicopter {
+public:
+ T2Helicopter(T2TowerDoc*, const T2Tenant*);
+ ~T2Helicopter();
+ void Move(T2TowerDoc*);
+
+ T2Helicopter& operator=(const T2Helicopter&) {}
+};
+class T2FireAttach {
+public:
+ T2FireAttach(T2EventItem*, unsigned int, int);
+ virtual ~T2FireAttach();
+protected:
+ virtual void ExecuteSelf(unsigned int, void*);
+
+public:
+ T2FireAttach(const T2FireAttach&) {}
+ T2FireAttach& operator=(const T2FireAttach&) {}
+};
diff --git a/src/T2DLL/T2FireWork.cpp b/src/T2DLL/T2FireWork.cpp
new file mode 100644
index 0000000..abddcf4
--- /dev/null
+++ b/src/T2DLL/T2FireWork.cpp
@@ -0,0 +1,28 @@
+#include "T2FireWork.h"
+
+T2FireWork::T2FireWork(int, int, CPalette*) {
+}
+
+T2FireWork::~T2FireWork() {
+}
+
+T2BitImage* T2FireWork::GetBitImage() {
+}
+
+void T2FireWork::Start() {
+}
+
+void T2FireWork::Stop() {
+}
+
+int T2FireWork::IsDisposable() {
+}
+
+int T2FireWork::Idle() {
+}
+
+int T2FireWork::CalcStarData(FIREWORK_STARINFO*, float, int*, int*, int*, int*) {
+}
+
+void T2FireWork::PutDot(int, int, int, unsigned char) {
+}
diff --git a/src/T2DLL/T2FireWork.h b/src/T2DLL/T2FireWork.h
new file mode 100644
index 0000000..e9e5215
--- /dev/null
+++ b/src/T2DLL/T2FireWork.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "common.h"
+
+class T2FireWork {
+public:
+ T2FireWork(int, int, CPalette*);
+ ~T2FireWork();
+ T2BitImage* GetBitImage();
+ void Start();
+ void Stop();
+ int IsDisposable();
+ int Idle();
+protected:
+ int CalcStarData(FIREWORK_STARINFO*, float, int*, int*, int*, int*);
+ void PutDot(int, int, int, unsigned char);
+
+public:
+ T2FireWork& operator=(const T2FireWork&) {}
+};
diff --git a/src/T2DLL/T2FloorCEArray.cpp b/src/T2DLL/T2FloorCEArray.cpp
new file mode 100644
index 0000000..f12a81a
--- /dev/null
+++ b/src/T2DLL/T2FloorCEArray.cpp
@@ -0,0 +1,7 @@
+#include "T2FloorCEArray.h"
+
+T2FloorCEArray::T2FloorCEArray() {
+}
+
+/*virtual*/ T2FloorCEArray::~T2FloorCEArray() {
+}
diff --git a/src/T2DLL/T2FloorCEArray.h b/src/T2DLL/T2FloorCEArray.h
new file mode 100644
index 0000000..c8a6610
--- /dev/null
+++ b/src/T2DLL/T2FloorCEArray.h
@@ -0,0 +1,11 @@
+#pragma once
+#include "common.h"
+#include "T2RouteCEArray.h"
+
+class T2FloorCEArray : public T2RouteCEArray {
+public:
+ T2FloorCEArray();
+ virtual ~T2FloorCEArray();
+
+ virtual DWORD GetCEClassID() { return 'FCEA'; }
+};
diff --git a/src/T2DLL/T2FloorInfo.cpp b/src/T2DLL/T2FloorInfo.cpp
new file mode 100644
index 0000000..cfbd45b
--- /dev/null
+++ b/src/T2DLL/T2FloorInfo.cpp
@@ -0,0 +1,187 @@
+#include "T2FloorInfo.h"
+
+T2FloorInfo::T2FloorInfo(const T2WorldDef*) {
+}
+
+/*virtual*/ T2FloorInfo::~T2FloorInfo() {
+}
+
+int T2FloorInfo::UnitToFloor(int) const {
+}
+
+void T2FloorInfo::InitMask(CResFile&) {
+}
+
+void T2FloorInfo::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2FloorInfo::Write(T2Archive&) {
+}
+
+int T2FloorInfo::IsValidRange(const RECT&) const {
+}
+
+int T2FloorInfo::IsAreaBuildable(const RECT&) {
+}
+
+int T2FloorInfo::IsAllTenant(const RECT&) {
+}
+
+int T2FloorInfo::IsThereNoFloorTenant(const RECT&) {
+}
+
+int T2FloorInfo::IsThereMover(const RECT&) {
+}
+
+int T2FloorInfo::IsThereOtherKindMover(const RECT&, int) {
+}
+
+int T2FloorInfo::IsEnoughSideSpace(const RECT&) {
+}
+
+T2Tenant* T2FloorInfo::GetTenant(unsigned int) const {
+}
+
+T2Tenant* T2FloorInfo::GetTenant(int, int) const {
+}
+
+T2Tenant* T2FloorInfo::GetPoolTenant() const {
+}
+
+T2Tenant* T2FloorInfo::GetFloor(int, int) const {
+}
+
+T2Mover* T2FloorInfo::GetMover(unsigned int) {
+}
+
+T2Mover* T2FloorInfo::GetMover(int, int) {
+}
+
+T2MoverModule* T2FloorInfo::GetModule(unsigned int) const {
+}
+
+T2Request* T2FloorInfo::GetRequest(unsigned int) const {
+}
+
+T2Request* T2FloorInfo::GetRequest(int, int) const {
+}
+
+T2People* T2FloorInfo::FindPeople(int, int) const {
+}
+
+T2OutObj* T2FloorInfo::GetOutObj(int, int) const {
+}
+
+T2OutObj* T2FloorInfo::GetIndOutObj(unsigned int) const {
+}
+
+T2Tenant* T2FloorInfo::FindUnusedTenant() {
+}
+
+T2Mover* T2FloorInfo::FindUnusedMover() {
+}
+
+T2Request* T2FloorInfo::FindUnusedRequest() {
+}
+
+T2OutObj* T2FloorInfo::FindUnusedOutObj() {
+}
+
+unsigned int T2FloorInfo::GetTenantID(int, int) const {
+}
+
+unsigned int T2FloorInfo::GetFloorID(int, int) {
+}
+
+unsigned int T2FloorInfo::GetEntranceFloorID(unsigned int) {
+}
+
+POINT T2FloorInfo::GetEntrancePt(unsigned int) {
+}
+
+unsigned int T2FloorInfo::GetMoverID(int, int) {
+}
+
+unsigned int T2FloorInfo::GetRequestID(int, int) const {
+}
+
+unsigned int T2FloorInfo::GetOutObjID(int, int) const {
+}
+
+T2UnitInfo* T2FloorInfo::GetUnitInfo(int, int) const {
+}
+
+void T2FloorInfo::FillTenantID(const RECT&, unsigned int) {
+}
+
+void T2FloorInfo::ReplaceFloorID(const RECT&, unsigned int, unsigned int) {
+}
+
+void T2FloorInfo::FillMoverID(const RECT&, unsigned int) {
+}
+
+void T2FloorInfo::FillRequestID(const RECT&, unsigned int) {
+}
+
+int T2FloorInfo::FillRequestID(POINT, ERequestUpDown, unsigned int) {
+}
+
+void T2FloorInfo::RemoveRequestID(ERequestUpDown, const RECT&) {
+}
+
+void T2FloorInfo::FillOutObjID(const RECT&, unsigned int) {
+}
+
+unsigned int T2FloorInfo::FindTenantID(int, int, int, int, unsigned int) {
+}
+
+int T2FloorInfo::CalcRequestRightEnd(POINT, int) {
+}
+
+int T2FloorInfo::CalcRequestLeftEnd(POINT, int) {
+}
+
+int T2FloorInfo::GetLeftMoverID(POINT, int) const {
+}
+
+void T2FloorInfo::UpdeteRequestByUnionFloor(T2Tenant*, POINT) {
+}
+
+void T2FloorInfo::MoverAreaAdded(const RECT&, unsigned int) {
+}
+
+void T2FloorInfo::MoverAreaRemoved(const RECT&) {
+}
+
+void T2FloorInfo::UpdeteRequestByBuildMover(const RECT&) {
+}
+
+void T2FloorInfo::UpdeteRequestByRemoveMover(const RECT&) {
+}
+
+unsigned int T2FloorInfo::GetNextTenantNumber(int) {
+}
+
+void T2FloorInfo::SetTenantNumber(int, unsigned int) {
+}
+
+T2Tenant* T2FloorInfo::FindNumberredTenant(int, unsigned int) {
+}
+
+void T2FloorInfo::FinishBuildFloor(T2TowerDoc*, const RECT&) {
+}
+
+void T2FloorInfo::SetTenantDrawModeByRect(const RECT&, int) {
+}
+
+void T2FloorInfo::UpdateFloorCEArray(const RECT&, unsigned int, unsigned int) {
+}
+
+int T2FloorInfo::CalcMentenanceCost(T2TowerDoc*) const {
+}
+
+T2Tenant* T2FloorInfo::GetTenantByPID(unsigned long) {
+}
+
+int T2FloorInfo::BuildFinishForce(const RECT&) {
+}
diff --git a/src/T2DLL/T2FloorInfo.h b/src/T2DLL/T2FloorInfo.h
new file mode 100644
index 0000000..b292900
--- /dev/null
+++ b/src/T2DLL/T2FloorInfo.h
@@ -0,0 +1,86 @@
+#pragma once
+#include "common.h"
+
+class T2FloorInfo {
+public:
+ T2FloorInfo(const T2WorldDef*);
+ virtual ~T2FloorInfo();
+ int UnitToFloor(int) const;
+ void InitMask(CResFile&);
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+protected:
+ int IsValidRange(const RECT&) const;
+public:
+ int IsAreaBuildable(const RECT&);
+ int IsAllTenant(const RECT&);
+ int IsThereNoFloorTenant(const RECT&);
+ int IsThereMover(const RECT&);
+ int IsThereOtherKindMover(const RECT&, int);
+ int IsEnoughSideSpace(const RECT&);
+ T2Tenant* GetTenant(unsigned int) const;
+ T2Tenant* GetTenant(int, int) const;
+ T2Tenant* GetPoolTenant() const;
+ T2Tenant* GetFloor(int, int) const;
+ T2Mover* GetMover(unsigned int);
+ T2Mover* GetMover(int, int);
+ T2MoverModule* GetModule(unsigned int) const;
+ T2Request* GetRequest(unsigned int) const;
+ T2Request* GetRequest(int, int) const;
+ T2People* FindPeople(int, int) const;
+ T2OutObj* GetOutObj(int, int) const;
+ T2OutObj* GetIndOutObj(unsigned int) const;
+ T2Tenant* FindUnusedTenant();
+ T2Mover* FindUnusedMover();
+ T2Request* FindUnusedRequest();
+ T2OutObj* FindUnusedOutObj();
+ unsigned int GetTenantID(int, int) const;
+ unsigned int GetFloorID(int, int);
+ unsigned int GetEntranceFloorID(unsigned int);
+ POINT GetEntrancePt(unsigned int);
+ unsigned int GetMoverID(int, int);
+ unsigned int GetRequestID(int, int) const;
+ unsigned int GetOutObjID(int, int) const;
+ T2UnitInfo* GetUnitInfo(int, int) const;
+ void FillTenantID(const RECT&, unsigned int);
+ void ReplaceFloorID(const RECT&, unsigned int, unsigned int);
+ void FillMoverID(const RECT&, unsigned int);
+ void FillRequestID(const RECT&, unsigned int);
+ int FillRequestID(POINT, ERequestUpDown, unsigned int);
+ void RemoveRequestID(ERequestUpDown, const RECT&);
+ void FillOutObjID(const RECT&, unsigned int);
+ unsigned int FindTenantID(int, int, int, int, unsigned int);
+protected:
+ int CalcRequestRightEnd(POINT, int);
+ int CalcRequestLeftEnd(POINT, int);
+public:
+ int GetLeftMoverID(POINT, int) const;
+ void UpdeteRequestByUnionFloor(T2Tenant*, POINT);
+ void MoverAreaAdded(const RECT&, unsigned int);
+ void MoverAreaRemoved(const RECT&);
+ void UpdeteRequestByBuildMover(const RECT&);
+ void UpdeteRequestByRemoveMover(const RECT&);
+ unsigned int GetNextTenantNumber(int);
+ void SetTenantNumber(int, unsigned int);
+ T2Tenant* FindNumberredTenant(int, unsigned int);
+ void FinishBuildFloor(T2TowerDoc*, const RECT&);
+ void SetTenantDrawModeByRect(const RECT&, int);
+ void UpdateFloorCEArray(const RECT&, unsigned int, unsigned int);
+ int CalcMentenanceCost(T2TowerDoc*) const;
+ T2Tenant* GetTenantByPID(unsigned long);
+ int BuildFinishForce(const RECT&);
+
+ int GetVRange() const {}
+ int GetHRange() const {}
+ int GetGroundLine() const {}
+ int GetTopFloorLine() const {}
+ int GetBottomFloorLine() const {}
+ int GetEntranceWidth() const {}
+ void GetBuildArea(RECT&) const {}
+ void GetFloorArea(RECT&) const {}
+ T2TenantArrayList* GetTenantArrayList() const {}
+ T2MoverArrayList* GetMoverArrayList() const {}
+ T2RequestArrayList* GetRequestArrayList() const {}
+ T2OutObjArrayList* GetOutObjArrayList() const {}
+ T2OutsideInfo* GetOutsideInfo() const {}
+};
diff --git a/src/T2DLL/T2FloorNumberTable.cpp b/src/T2DLL/T2FloorNumberTable.cpp
new file mode 100644
index 0000000..4a49252
--- /dev/null
+++ b/src/T2DLL/T2FloorNumberTable.cpp
@@ -0,0 +1,40 @@
+#include "T2FloorNumberTable.h"
+
+T2FloorNumberTable::T2FloorNumberTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2FloorNumberTable::~T2FloorNumberTable() {
+}
+
+/*virtual*/ int T2FloorNumberTable::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
+
+void T2FloorNumberTable::SetMover(T2Mover*) {
+}
+
+void T2FloorNumberTable::SetMoverModuleTable(T2MoverModuleTable*) {
+}
+
+int T2FloorNumberTable::GetVScrValue() {
+}
+
+void T2FloorNumberTable::ClickCell(const TableCellT&, POINT) {
+}
+
+void T2FloorNumberTable::RefreshCell(int) {
+}
+
+/*virtual*/ void T2FloorNumberTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ int T2FloorNumberTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2FloorNumberTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2FloorNumberTable::OnT2DlgItemLButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2FloorNumberTable::OnT2DlgItemMouseMove(unsigned int, CPoint) {
+}
diff --git a/src/T2DLL/T2FloorNumberTable.h b/src/T2DLL/T2FloorNumberTable.h
new file mode 100644
index 0000000..cd4d18f
--- /dev/null
+++ b/src/T2DLL/T2FloorNumberTable.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "common.h"
+
+class T2FloorNumberTable {
+public:
+ T2FloorNumberTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2FloorNumberTable();
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+ void SetMover(T2Mover*);
+ void SetMoverModuleTable(T2MoverModuleTable*);
+protected:
+ int GetVScrValue();
+public:
+ void ClickCell(const TableCellT&, POINT);
+ void RefreshCell(int);
+protected:
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual void OnT2DlgItemLButtonUp(unsigned int, CPoint);
+ virtual void OnT2DlgItemMouseMove(unsigned int, CPoint);
+};
diff --git a/src/T2DLL/T2FloorPtrList.cpp b/src/T2DLL/T2FloorPtrList.cpp
new file mode 100644
index 0000000..b72c96f
--- /dev/null
+++ b/src/T2DLL/T2FloorPtrList.cpp
@@ -0,0 +1,10 @@
+#include "T2FloorPtrList.h"
+
+T2FloorPtrList::T2FloorPtrList(T2TenantArrayList*) {
+}
+
+/*virtual*/ T2FloorPtrList::~T2FloorPtrList() {
+}
+
+int T2FloorPtrList::CalcDistance(int, int) {
+}
diff --git a/src/T2DLL/T2FloorPtrList.h b/src/T2DLL/T2FloorPtrList.h
new file mode 100644
index 0000000..43eb021
--- /dev/null
+++ b/src/T2DLL/T2FloorPtrList.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class T2FloorPtrList {
+public:
+ T2FloorPtrList(T2TenantArrayList*);
+ virtual ~T2FloorPtrList();
+ int CalcDistance(int, int);
+
+ T2FloorPtrList(const T2FloorPtrList&) {}
+ T2FloorPtrList& operator=(const T2FloorPtrList&) {}
+};
diff --git a/src/T2DLL/T2GlobalData.cpp b/src/T2DLL/T2GlobalData.cpp
new file mode 100644
index 0000000..549230d
--- /dev/null
+++ b/src/T2DLL/T2GlobalData.cpp
@@ -0,0 +1,28 @@
+#include "T2GlobalData.h"
+
+T2GlobalData::T2GlobalData() {
+}
+
+/*virtual*/ T2GlobalData::~T2GlobalData() {
+}
+
+void T2GlobalData::Set1stCinemaDate(int) {
+}
+
+void T2GlobalData::RegistMovie(unsigned long, int) {
+}
+
+int T2GlobalData::GetMovieParam(unsigned long) {
+}
+
+void T2GlobalData::Read(T2Archive&) {
+}
+
+void T2GlobalData::Write(T2Archive&) {
+}
+
+int T2GlobalData::IsCheckSerial() {
+}
+
+int T2GlobalData::Check_Serial(char*) {
+}
diff --git a/src/T2DLL/T2GlobalData.h b/src/T2DLL/T2GlobalData.h
new file mode 100644
index 0000000..5f4f8a3
--- /dev/null
+++ b/src/T2DLL/T2GlobalData.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "common.h"
+
+class T2GlobalData {
+public:
+ T2GlobalData();
+ virtual ~T2GlobalData();
+ void Set1stCinemaDate(int);
+ void RegistMovie(unsigned long, int);
+ int GetMovieParam(unsigned long);
+protected:
+ void Read(T2Archive&);
+ void Write(T2Archive&);
+public:
+ int IsCheckSerial();
+protected:
+ int Check_Serial(char*);
+
+public:
+ int Get1stCinemaDate() {}
+ T2GlobalData(const T2GlobalData&) {}
+ T2GlobalData& operator=(const T2GlobalData&) {}
+};
diff --git a/src/T2DLL/T2GuestroomTable.cpp b/src/T2DLL/T2GuestroomTable.cpp
new file mode 100644
index 0000000..e7dbf5b
--- /dev/null
+++ b/src/T2DLL/T2GuestroomTable.cpp
@@ -0,0 +1,115 @@
+#include "T2GuestroomTable.h"
+
+/*virtual*/ int T2GuestroomTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+T2GuestroomTable::T2GuestroomTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2GuestroomTable::~T2GuestroomTable() {
+}
+
+/*virtual*/ void T2GuestroomTable::Add(T2GuestroomItem*) {
+}
+
+/*virtual*/ void T2GuestroomTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ void T2GuestroomTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2GuestroomTable::ClickCell(const TableCellT&, const CPoint&) {
+}
+
+/*virtual*/ void T2GuestroomTable::AddList(T2Tenant*, int) {
+}
+
+/*virtual*/ void T2GuestroomTable::ValidRelation() {
+}
+
+/*virtual*/ void T2GuestroomTable::RevertRelation() {
+}
+
+/*virtual*/ void T2GuestroomTable::ResetRoomList(int) {
+}
+
+/*virtual*/ int T2GuestroomTable::CountRooms(int, int) {
+}
+
+/*virtual*/ void T2GuestroomTable::ToggleRelation(const TableCellT&, int) {
+}
+
+/*virtual*/ void T2GuestroomTable::SetInMoneyIndex(int) {
+}
+
+/*virtual*/ int T2GuestroomTable::GetInMoneyIndex(int) {
+}
+
+/*virtual*/ int T2GuestroomTable::CalcInMoney(int) {
+}
+
+void T2GuestroomTable::UpdateTenantEstimation(T2TowerDoc*, int) {
+}
+
+/*virtual*/ void T2GuestroomTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ int T2GuestroomTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+T2GuestroomItem::T2GuestroomItem(T2Tenant*, int, long) {
+}
+
+int T2GuestroomItem::GetRoomNumber() {
+}
+
+int T2GuestroomItem::GetRoomStatus() {
+}
+
+int T2GuestroomItem::GetCapacity() {
+}
+
+int T2GuestroomItem::GetRoomType() {
+}
+
+/*static*/ int T2GuestroomItem::GetRoomType(T2Tenant*) {
+}
+
+void T2GuestroomItem::ToggleRelation(int) {
+}
+
+int T2GuestroomItem::IsRelation() {
+}
+
+int T2GuestroomItem::WasRelation() {
+}
+
+void T2GuestroomItem::ValidRelation() {
+}
+
+void T2GuestroomItem::InvalidRelation() {
+}
+
+void T2GuestroomItem::RevertRelation() {
+}
+
+int T2GuestroomItem::IsFreeRelation() {
+}
+
+int T2GuestroomItem::IsStay() {
+}
+
+void T2GuestroomItem::SetInMoneyIndex(int) {
+}
+
+int T2GuestroomItem::GetInMoneyIndex() {
+}
+
+int T2GuestroomItem::GetInMoney() {
+}
+
+int T2GuestroomItem::GetOutMoney() {
+}
+
+void T2GuestroomItem::UpdateTenantEstimation(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2GuestroomTable.h b/src/T2DLL/T2GuestroomTable.h
new file mode 100644
index 0000000..5b515da
--- /dev/null
+++ b/src/T2DLL/T2GuestroomTable.h
@@ -0,0 +1,57 @@
+#pragma once
+#include "common.h"
+
+class T2GuestroomTable {
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+public:
+ T2GuestroomTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2GuestroomTable();
+ virtual void Add(T2GuestroomItem*);
+protected:
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+ virtual void DrawCell(CDC*, const TableCellT&);
+ virtual void ClickCell(const TableCellT&, const CPoint&);
+public:
+ virtual void AddList(T2Tenant*, int);
+ virtual void ValidRelation();
+ virtual void RevertRelation();
+ virtual void ResetRoomList(int);
+ virtual int CountRooms(int, int);
+ virtual void ToggleRelation(const TableCellT&, int);
+ virtual void SetInMoneyIndex(int);
+ virtual int GetInMoneyIndex(int);
+ virtual int CalcInMoney(int);
+ void UpdateTenantEstimation(T2TowerDoc*, int);
+protected:
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+
+public:
+ virtual void SetFront(unsigned int) {}
+};
+class T2GuestroomItem {
+public:
+ T2GuestroomItem(T2Tenant*, int, long);
+ int GetRoomNumber();
+ int GetRoomStatus();
+ int GetCapacity();
+ int GetRoomType();
+ static int GetRoomType(T2Tenant*);
+ void ToggleRelation(int);
+ int IsRelation();
+ int WasRelation();
+ void ValidRelation();
+ void InvalidRelation();
+ void RevertRelation();
+ int IsFreeRelation();
+ int IsStay();
+ void SetInMoneyIndex(int);
+ int GetInMoneyIndex();
+ int GetInMoney();
+ int GetOutMoney();
+ void UpdateTenantEstimation(T2TowerDoc*);
+
+ T2Tenant* GetTenant() {}
+ T2GuestroomItem& operator=(const T2GuestroomItem&) {}
+};
diff --git a/src/T2DLL/T2HallEventPlugin.cpp b/src/T2DLL/T2HallEventPlugin.cpp
new file mode 100644
index 0000000..8001663
--- /dev/null
+++ b/src/T2DLL/T2HallEventPlugin.cpp
@@ -0,0 +1,16 @@
+#include "T2HallEventPlugin.h"
+
+T2HallEventPlugin::T2HallEventPlugin(unsigned long, T2PluginSpecifier&) {
+}
+
+/*virtual*/ T2HallEventPlugin::~T2HallEventPlugin() {
+}
+
+/*virtual*/ void T2HallEventPlugin::LoadRsrcFromStream(CResFile&) {
+}
+
+void T2HallEventPlugin::UnfoldPluginSelf() {
+}
+
+/*virtual*/ unsigned long T2HallEventPlugin::LoadSelf() {
+}
diff --git a/src/T2DLL/T2HallEventPlugin.h b/src/T2DLL/T2HallEventPlugin.h
new file mode 100644
index 0000000..61cafdd
--- /dev/null
+++ b/src/T2DLL/T2HallEventPlugin.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2HallEventPlugin {
+public:
+ T2HallEventPlugin(unsigned long, T2PluginSpecifier&);
+ virtual ~T2HallEventPlugin();
+protected:
+ virtual void LoadRsrcFromStream(CResFile&);
+public:
+ void UnfoldPluginSelf();
+ virtual unsigned long LoadSelf();
+
+ unsigned int GetRsrcType() {}
+ virtual int GetBindTime() {}
+ T2HallEventPlugin& operator=(T2HallEventPlugin&) {}
+};
diff --git a/src/T2DLL/T2HallEventTable.cpp b/src/T2DLL/T2HallEventTable.cpp
new file mode 100644
index 0000000..d77a1a9
--- /dev/null
+++ b/src/T2DLL/T2HallEventTable.cpp
@@ -0,0 +1,64 @@
+#include "T2HallEventTable.h"
+
+/*virtual*/ int T2HallEventTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+T2HallEventTable::T2HallEventTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2HallEventTable::~T2HallEventTable() {
+}
+
+/*virtual*/ void T2HallEventTable::Add(T2HallEventPlugin*) {
+}
+
+/*virtual*/ void T2HallEventTable::Add(const char*) {
+}
+
+/*virtual*/ void T2HallEventTable::Add(CFilePluginList*) {
+}
+
+/*virtual*/ void T2HallEventTable::SetCellData(const TableCellT&, T2HallEventPlugin*, const char*) {
+}
+
+/*virtual*/ void T2HallEventTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ void T2HallEventTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2HallEventTable::ClickCell(const TableCellT&, const CPoint&) {
+}
+
+/*virtual*/ void T2HallEventTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ int T2HallEventTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ int T2MonthlyTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+T2MonthlyTable::T2MonthlyTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2MonthlyTable::~T2MonthlyTable() {
+}
+
+void T2MonthlyTable::SetStartMonth(T2TowerDoc*, int) {
+}
+
+/*virtual*/ void T2MonthlyTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ void T2MonthlyTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+void T2MonthlyTable::ClickCell(const TableCellT&, const CPoint&) {
+}
+
+/*virtual*/ void T2MonthlyTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ int T2MonthlyTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
diff --git a/src/T2DLL/T2HallEventTable.h b/src/T2DLL/T2HallEventTable.h
new file mode 100644
index 0000000..d46219f
--- /dev/null
+++ b/src/T2DLL/T2HallEventTable.h
@@ -0,0 +1,39 @@
+#pragma once
+#include "common.h"
+
+class T2HallEventTable {
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+public:
+ T2HallEventTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2HallEventTable();
+ virtual void Add(T2HallEventPlugin*);
+ virtual void Add(const char*);
+ virtual void Add(CFilePluginList*);
+ virtual void SetCellData(const TableCellT&, T2HallEventPlugin*, const char*);
+protected:
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+ virtual void DrawCell(CDC*, const TableCellT&);
+ virtual void ClickCell(const TableCellT&, const CPoint&);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+
+public:
+ void SetUserCon(int) {}
+protected:
+ int GetUserCon() {}
+};
+class T2MonthlyTable {
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+public:
+ T2MonthlyTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2MonthlyTable();
+ void SetStartMonth(T2TowerDoc*, int);
+protected:
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+ virtual void DrawCell(CDC*, const TableCellT&);
+ void ClickCell(const TableCellT&, const CPoint&);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+};
diff --git a/src/T2DLL/T2HaveOutViewObject.cpp b/src/T2DLL/T2HaveOutViewObject.cpp
new file mode 100644
index 0000000..992d575
--- /dev/null
+++ b/src/T2DLL/T2HaveOutViewObject.cpp
@@ -0,0 +1,68 @@
+#include "T2HaveOutViewObject.h"
+#include "T2ToolDef.h"
+#include "T2TowerDoc.h"
+
+T2HaveOutViewObject::T2HaveOutViewObject() {
+ mToolDef = NULL;
+ mRefCon = 0;
+ mSubPlugin = NULL;
+ mValiation = 0;
+}
+
+/*virtual*/ T2HaveOutViewObject::~T2HaveOutViewObject() {
+}
+
+int T2HaveOutViewObject::GetRefCon() {
+ return mRefCon;
+}
+
+void T2HaveOutViewObject::SetRefCon(int refCon) {
+ mRefCon = refCon;
+}
+
+CResourcePlugin* T2HaveOutViewObject::GetSubPlugin() const {
+ return mSubPlugin;
+}
+
+void T2HaveOutViewObject::SetSubPlugin(CResourcePlugin* plugin) {
+ mSubPlugin = plugin;
+}
+
+T2ToolDef* T2HaveOutViewObject::GetToolDef() const {
+ return mToolDef;
+}
+
+void T2HaveOutViewObject::SetToolDef(T2ToolDef* toolDef) {
+ mToolDef = toolDef;
+}
+
+/*virtual*/ void T2HaveOutViewObject::DrawOutView(T2TowerDoc*, const RECT&) {
+}
+
+/*virtual*/ void T2HaveOutViewObject::SetUsed(int used) {
+ T2Object::SetUsed(used);
+
+ if (GetToolDef()) {
+ if (used)
+ GetToolDef()->DoStartUse();
+ else
+ GetToolDef()->DoEndUse();
+ }
+}
+
+/*virtual*/ void T2HaveOutViewObject::InitLoaded() {
+ T2Object::InitLoaded();
+
+ if (IsUsed() && GetToolDef())
+ GetToolDef()->DoStartUse();
+}
+
+int T2HaveOutViewObject::CalcMentenanceCost(T2TowerDoc* towerDoc) const {
+ int cost = 0;
+#line 144
+ ASSERT(mToolDef);
+
+ cost = mToolDef->CalcMentenanceCostProc(this);
+ towerDoc->DoPayTool(cost, 0, mToolDef);
+ return cost;
+}
diff --git a/src/T2DLL/T2HaveOutViewObject.h b/src/T2DLL/T2HaveOutViewObject.h
new file mode 100644
index 0000000..f0508a5
--- /dev/null
+++ b/src/T2DLL/T2HaveOutViewObject.h
@@ -0,0 +1,29 @@
+#pragma once
+#include "common.h"
+#include "T2DrawableObject.h"
+
+class T2HaveOutViewObject : public T2DrawableObject {
+public:
+ T2HaveOutViewObject();
+ virtual ~T2HaveOutViewObject();
+ virtual void DrawOutView(T2TowerDoc*, const RECT&);
+
+ int GetRefCon();
+ void SetRefCon(int);
+ CResourcePlugin* GetSubPlugin() const;
+ void SetSubPlugin(CResourcePlugin*);
+ T2ToolDef* GetToolDef() const;
+ void SetToolDef(T2ToolDef*);
+ int CalcMentenanceCost(T2TowerDoc*) const;
+
+ unsigned int GetValiation() const { return mValiation; }
+
+protected:
+ virtual void SetUsed(int);
+ virtual void InitLoaded();
+
+ T2ToolDef *mToolDef;
+ int mRefCon;
+ CResourcePlugin *mSubPlugin;
+ unsigned int mValiation;
+};
diff --git a/src/T2DLL/T2ImageObj.cpp b/src/T2DLL/T2ImageObj.cpp
new file mode 100644
index 0000000..cea6308
--- /dev/null
+++ b/src/T2DLL/T2ImageObj.cpp
@@ -0,0 +1,394 @@
+#include "GlobalFunc.h"
+#include "T2BitImage.h"
+#include "T2ImageObj.h"
+
+T2ImageObj::T2ImageObj() {
+ mCount = 0;
+ mHandle = GlobalAlloc(GHND, 1);
+ mData = (ObjectData *) GlobalLock(mHandle);
+}
+
+/*virtual*/ T2ImageObj::~T2ImageObj() {
+ GlobalUnlock(mHandle);
+ GlobalFree(mHandle);
+}
+
+void T2ImageObj::AddObject(HINSTANCE instance, unsigned int resourceID, T2BitImage* image) {
+#line 36
+ _ASSERT(image);
+
+ HRSRC rsrc = FindResource(instance, MAKEINTRESOURCE(resourceID), "OBJMAP");
+ if (!rsrc) {
+ CString nameStr;
+ nameStr.Format("%d", resourceID);
+
+ CString err = "T2ImageObj::AddObject ERROR : " + nameStr + " @" + GetModuleName(instance) + "\n";
+ OutputDebugString(err);
+ }
+
+#line 45
+ _ASSERT(rsrc);
+
+ HGLOBAL h = LoadResource(instance, rsrc);
+#line 47
+ _ASSERT(h);
+
+ void *resData = LockResource(h);
+ DWORD size = SizeofResource(instance, rsrc);
+ char *buffer = (char *) malloc(size);
+ memcpy(buffer, resData, size);
+ UnlockResource(h);
+ FreeResource(h);
+
+ char *token = strtok(buffer, " \t\r\n\x1A");
+ while (token) {
+ if (!_stricmp(token, "End"))
+ break;
+
+ if (!_stricmp(token, "DefParts")) {
+ mCount++;
+ mHandle = GlobalReAlloc(mHandle, mCount * sizeof(ObjectData), GHND);
+ mData = (ObjectData *) GlobalLock(mHandle);
+ memset(&mData[mCount - 1], 0, sizeof(ObjectData));
+
+ mData[mCount - 1].image = image;
+ strcpy(mData[mCount - 1].name, "");
+ mData[mCount - 1].id = 0;
+ mData[mCount - 1].pattern = -1;
+ mData[mCount - 1].grade = 0;
+ mData[mCount - 1].span = 0;
+ mData[mCount - 1].offset = -1;
+ } else if (!_stricmp(token, "Name")) {
+ strcpy(mData[mCount - 1].name, strtok(NULL, "\t\r\n\x1A"));
+ } else if (!_stricmp(token, "ID")) {
+ mData[mCount - 1].id = atoi(strtok(NULL, " \t\r\n\x1A"));
+ } else if (!_stricmp(token, "Pattern")) {
+ mData[mCount - 1].pattern = atoi(strtok(NULL, " \t\r\n\x1A"));
+ } else if (!_stricmp(token, "Grade")) {
+ mData[mCount - 1].grade = atoi(strtok(NULL, " \t\r\n\x1A"));
+ } else if (!_stricmp(token, "Span")) {
+ mData[mCount - 1].span = atoi(strtok(NULL, " \t\r\n\x1A"));
+ } else if (!_stricmp(token, "Offset")) {
+ mData[mCount - 1].offset = atoi(strtok(NULL, " \t\r\n\x1A"));
+ } else if (!_stricmp(token, "Roof")) {
+ if (!_stricmp(strtok(NULL, " \t\r\n\x1A"), "Yes"))
+ mData[mCount - 1].roof = true;
+ } else if (!_stricmp(token, "Floor")) {
+ if (!_stricmp(strtok(NULL, " \t\r\n\x1A"), "Yes"))
+ mData[mCount - 1].floor = true;
+ } else if (!_stricmp(token, "List")) {
+ // nothing
+ } else if (!_stricmp(token, "Loop")) {
+ mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].flags |= SPD_LOOP;
+ } else if (!_stricmp(token, "Transparent")) {
+ mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].flags |= SPD_TRANSPARENT;
+ } else if (!_stricmp(token, "Halftone")) {
+ mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].flags |= SPD_HALFTONE;
+ } else if (!_stricmp(token, "Rect")) {
+ mData[mCount - 1].subPartCount++;
+ mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].flags = SPD_RECT;
+
+ char *argToken = strtok(NULL, " \t\r\n\x1A");
+ char *arg = (char *) malloc(strlen(argToken) + 1);
+ strcpy(arg, argToken);
+
+ char *p;
+ while ((p = strchr(arg, ',')))
+ *p = ' ';
+
+ sscanf(
+ arg,
+ "%hd %hd %hd %hd",
+ &mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].left,
+ &mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].top,
+ &mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].right,
+ &mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].bottom
+ );
+
+ free(arg);
+ } else if (!_stricmp(token, "Parts")) {
+ char *argToken = strtok(NULL, " \t\r\n\x1A");
+ if (argToken[0] != '#') {
+ int i;
+ for (i = 0; i < (mCount - 1); i++) {
+ if (!strcmp(mData[i].name, argToken)) {
+ mData[mCount - 1].subPartCount++;
+ mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].flags = SPD_PARTS_BY_NAME;
+ mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].partIndex = i;
+ break;
+ }
+ }
+
+ if (i == (mCount - 1)) {
+ char buf[256];
+ wsprintf(buf, "Undefined parts [%s]", argToken);
+ MessageBox(NULL, buf, "ERROR", MB_OK | MB_ICONWARNING | MB_TASKMODAL);
+ }
+ } else {
+ mData[mCount - 1].subPartCount++;
+ mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].flags = SPD_PARTS_BY_ID;
+ mData[mCount - 1].subParts[mData[mCount - 1].subPartCount - 1].objectID = atoi(&argToken[1]);
+ }
+ } else if (token[0] == '#') {
+ // nothing
+ } else {
+ char buf[256];
+ wsprintf(buf, "Undefined token [%s]", token);
+ MessageBox(NULL, buf, "ERROR", MB_OK | MB_ICONWARNING | MB_TASKMODAL);
+ }
+
+ token = strtok(NULL, " \t\r\n\x1A");
+ }
+
+ free(buffer);
+}
+
+void T2ImageObj::AddObject(const char* name, int pattern, T2BitImage& image, const RECT* rect, BOOL transparent, BOOL halftoneMode) {
+ mCount++;
+ mHandle = GlobalReAlloc(mHandle, mCount * sizeof(ObjectData), GHND);
+ mData = (ObjectData *) GlobalLock(mHandle);
+ memset(&mData[mCount - 1], 0, sizeof(ObjectData));
+
+ mData[mCount - 1].image = &image;
+ strcpy(mData[mCount - 1].name, name);
+ mData[mCount - 1].id = 0;
+ mData[mCount - 1].pattern = pattern;
+ mData[mCount - 1].grade = 0;
+ mData[mCount - 1].span = 0;
+ mData[mCount - 1].offset = -1;
+ mData[mCount - 1].subPartCount = 1;
+ mData[mCount - 1].subParts[0].flags =
+ SPD_RECT |
+ (transparent ? SPD_TRANSPARENT : 0) |
+ (halftoneMode ? SPD_HALFTONE : 0);
+
+ if (rect) {
+ mData[mCount - 1].subParts[0].top = rect->top;
+ mData[mCount - 1].subParts[0].left = rect->left;
+ mData[mCount - 1].subParts[0].bottom = rect->bottom;
+ mData[mCount - 1].subParts[0].right = rect->right;
+ } else {
+ mData[mCount - 1].subParts[0].top = 0;
+ mData[mCount - 1].subParts[0].left = 0;
+ mData[mCount - 1].subParts[0].bottom = abs(image.mBitmap.header.biHeight);
+ mData[mCount - 1].subParts[0].right = abs(image.mBitmap.header.biWidth);
+ }
+}
+
+void T2ImageObj::AddObject(int id, int pattern, T2BitImage& image, const RECT* rect, BOOL transparent, BOOL halftoneMode) {
+ mCount++;
+ mHandle = GlobalReAlloc(mHandle, mCount * sizeof(ObjectData), GHND);
+ mData = (ObjectData *) GlobalLock(mHandle);
+ memset(&mData[mCount - 1], 0, sizeof(ObjectData));
+
+ mData[mCount - 1].image = &image;
+ strcpy(mData[mCount - 1].name, "");
+ mData[mCount - 1].id = id;
+ mData[mCount - 1].pattern = pattern;
+ mData[mCount - 1].grade = 0;
+ mData[mCount - 1].span = 0;
+ mData[mCount - 1].offset = -1;
+ mData[mCount - 1].subPartCount = 1;
+ mData[mCount - 1].subParts[0].flags =
+ SPD_RECT |
+ (transparent ? SPD_TRANSPARENT : 0) |
+ (halftoneMode ? SPD_HALFTONE : 0);
+
+ if (rect) {
+ mData[mCount - 1].subParts[0].top = rect->top;
+ mData[mCount - 1].subParts[0].left = rect->left;
+ mData[mCount - 1].subParts[0].bottom = rect->bottom;
+ mData[mCount - 1].subParts[0].right = rect->right;
+ } else {
+ mData[mCount - 1].subParts[0].top = 0;
+ mData[mCount - 1].subParts[0].left = 0;
+ mData[mCount - 1].subParts[0].bottom = abs(image.mBitmap.header.biHeight);
+ mData[mCount - 1].subParts[0].right = abs(image.mBitmap.header.biWidth);
+ }
+}
+
+int T2ImageObj::FindObject(int id, int pattern, int grade, int span, int offset) {
+ ObjectData *obj = mData;
+ int index;
+
+ for (index = 0; index < mCount; index++, obj++) {
+ if (
+ (obj->id == id) &&
+ (obj->pattern == pattern || obj->pattern == -1 || pattern == -1) &&
+ (obj->grade == grade || obj->grade == 0 || grade == 0) &&
+ (obj->span == span || obj->span == 0 || span == 0) &&
+ (obj->offset == offset || obj->offset == 255 || offset == 255)
+ )
+ break;
+ }
+
+ if (index == mCount)
+ return -1;
+ else
+ return index;
+}
+
+int T2ImageObj::FindObject(const char* name, int pattern, int grade, int span, int offset) {
+ ObjectData *obj = mData;
+ int index;
+
+ for (index = 0; index < mCount; index++, obj++) {
+ if (
+ !strcmp(obj->name, name) &&
+ (obj->pattern == pattern || obj->pattern == -1 || pattern == -1) &&
+ (obj->grade == grade || obj->grade == 0 || grade == 0) &&
+ (obj->span == span || obj->span == 0 || span == 0) &&
+ (obj->offset == offset || obj->offset == 255 || offset == 255)
+ )
+ break;
+ }
+
+ if (index == mCount)
+ return -1;
+ else
+ return index;
+}
+
+void T2ImageObj::EnumParts(int index, int width, PARTSLIST* outParts, int* outCount) {
+#line 272
+ _ASSERT(index >= 0);
+
+ int i = 0;
+ width = width * 8;
+
+ while (width > 0 && i < mData[index].subPartCount) {
+ if (mData[index].subParts[i].flags & SPD_RECT) {
+ // Draw a piece of the image
+ outParts[*outCount].image = mData[index].image;
+ outParts[*outCount].rect.top = mData[index].subParts[i].top;
+ outParts[*outCount].rect.left = mData[index].subParts[i].left;
+ outParts[*outCount].rect.bottom = mData[index].subParts[i].bottom;
+ outParts[*outCount].rect.right = mData[index].subParts[i].right;
+
+ if ((mData[index].subParts[i].flags & SPD_TRANSPARENT) == 0)
+ outParts[*outCount].transparent = false;
+ else
+ outParts[*outCount].transparent = true;
+
+ if ((mData[index].subParts[i].flags & SPD_HALFTONE) == 0)
+ outParts[*outCount].halftoneMode = false;
+ else
+ outParts[*outCount].halftoneMode = true;
+
+ width -= (outParts[*outCount].rect.right - outParts[*outCount].rect.left);
+ (*outCount)++;
+ } else if (mData[index].subParts[i].flags & SPD_PARTS_BY_NAME) {
+ // Include another part list
+ int prevCount = *outCount;
+ EnumParts(mData[index].subParts[i].partIndex, width, outParts, outCount);
+ for (; prevCount < *outCount; prevCount++)
+ width -= (outParts[prevCount].rect.right - outParts[prevCount].rect.left);
+ } else if (mData[index].subParts[i].flags & SPD_PARTS_BY_ID) {
+ // Search for an object and include its part list
+ int prevCount = *outCount;
+ EnumParts(FindObject(mData[index].subParts[i].objectID, -1, 0, 0, 255), width, outParts, outCount);
+ for (; prevCount < *outCount; prevCount++)
+ width -= (outParts[prevCount].rect.right - outParts[prevCount].rect.left);
+ }
+
+ if (!(mData[index].subParts[i].flags & SPD_LOOP))
+ i++;
+ }
+}
+
+BOOL T2ImageObj::WithRoof(int index) {
+ return mData[index].roof;
+}
+
+BOOL T2ImageObj::WithFloor(int index) {
+ return mData[index].floor;
+}
+
+void T2ImageObj::DrawObject(T2BitImage* image, int index, RECT rect, int factor, int foreGndColor) {
+ DrawObject(image, index, rect, factor, false, foreGndColor);
+}
+
+void T2ImageObj::DrawObject(CDC* dc, int index, RECT rect, int factor, int foreGndColor) {
+ DrawObject(dc, index, rect, factor, true, foreGndColor);
+}
+
+void T2ImageObj::DrawObject(void* target, int index, RECT rect, int factor, BOOL targetIsDC, int foreGndColor) {
+#line 338
+ _ASSERT(index >= 0);
+
+ static PARTSLIST parts[500];
+ int width = rect.right - rect.left;
+ int num = 0;
+ EnumParts(index, width, parts, &num);
+
+ if (num >= 500)
+ MessageBox(NULL, "Too many parts", "T2ImageObj::DrawObject", MB_OK | MB_ICONERROR | MB_TASKMODAL);
+
+ for (int i = 0; i < num; i++) {
+ RECT srcRect = parts[i].rect;
+ RECT destRect = srcRect;
+
+ if ((srcRect.right - srcRect.left) > ((destRect.right - destRect.left) << factor))
+ srcRect.right = srcRect.left + ((destRect.right - destRect.left) << factor);
+
+ if ((destRect.right - destRect.left) > ((srcRect.right - srcRect.left) >> factor))
+ destRect.right = destRect.left + ((srcRect.right - srcRect.left) >> factor);
+
+ if ((srcRect.bottom - srcRect.top) > ((destRect.bottom - destRect.top) << factor))
+ srcRect.bottom = srcRect.top + ((destRect.bottom - destRect.top) << factor);
+
+ if ((destRect.bottom - destRect.top) > ((srcRect.bottom - srcRect.top) >> factor))
+ destRect.bottom = destRect.top + ((srcRect.bottom - srcRect.top) >> factor);
+
+ if (parts[i].transparent)
+ parts[i].image->SetBackGndColor(0);
+ else
+ parts[i].image->SetBackGndColor(-1);
+
+ if (parts[i].halftoneMode)
+ parts[i].image->SetHalftoneMode(true);
+ else
+ parts[i].image->SetHalftoneMode(false);
+
+ parts[i].image->SetForeGndColor(foreGndColor);
+ if (targetIsDC) {
+ parts[i].image->CopyImage((CDC *) target, srcRect, destRect, false, NULL);
+ } else {
+ parts[i].image->CopyImage(*((T2BitImage *) target), srcRect, destRect, false, NULL);
+ }
+ parts[i].image->SetHalftoneMode(false);
+
+ rect.left += (destRect.right - destRect.left);
+ }
+}
+
+BOOL T2ImageObj::GetObjectSize(int index, SIZE* outSize) {
+#line 383
+ _ASSERT(index >= 0);
+
+ PARTSLIST part;
+ int num = 0;
+ EnumParts(index, 1, &part, &num);
+
+ if (num != 1)
+ return false;
+
+ outSize->cx = part.rect.right - part.rect.left;
+ outSize->cy = part.rect.bottom - part.rect.top;
+ return true;
+}
+
+T2BitImage* T2ImageObj::GetObjectImage(int index, RECT& outRect) {
+#line 397
+ _ASSERT(index >= 0);
+
+ PARTSLIST part;
+ int num = 0;
+ EnumParts(index, 1, &part, &num);
+
+ if (num != 1)
+ return NULL;
+
+ outRect = part.rect;
+ return part.image;
+}
diff --git a/src/T2DLL/T2ImageObj.h b/src/T2DLL/T2ImageObj.h
new file mode 100644
index 0000000..b954df8
--- /dev/null
+++ b/src/T2DLL/T2ImageObj.h
@@ -0,0 +1,72 @@
+#pragma once
+#include "common.h"
+
+struct PARTSLIST {
+ T2BitImage *image;
+ RECT rect;
+ BOOL transparent;
+ BOOL halftoneMode;
+};
+
+// unknown name
+struct SubPartData {
+ unsigned char flags;
+ union {
+ struct {
+ short top;
+ short left;
+ short bottom;
+ short right;
+ };
+ int partIndex;
+ int objectID;
+ };
+};
+
+#define SPD_PARTS_BY_NAME 1
+#define SPD_PARTS_BY_ID 2
+#define SPD_RECT 4
+
+#define SPD_HALFTONE 0x20
+#define SPD_TRANSPARENT 0x40
+#define SPD_LOOP 0x80
+
+// unknown name
+struct ObjectData {
+ char name[32];
+ int id;
+ int pattern;
+ unsigned char grade;
+ unsigned char span;
+ unsigned char offset;
+ unsigned char roof;
+ unsigned char floor;
+ T2BitImage *image;
+ unsigned char subPartCount;
+ SubPartData subParts[4];
+};
+
+class DLL_EXPORT T2ImageObj {
+public:
+ T2ImageObj();
+ virtual ~T2ImageObj();
+ void AddObject(HINSTANCE instance, unsigned int resourceID, T2BitImage* image);
+ void AddObject(const char* name, int pattern, T2BitImage& image, const RECT* rect, BOOL transparent, BOOL halftoneMode);
+ void AddObject(int id, int pattern, T2BitImage& image, const RECT* rect, BOOL transparent, BOOL halftoneMode);
+ int FindObject(int id, int pattern, int grade, int span, int offset);
+ int FindObject(const char* name, int pattern, int grade, int span, int offset);
+ void EnumParts(int, int, PARTSLIST*, int*);
+ BOOL WithRoof(int index);
+ BOOL WithFloor(int index);
+ void DrawObject(T2BitImage* image, int index, RECT rect, int factor, int foreGndColor);
+ void DrawObject(CDC* dc, int index, RECT rect, int factor, int foreGndColor);
+ BOOL GetObjectSize(int index, SIZE* outSize);
+ T2BitImage* GetObjectImage(int index, RECT& outRect);
+
+protected:
+ void DrawObject(void* target, int index, RECT rect, int factor, BOOL targetIsDC, int foreGndColor);
+
+ int mCount;
+ ObjectData *mData;
+ HANDLE mHandle;
+};
diff --git a/src/T2DLL/T2InfoDialog.cpp b/src/T2DLL/T2InfoDialog.cpp
new file mode 100644
index 0000000..60ba8e8
--- /dev/null
+++ b/src/T2DLL/T2InfoDialog.cpp
@@ -0,0 +1,30 @@
+#include "T2Equip.h"
+#include "T2EquipDef.h"
+#include "T2InfoDialog.h"
+
+T2InfoDialog::T2InfoDialog(T2DrawableObject* object) {
+ mDeleteOnClose = true;
+ mObject = object;
+}
+
+/*virtual*/ T2InfoDialog::~T2InfoDialog() {
+}
+
+/*virtual*/ void T2InfoDialog::GetCommentString(unsigned int id, CString& outStr) const {
+ char buf[256];
+ int size = 256;
+ HINSTANCE hInstance = NULL;
+
+ if (id < 0x10000001) {
+ hInstance = AfxGetInstanceHandle();
+ } else {
+ hInstance = ((T2Equip *) mObject)->GetEquipDef()->GetModuleHandle();
+ id -= 0x10000001;
+ }
+
+ int result = LoadString(hInstance, id + 1023, buf, size);
+ if (result)
+ outStr = buf;
+ else
+ outStr = "調整中ã§ã™ã€‚";
+}
diff --git a/src/T2DLL/T2InfoDialog.h b/src/T2DLL/T2InfoDialog.h
new file mode 100644
index 0000000..f7e41c3
--- /dev/null
+++ b/src/T2DLL/T2InfoDialog.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "common.h"
+#include "T2Dialog.h"
+
+class T2InfoDialog : public T2Dialog {
+public:
+ T2InfoDialog(T2DrawableObject* object);
+ virtual ~T2InfoDialog();
+protected:
+ virtual void GetCommentString(unsigned int, CString&) const;
+
+ T2DrawableObject *mObject;
+};
diff --git a/src/T2DLL/T2Maru_Reggae.cpp b/src/T2DLL/T2Maru_Reggae.cpp
new file mode 100644
index 0000000..fe26eeb
--- /dev/null
+++ b/src/T2DLL/T2Maru_Reggae.cpp
@@ -0,0 +1,43 @@
+#include "T2Maru_Reggae.h"
+
+T2Maru_Reggae::T2Maru_Reggae(T2TowerEvent*, CResFile*, int) {
+}
+
+/*virtual*/ T2Maru_Reggae::~T2Maru_Reggae() {
+}
+
+/*virtual*/ int T2Maru_Reggae::Start(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2Maru_Reggae::Exec(T2TowerDoc*) {
+}
+
+int T2Maru_Reggae::DoReception(T2TowerDoc*) {
+}
+
+void T2Maru_Reggae::MaruReception(T2TowerDoc*, T2People*) {
+}
+
+void T2Maru_Reggae::ReggaeReception(T2TowerDoc*, T2People*) {
+}
+
+void T2Maru_Reggae::MakeClaimMessage(T2TowerDoc*, T2Tenant*, CString&) {
+}
+
+T2Tenant* T2Maru_Reggae::FindTargetTenant(T2TowerDoc*) {
+}
+
+unsigned int T2Maru_Reggae::FindNextTenant(T2TowerDoc*) {
+}
+
+T2People* T2Maru_Reggae::GetReggaeMan() {
+}
+
+T2Tenant* T2Maru_Reggae::GetVisitTenant() {
+}
+
+/*virtual*/ void T2Maru_Reggae::Write(T2Archive&) {
+}
+
+/*virtual*/ void T2Maru_Reggae::Read(T2Archive&) {
+}
diff --git a/src/T2DLL/T2Maru_Reggae.h b/src/T2DLL/T2Maru_Reggae.h
new file mode 100644
index 0000000..502b042
--- /dev/null
+++ b/src/T2DLL/T2Maru_Reggae.h
@@ -0,0 +1,27 @@
+#pragma once
+#include "common.h"
+
+class T2Maru_Reggae {
+public:
+ T2Maru_Reggae(T2TowerEvent*, CResFile*, int);
+ virtual ~T2Maru_Reggae();
+ virtual int Start(T2TowerDoc*);
+ virtual int Exec(T2TowerDoc*);
+private:
+ int DoReception(T2TowerDoc*);
+ void MaruReception(T2TowerDoc*, T2People*);
+ void ReggaeReception(T2TowerDoc*, T2People*);
+ void MakeClaimMessage(T2TowerDoc*, T2Tenant*, CString&);
+ T2Tenant* FindTargetTenant(T2TowerDoc*);
+ unsigned int FindNextTenant(T2TowerDoc*);
+public:
+ T2People* GetReggaeMan();
+ T2Tenant* GetVisitTenant();
+ virtual void Write(T2Archive&);
+ virtual void Read(T2Archive&);
+
+ virtual unsigned long GetID() {}
+ int IsReggae() {}
+ T2Maru_Reggae(const T2Maru_Reggae&) {}
+ T2Maru_Reggae& operator=(const T2Maru_Reggae&) {}
+};
diff --git a/src/T2DLL/T2Matter.cpp b/src/T2DLL/T2Matter.cpp
new file mode 100644
index 0000000..4af52e5
--- /dev/null
+++ b/src/T2DLL/T2Matter.cpp
@@ -0,0 +1,232 @@
+#include "T2Archive.h"
+#include "T2Matter.h"
+#include "T2ReturnStack.h"
+
+T2Matter::T2Matter() {
+ Initialize();
+ mReturnStack = new T2ReturnStack;
+}
+
+void T2Matter::Initialize() {
+ mMatterID = 0;
+ mMatterDef = NULL;
+ m18 = 0;
+ mWorkTenant = 0;
+ mHomeTenant = 0;
+ mCurrEquipID = 0;
+ mDstTenant = 0;
+ mCurPosition.y = 0;
+ mCurPosition.x = 0;
+ mCurrDestPos.y = 0;
+ mCurrDestPos.x = 0;
+ mStartTime = -1;
+ mReturnStack = NULL;
+ m44 = 0;
+ m48 = 0;
+ mDirection = -1;
+ mWalkStyle = 0;
+}
+
+/*virtual*/ T2Matter::~T2Matter() {
+ delete mReturnStack;
+}
+
+/*virtual*/ void T2Matter::SetUsed(BOOL used) {
+ T2Object::SetUsed(used);
+ if (used && mReturnStack)
+ mReturnStack->Init();
+}
+
+void T2Matter::Initialize(T2MatterDef* matterDef) {
+ mMatterDef = matterDef;
+ m18 = 0;
+ mWorkTenant = 0;
+ mHomeTenant = 0;
+ mCurrEquipID = 0;
+ mDstTenant = 0;
+ mCurPosition.y = 0;
+ mCurPosition.x = 0;
+ mCurrDestPos.y = 0;
+ mCurrDestPos.x = 0;
+ mStartTime = -1;
+ m44 = 0;
+ m48 = 0;
+ mDirection = -1;
+ mWalkStyle = 0;
+}
+
+void T2Matter::FlipDirection() {
+ if (mDirection == 0)
+ mDirection = 1;
+ else if (mDirection == 1)
+ mDirection = 0;
+}
+
+void T2Matter::SetDestination(unsigned int dstTenant, unsigned int startTime) {
+ mDstTenant = dstTenant;
+ mStartTime = startTime;
+}
+
+void T2Matter::ClearDestination() {
+ mDstTenant = 0;
+ mStartTime = -1;
+}
+
+BOOL T2Matter::IsStartTime(unsigned int time) const {
+ BOOL result = false;
+ if (IsSetStartTime() && mStartTime <= (int) time)
+ result = true;
+ return result;
+}
+
+BOOL T2Matter::IsSetReturn() const {
+ return mReturnStack->IsSet();
+}
+
+BOOL T2Matter::IsSetReturnTime() const {
+ return mReturnStack->IsSetTime();
+}
+
+unsigned int T2Matter::GetReturnTime() const {
+ return mReturnStack->GetTime();
+}
+
+unsigned int T2Matter::GetReturn() const {
+ return mReturnStack->GetTenant();
+}
+
+BOOL T2Matter::SetReturn(unsigned int tenant, unsigned int time) {
+ return mReturnStack->Push(tenant, time);
+}
+
+void T2Matter::SetReturnTime(unsigned int time) {
+ mReturnStack->SetTime(time);
+}
+
+BOOL T2Matter::PopReturn(unsigned int& outTenant, unsigned int& outTime) {
+ return mReturnStack->Pop(outTenant, outTime);
+}
+
+BOOL T2Matter::SetReturnToDestination() {
+ BOOL result = false;
+ unsigned int tenant, time;
+ if (mReturnStack->Pop(tenant, time)) {
+ SetDestination(tenant, time);
+ result = true;
+ }
+ return result;
+}
+
+BOOL T2Matter::SetDestinationToReturn() {
+ return SetReturn(mDstTenant, mStartTime);
+}
+
+void T2Matter::DayChanged() {
+ if (mStartTime >= 1440)
+ mStartTime -= 1440;
+ else if (mStartTime > 1438)
+ mStartTime = 0;
+
+ if (mReturnStack)
+ mReturnStack->DayChanged();
+}
+
+BOOL T2Matter::RemoveReturn(unsigned int tenant) {
+ BOOL result = false;
+ if (mReturnStack)
+ result = mReturnStack->Remove(tenant);
+ return result;
+}
+
+/*virtual*/ void T2Matter::LoadSelf(T2Archive& archive, T2TowerDoc* towerDoc) {
+ T2Object::LoadSelf(archive, towerDoc);
+
+ if (IsUsed()) {
+ unsigned short us;
+ short s;
+ char c;
+ DWORD code;
+
+ archive >> mMatterID;
+
+ archive >> us;
+ mWorkTenant = us;
+ archive >> us;
+ mHomeTenant = us;
+ archive >> us;
+ mCurrEquipID = us;
+ archive >> us;
+ mDstTenant = us;
+
+ archive >> s;
+ mCurPosition.x = s;
+ archive >> s;
+ mCurPosition.y = s;
+ archive >> s;
+ mCurrDestPos.x = s;
+ archive >> s;
+ mCurrDestPos.y = s;
+
+ archive >> s;
+ mStartTime = s;
+
+ archive >> c;
+ mDirection = c;
+ archive >> c;
+ mWalkStyle = c;
+
+ archive >> code;
+ if (code == 'RSTK') {
+ if (!mReturnStack)
+ mReturnStack = new T2ReturnStack;
+ mReturnStack->Read(archive, towerDoc);
+ }
+ }
+}
+
+/*virtual*/ void T2Matter::SaveSelf(T2Archive& archive) {
+ T2Object::SaveSelf(archive);
+
+ if (IsUsed()) {
+ unsigned short us;
+ short s;
+ char c;
+ DWORD code;
+
+ archive << mMatterID;
+
+ us = mWorkTenant;
+ archive << us;
+ us = mHomeTenant;
+ archive << us;
+ us = mCurrEquipID;
+ archive << us;
+ us = mDstTenant;
+ archive << us;
+
+ s = mCurPosition.x;
+ archive << s;
+ s = mCurPosition.y;
+ archive << s;
+ s = mCurrDestPos.x;
+ archive << s;
+ s = mCurrDestPos.y;
+ archive << s;
+
+ s = mStartTime;
+ archive << s;
+
+ c = mDirection;
+ archive << c;
+ c = mWalkStyle;
+ archive << c;
+
+ if (mReturnStack)
+ code = 'RSTK';
+ else
+ code = 'xRSK';
+ archive << code;
+ if (code == 'RSTK')
+ mReturnStack->Write(archive);
+ }
+}
diff --git a/src/T2DLL/T2Matter.h b/src/T2DLL/T2Matter.h
new file mode 100644
index 0000000..60caed3
--- /dev/null
+++ b/src/T2DLL/T2Matter.h
@@ -0,0 +1,81 @@
+#pragma once
+#include "common.h"
+#include "T2DrawableObject.h"
+
+class T2Matter : public T2DrawableObject {
+public:
+ T2Matter();
+
+ virtual ~T2Matter();
+ virtual void SetUsed(BOOL);
+ void Initialize(T2MatterDef*);
+ void FlipDirection();
+ void SetDestination(unsigned int, unsigned int);
+ void ClearDestination();
+ BOOL IsStartTime(unsigned int) const;
+ BOOL IsSetReturn() const;
+ BOOL IsSetReturnTime() const;
+ unsigned int GetReturnTime() const;
+ unsigned int GetReturn() const;
+ BOOL SetReturn(unsigned int tenant, unsigned int time);
+ void SetReturnTime(unsigned int);
+ BOOL PopReturn(unsigned int& outTenant, unsigned int& outTime);
+ BOOL SetReturnToDestination();
+ BOOL SetDestinationToReturn();
+ void DayChanged();
+ BOOL RemoveReturn(unsigned int);
+
+ unsigned int GetMatterID() { return mMatterID; }
+ T2MatterDef* GetMatterDef() const { return mMatterDef; }
+ BOOL IsFront() { return m44 == 0; }
+ BOOL IsLast() { return m48 == 0; }
+ unsigned int GetWorkTenant() const { return mWorkTenant; }
+ unsigned int GetHomeTenant() const { return mHomeTenant; }
+ unsigned int GetCurrEquipID() const { return mCurrEquipID; }
+ void SetWorkTenant(unsigned int v) { mWorkTenant = v; }
+ void SetHomeTenant(unsigned int v) { mHomeTenant = v; }
+ void SetCurrEquipID(unsigned int v) { mCurrEquipID = v; }
+ unsigned int GetDstTenant() { return mDstTenant; }
+ POINT GetCurPosition() const { return mCurPosition; }
+ void SetDirection(int v) { mDirection = v; }
+ int GetDirection() const { return mDirection; }
+ int GetWalkStyle() const { return mWalkStyle; }
+ void MoveHTo(int v) { mCurPosition.x = v; }
+ void MoveVTo(int v) { mCurPosition.y = v; }
+ POINT GetCurrDestPos() const { return mCurrDestPos; }
+ void SetCurrDestPos(POINT pt) { mCurrDestPos = pt; }
+ BOOL InDestFloor() const {
+ return mCurPosition.y == mCurrDestPos.y;
+ }
+ BOOL IsGoDown() const {
+ return mCurrDestPos.y > mCurPosition.y;
+ }
+ BOOL IsSetStartTime() const { return mStartTime > -1; }
+ BOOL IsSetDestination() const { return mDstTenant != 0; }
+ unsigned int GetDestination() const { return mDstTenant; }
+ void SetStartTime(unsigned int v) { mStartTime = v; }
+
+private:
+ void Initialize();
+
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+
+ friend class T2MatterArray;
+ unsigned int mMatterID;
+ T2MatterDef *mMatterDef;
+ int m18;
+ unsigned int mWorkTenant;
+ unsigned int mHomeTenant;
+ unsigned int mCurrEquipID;
+ unsigned int mDstTenant;
+ POINT mCurPosition;
+ POINT mCurrDestPos;
+ int mStartTime;
+ T2ReturnStack *mReturnStack;
+ int m44;
+ int m48;
+ int mDirection;
+ int mWalkStyle;
+};
diff --git a/src/T2DLL/T2MatterArray.cpp b/src/T2DLL/T2MatterArray.cpp
new file mode 100644
index 0000000..2dee1cc
--- /dev/null
+++ b/src/T2DLL/T2MatterArray.cpp
@@ -0,0 +1,38 @@
+#include "T2MatterArray.h"
+
+T2MatterArray::T2MatterArray(unsigned int jobType, unsigned int validRange, unsigned int startID)
+ : T2ObjectArray(startID)
+{
+ mJobType = jobType;
+ mValidRange = validRange;
+
+ for (unsigned int i = 0; i < 448; i++)
+ mMatter[i].mMatterID = mStartID + i;
+}
+
+void T2MatterArray::SetValidRange(unsigned int validRange) {
+ if (validRange <= 448)
+ mValidRange = validRange;
+}
+
+T2Matter* T2MatterArray::FindUnusedMatter(unsigned int arg) {
+ for (unsigned int i = 0; i < mValidRange; i++) {
+ if (!mMatter[i].IsUsed())
+ return &mMatter[i];
+ }
+
+ if (arg > 0) {
+ unsigned int start = mValidRange;
+ unsigned int end = mValidRange + arg;
+ if (end > 448)
+ end = 448;
+ mValidRange = end;
+
+ for (unsigned int i = start; i < mValidRange; i++) {
+ if (!mMatter[i].IsUsed())
+ return &mMatter[i];
+ }
+ }
+
+ return NULL;
+}
diff --git a/src/T2DLL/T2MatterArray.h b/src/T2DLL/T2MatterArray.h
new file mode 100644
index 0000000..a7defaa
--- /dev/null
+++ b/src/T2DLL/T2MatterArray.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "common.h"
+#include "T2Matter.h"
+#include "T2ObjectArray.h"
+
+class DLL_EXPORT T2MatterArray : public T2ObjectArray {
+public:
+ T2MatterArray(unsigned int jobType, unsigned int validRange, unsigned int startID);
+ virtual ~T2MatterArray() { }
+
+ void SetValidRange(unsigned int validRange);
+ T2Matter* FindUnusedMatter(unsigned int);
+
+ unsigned int GetJobType() { return mJobType; }
+ unsigned int GetValidRange() { return mValidRange; }
+ unsigned int GetSpare() { return 448 - mValidRange; }
+ T2Matter* GetIndexMatter(int i) { return &mMatter[i]; }
+
+protected:
+ unsigned int mJobType;
+ unsigned int mValidRange;
+ T2Matter mMatter[448];
+};
diff --git a/src/T2DLL/T2MatterArrayList.cpp b/src/T2DLL/T2MatterArrayList.cpp
new file mode 100644
index 0000000..d53785e
--- /dev/null
+++ b/src/T2DLL/T2MatterArrayList.cpp
@@ -0,0 +1,25 @@
+#include "T2MatterArrayList.h"
+
+T2MatterArrayList::T2MatterArrayList(const T2MatterArrayList&) {
+}
+
+T2MatterArrayList& T2MatterArrayList::operator=(const T2MatterArrayList&) {
+}
+
+T2MatterArrayList::T2MatterArrayList() {
+}
+
+/*virtual*/ T2MatterArrayList::~T2MatterArrayList() {
+}
+
+void T2MatterArrayList::Add(T2MatterArray*) {
+}
+
+unsigned int T2MatterArrayList::GetItemCount() {
+}
+
+T2MatterArray* T2MatterArrayList::GetItemAt(long) {
+}
+
+T2Matter* T2MatterArrayList::FindUnusedMatter(unsigned int, unsigned int) {
+}
diff --git a/src/T2DLL/T2MatterArrayList.h b/src/T2DLL/T2MatterArrayList.h
new file mode 100644
index 0000000..bf6fed3
--- /dev/null
+++ b/src/T2DLL/T2MatterArrayList.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class T2MatterArrayList {
+public:
+ T2MatterArrayList(const T2MatterArrayList&);
+ T2MatterArrayList& operator=(const T2MatterArrayList&);
+ T2MatterArrayList();
+ virtual ~T2MatterArrayList();
+ void Add(T2MatterArray*);
+ unsigned int GetItemCount();
+ T2MatterArray* GetItemAt(long);
+ T2Matter* FindUnusedMatter(unsigned int, unsigned int);
+};
diff --git a/src/T2DLL/T2MatterDef.cpp b/src/T2DLL/T2MatterDef.cpp
new file mode 100644
index 0000000..298c851
--- /dev/null
+++ b/src/T2DLL/T2MatterDef.cpp
@@ -0,0 +1,26 @@
+#include "CResFile.h"
+#include "T2MatterDef.h"
+#include "T2TemplatePluginList.h"
+
+T2MatterDef::T2MatterDef(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile)
+ : T2TemplatePlugin(type, specifier, resFile, NULL)
+{
+ *resFile >> mSortKey;
+ *resFile >> mAttribute;
+ *resFile >> mSilhouetteID;
+ mSilhouetteDef = NULL;
+}
+
+/*virtual*/ T2MatterDef::~T2MatterDef() {
+}
+
+/*virtual*/ void T2MatterDef::GetName(CString& outStr) {
+ outStr.Format("%d", mSortKey);
+}
+
+/*virtual*/ void T2MatterDef::AssignSilhouette(T2TemplatePluginList* list) {
+ T2SilhouetteDef *silhouetteDef = list->FindSilhouette(mSilhouetteID);
+#line 31
+ _ASSERT(silhouetteDef);
+ mSilhouetteDef = silhouetteDef;
+}
diff --git a/src/T2DLL/T2MatterDef.h b/src/T2DLL/T2MatterDef.h
new file mode 100644
index 0000000..f23d58a
--- /dev/null
+++ b/src/T2DLL/T2MatterDef.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+#include "T2TemplatePlugin.h"
+
+class T2MatterDef : public T2TemplatePlugin {
+public:
+ T2MatterDef(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile);
+ virtual ~T2MatterDef();
+ virtual void GetName(CString& outStr);
+ virtual void AssignSilhouette(T2TemplatePluginList* list);
+
+ virtual int GetSortKey() { return mSortKey; }
+ int GetAttribute() const { return mAttribute; }
+ virtual T2SilhouetteDef* GetSilhouetteDef() const { return mSilhouetteDef; }
+
+protected:
+ int mSortKey;
+ int mAttribute;
+ int mSilhouetteID;
+ T2SilhouetteDef *mSilhouetteDef;
+};
diff --git a/src/T2DLL/T2Message.cpp b/src/T2DLL/T2Message.cpp
new file mode 100644
index 0000000..e089c1b
--- /dev/null
+++ b/src/T2DLL/T2Message.cpp
@@ -0,0 +1,49 @@
+#include "T2Message.h"
+
+T2Message::T2Message() {
+}
+
+void T2Message::ShowMessage(const CString&) {
+}
+
+/*virtual*/ T2Message::~T2Message() {
+}
+
+/*static*/ const AFX_MSGMAP* __stdcall T2Message::_GetBaseMessageMap() {
+}
+
+/*virtual*/ const AFX_MSGMAP* T2Message::GetMessageMap() const {
+}
+
+/*virtual*/ void T2Message::PostNcDestroy() {
+}
+
+int T2Message::OnCreate(CREATESTRUCTA*) {
+}
+
+void T2Message::OnTimer(unsigned int) {
+}
+
+long T2Message::OnHookMessage(unsigned int, long) {
+}
+
+void T2Message::OnLButtonDown(unsigned int, CPoint) {
+}
+
+void T2Message::OnRButtonDown(unsigned int, CPoint) {
+}
+
+void T2Message::OnKeyDown(unsigned int, unsigned int, unsigned int) {
+}
+
+void T2Message::OnDestroy() {
+}
+
+int T2Message::OnEraseBkgnd(CDC*) {
+}
+
+/*static*/ const AFX_MSGMAP T2Message::messageMap {
+}
+
+/*static*/ const AFX_MSGMAP_ENTRY* const T2Message::_messageEntries {
+}
diff --git a/src/T2DLL/T2Message.h b/src/T2DLL/T2Message.h
new file mode 100644
index 0000000..816cc61
--- /dev/null
+++ b/src/T2DLL/T2Message.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+
+class T2Message {
+public:
+ T2Message();
+ void ShowMessage(const CString&);
+protected:
+ virtual ~T2Message();
+ static const AFX_MSGMAP* __stdcall _GetBaseMessageMap();
+ virtual const AFX_MSGMAP* GetMessageMap() const;
+ virtual void PostNcDestroy();
+ int OnCreate(CREATESTRUCTA*);
+ void OnTimer(unsigned int);
+ long OnHookMessage(unsigned int, long);
+ void OnLButtonDown(unsigned int, CPoint);
+ void OnRButtonDown(unsigned int, CPoint);
+ void OnKeyDown(unsigned int, unsigned int, unsigned int);
+ void OnDestroy();
+ int OnEraseBkgnd(CDC*);
+ static const AFX_MSGMAP messageMap;
+private:
+ static const AFX_MSGMAP_ENTRY* const _messageEntries;
+};
diff --git a/src/T2DLL/T2Mover.cpp b/src/T2DLL/T2Mover.cpp
new file mode 100644
index 0000000..9472651
--- /dev/null
+++ b/src/T2DLL/T2Mover.cpp
@@ -0,0 +1,139 @@
+#include "T2Mover.h"
+
+T2Mover::T2Mover() {
+}
+
+/*virtual*/ T2Mover::~T2Mover() {
+}
+
+/*virtual*/ void T2Mover::SetUsed(int) {
+}
+
+int T2Mover::InitMover(T2MoverDef*, const RECT&, unsigned int) {
+}
+
+int T2Mover::InitStair(T2MoverDef*, const RECT&, unsigned int) {
+}
+
+int T2Mover::InitElevator(T2MoverDef*, const RECT&, unsigned int) {
+}
+
+void T2Mover::GetTypicalName(CString&) const {
+}
+
+/*virtual*/ PROCCODE T2Mover::DoDestruct(T2TowerDoc*, POINT, RECT&) {
+}
+
+/*virtual*/ int T2Mover::Destruct(T2TowerDoc*, CRect&) {
+}
+
+/*virtual*/ void T2Mover::Draw(T2TowerDoc*, const RECT&) {
+}
+
+int T2Mover::GetNumStop() const {
+}
+
+void T2Mover::AddStopBoth(T2TowerDoc*, int) {
+}
+
+int T2Mover::AddStop(T2FloorInfo*, int, ERequestUpDown) {
+}
+
+void T2Mover::RemoveStopBoth(T2TowerDoc*, int) {
+}
+
+void T2Mover::RemoveStop(T2TowerDoc*, int, ERequestUpDown) {
+}
+
+void T2Mover::RemoveCrossEquipID(T2FloorInfo*, int) {
+}
+
+void T2Mover::RemoveUnstoppable(T2TowerDoc*) {
+}
+
+void T2Mover::AddCrossEquipID(T2FloorInfo*, int) {
+}
+
+void T2Mover::AddCEFloorID(T2FloorInfo*, int) {
+}
+
+void T2Mover::ReplaceID(T2FloorInfo*, unsigned int) {
+}
+
+POINT T2Mover::PositionToStopPt(int, ERequestUpDown) {
+}
+
+int T2Mover::UnitToPosition(int) const {
+}
+
+int T2Mover::PositionToUnit(int) const {
+}
+
+int T2Mover::IsStopPosition(int) const {
+}
+
+int T2Mover::IsStopPosition(int, ERequestUpDown) {
+}
+
+int T2Mover::AddModule(T2TowerDoc*, int) {
+}
+
+void T2Mover::AddStairModule(T2TowerDoc*, const RECT&, int) {
+}
+
+unsigned int T2Mover::GetRequestID(int, int) const {
+}
+
+int T2Mover::GetModuleCount() const {
+}
+
+int T2Mover::FindStairModule(T2TowerDoc*, POINT, T2MoverModule*&, T2MoverModule*&) {
+}
+
+int T2Mover::CalcModuleRect(const T2MoverModule*, RECT&, int&) const {
+}
+
+T2MoverModule* T2Mover::FindPeople(const T2People*) const {
+}
+
+void T2Mover::CalcMachineArea(EEquipPos, RECT&) const {
+}
+
+void T2Mover::AdjustLength() {
+}
+
+T2Request* T2Mover::GetRequest(T2FloorInfo*, int, int) const {
+}
+
+int T2Mover::CalcScore(int) const {
+}
+
+int T2Mover::ExpandArea(T2TowerDoc*, EEquipPos, int) {
+}
+
+int T2Mover::IsHomePosition(int) const {
+}
+
+void T2Mover::CalcBodyArea(RECT&) const {
+}
+
+int T2Mover::CalcModulePos(T2MoverModule*, ERequestUpDown) {
+}
+
+void T2Mover::ShowShaft() {
+}
+
+void T2Mover::HideShaft() {
+}
+
+/*virtual*/ unsigned int T2Mover::Idle(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Mover::LoadSelf(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Mover::SaveSelf(T2Archive&) {
+}
+
+/*virtual*/ T2InfoDialog* T2Mover::ShowInfoDialog(T2TowerDoc*, CPoint) {
+}
diff --git a/src/T2DLL/T2Mover.h b/src/T2DLL/T2Mover.h
new file mode 100644
index 0000000..18326bd
--- /dev/null
+++ b/src/T2DLL/T2Mover.h
@@ -0,0 +1,71 @@
+#pragma once
+#include "common.h"
+
+class T2Mover {
+public:
+ T2Mover();
+ virtual ~T2Mover();
+ virtual void SetUsed(int);
+ int InitMover(T2MoverDef*, const RECT&, unsigned int);
+ int InitStair(T2MoverDef*, const RECT&, unsigned int);
+ int InitElevator(T2MoverDef*, const RECT&, unsigned int);
+ void GetTypicalName(CString&) const;
+ virtual PROCCODE DoDestruct(T2TowerDoc*, POINT, RECT&);
+ virtual int Destruct(T2TowerDoc*, CRect&);
+ virtual void Draw(T2TowerDoc*, const RECT&);
+ int GetNumStop() const;
+ void AddStopBoth(T2TowerDoc*, int);
+ int AddStop(T2FloorInfo*, int, ERequestUpDown);
+ void RemoveStopBoth(T2TowerDoc*, int);
+ void RemoveStop(T2TowerDoc*, int, ERequestUpDown);
+ void RemoveCrossEquipID(T2FloorInfo*, int);
+ void RemoveUnstoppable(T2TowerDoc*);
+ void AddCrossEquipID(T2FloorInfo*, int);
+ void AddCEFloorID(T2FloorInfo*, int);
+ void ReplaceID(T2FloorInfo*, unsigned int);
+ POINT PositionToStopPt(int, ERequestUpDown);
+ int UnitToPosition(int) const;
+ int PositionToUnit(int) const;
+ int IsStopPosition(int) const;
+ int IsStopPosition(int, ERequestUpDown);
+ int AddModule(T2TowerDoc*, int);
+ void AddStairModule(T2TowerDoc*, const RECT&, int);
+ unsigned int GetRequestID(int, int) const;
+ int GetModuleCount() const;
+ int FindStairModule(T2TowerDoc*, POINT, T2MoverModule*&, T2MoverModule*&);
+ int CalcModuleRect(const T2MoverModule*, RECT&, int&) const;
+ T2MoverModule* FindPeople(const T2People*) const;
+ void CalcMachineArea(EEquipPos, RECT&) const;
+ void AdjustLength();
+ T2Request* GetRequest(T2FloorInfo*, int, int) const;
+ int CalcScore(int) const;
+ int ExpandArea(T2TowerDoc*, EEquipPos, int);
+ int IsHomePosition(int) const;
+ void CalcBodyArea(RECT&) const;
+ int CalcModulePos(T2MoverModule*, ERequestUpDown);
+ void ShowShaft();
+ void HideShaft();
+ virtual unsigned int Idle(T2TowerDoc*);
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+public:
+ virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*, CPoint);
+
+ void SetShowShaft(int) {}
+ void StartBuild() {}
+ virtual int IsBuildFinish() {}
+ virtual int Enter(CLink*) {}
+ virtual int Leave(CLink*) {}
+ T2Mover(const T2Mover&) {}
+ T2Mover& operator=(const T2Mover&) {}
+ int IsStair() const {}
+ int IsElevator() const {}
+ int IsCheckRequest() const {}
+ void SetCheckRequest(int) {}
+ int GetLength() const {}
+ int GetWaitCount() const {}
+ T2RequestIDArray* GetReqIDArray() const {}
+ T2MoverModuleList* GetModuleList() const {}
+ int IsShaftVisible() const {}
+};
diff --git a/src/T2DLL/T2MoverArray.cpp b/src/T2DLL/T2MoverArray.cpp
new file mode 100644
index 0000000..9ecffac
--- /dev/null
+++ b/src/T2DLL/T2MoverArray.cpp
@@ -0,0 +1,25 @@
+#include "T2MoverArray.h"
+
+T2MoverArray::T2MoverArray(unsigned int) {
+}
+
+/*virtual*/ T2MoverArray::~T2MoverArray() {
+}
+
+T2Mover* T2MoverArray::FindUnusedMover() {
+}
+
+void T2MoverArray::DrawMoverAll(T2TowerDoc*, const RECT&) {
+}
+
+/*virtual*/ void T2MoverArray::DispatchIdle(T2TowerDoc*, int) {
+}
+
+int T2MoverArray::CalcMentenanceCost(T2TowerDoc*) const {
+}
+
+void T2MoverArray::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2MoverArray::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2MoverArray.h b/src/T2DLL/T2MoverArray.h
new file mode 100644
index 0000000..794f8ee
--- /dev/null
+++ b/src/T2DLL/T2MoverArray.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "common.h"
+
+class T2MoverArray {
+public:
+ T2MoverArray(unsigned int);
+ virtual ~T2MoverArray();
+ T2Mover* FindUnusedMover();
+ void DrawMoverAll(T2TowerDoc*, const RECT&);
+ virtual void DispatchIdle(T2TowerDoc*, int);
+ int CalcMentenanceCost(T2TowerDoc*) const;
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+
+ T2Mover* GetIndexMover(int) {}
+ T2MoverArray(const T2MoverArray&) {}
+ T2MoverArray& operator=(const T2MoverArray&) {}
+ void `default constructor closure'() {}
+};
diff --git a/src/T2DLL/T2MoverArrayList.cpp b/src/T2DLL/T2MoverArrayList.cpp
new file mode 100644
index 0000000..09894aa
--- /dev/null
+++ b/src/T2DLL/T2MoverArrayList.cpp
@@ -0,0 +1,40 @@
+#include "T2MoverArrayList.h"
+
+T2MoverArrayList::T2MoverArrayList() {
+}
+
+/*virtual*/ T2MoverArrayList::~T2MoverArrayList() {
+}
+
+void T2MoverArrayList::Add(T2MoverArray*) {
+}
+
+unsigned int T2MoverArrayList::GetItemCount() {
+}
+
+T2MoverArray* T2MoverArrayList::GetItemAt(int) {
+}
+
+T2Mover* T2MoverArrayList::GetMoverByID(unsigned int) {
+}
+
+T2Mover* T2MoverArrayList::FindUnusedMover() {
+}
+
+void T2MoverArrayList::DrawMoverAll(T2TowerDoc*, const RECT&) {
+}
+
+void T2MoverArrayList::DispatchIdle(T2TowerDoc*) {
+}
+
+void T2MoverArrayList::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2MoverArrayList::Write(T2Archive&) {
+}
+
+int T2MoverArrayList::CalcMentenanceCost(T2TowerDoc*) const {
+}
+
+LArray* T2MoverArrayList::MakeMoverList(int) {
+}
diff --git a/src/T2DLL/T2MoverArrayList.h b/src/T2DLL/T2MoverArrayList.h
new file mode 100644
index 0000000..8f944bb
--- /dev/null
+++ b/src/T2DLL/T2MoverArrayList.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "common.h"
+
+class T2MoverArrayList {
+public:
+ T2MoverArrayList();
+ virtual ~T2MoverArrayList();
+ void Add(T2MoverArray*);
+ unsigned int GetItemCount();
+ T2MoverArray* GetItemAt(int);
+ T2Mover* GetMoverByID(unsigned int);
+ T2Mover* FindUnusedMover();
+ void DrawMoverAll(T2TowerDoc*, const RECT&);
+ void DispatchIdle(T2TowerDoc*);
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+ int CalcMentenanceCost(T2TowerDoc*) const;
+ LArray* MakeMoverList(int);
+
+ T2MoverArrayList(const T2MoverArrayList&) {}
+ T2MoverArrayList& operator=(const T2MoverArrayList&) {}
+};
diff --git a/src/T2DLL/T2MoverCEArray.cpp b/src/T2DLL/T2MoverCEArray.cpp
new file mode 100644
index 0000000..fe00b8e
--- /dev/null
+++ b/src/T2DLL/T2MoverCEArray.cpp
@@ -0,0 +1,7 @@
+#include "T2MoverCEArray.h"
+
+T2MoverCEArray::T2MoverCEArray() {
+}
+
+/*virtual*/ T2MoverCEArray::~T2MoverCEArray() {
+}
diff --git a/src/T2DLL/T2MoverCEArray.h b/src/T2DLL/T2MoverCEArray.h
new file mode 100644
index 0000000..c0be283
--- /dev/null
+++ b/src/T2DLL/T2MoverCEArray.h
@@ -0,0 +1,11 @@
+#pragma once
+#include "common.h"
+#include "T2RouteCEArray.h"
+
+class T2MoverCEArray : public T2RouteCEArray {
+public:
+ T2MoverCEArray();
+ virtual ~T2MoverCEArray();
+
+ virtual DWORD GetCEClassID() { return 'MCEA'; }
+};
diff --git a/src/T2DLL/T2MoverDef.cpp b/src/T2DLL/T2MoverDef.cpp
new file mode 100644
index 0000000..7352822
--- /dev/null
+++ b/src/T2DLL/T2MoverDef.cpp
@@ -0,0 +1,58 @@
+#include "T2MoverDef.h"
+
+T2MoverDef::T2MoverDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldDef*, T2MoverPlugin*) {
+}
+
+/*virtual*/ T2MoverDef::~T2MoverDef() {
+}
+
+/*virtual*/ void T2MoverDef::GetName(CString&) {
+}
+
+int T2MoverDef::InitObject(T2Mover*, const POINT&) {
+}
+
+/*virtual*/ AREACHECKCODE T2MoverDef::AreaCheck(T2TowerDoc*, RECT&, unsigned int, int) {
+}
+
+/*virtual*/ int T2MoverDef::ClickProc(T2TowerDoc*, RECT*, unsigned int&) {
+}
+
+/*virtual*/ int T2MoverDef::MakeRequestProc(T2TowerDoc*, T2Equip*) {
+}
+
+/*virtual*/ PROCCODE T2MoverDef::AddModuleProc(T2TowerDoc*, T2Equip*, RECT*) {
+}
+
+/*virtual*/ int T2MoverDef::GetMinMaxRangeProc(T2TowerDoc*, T2Equip*, int) {
+}
+
+/*virtual*/ int T2MoverDef::HandleUpProc(T2TowerDoc*, T2Equip*, POINT) {
+}
+
+/*virtual*/ int T2MoverDef::HandleDownProc(T2TowerDoc*, T2Equip*, POINT) {
+}
+
+/*virtual*/ int T2MoverDef::ClickShaftProc(T2TowerDoc*, T2Equip*, POINT) {
+}
+
+/*virtual*/ int T2MoverDef::CalcModulePatIndex(int) {
+}
+
+/*virtual*/ CURSORTYPE T2MoverDef::QueryCursor(T2TowerDoc*, POINT, CString&, RECT&, POINT&, int, unsigned int, int) {
+}
+
+/*virtual*/ int T2MoverDef::IsaKindOfStopProc(T2TowerDoc*, T2Equip*, int, int) const {
+}
+
+/*virtual*/ int T2MoverDef::CalcMentenanceCostProc(const T2HaveOutViewObject*) const {
+}
+
+/*virtual*/ T2InfoDialog* T2MoverDef::ShowInfoDialog(T2TowerDoc*, T2Mover*, CPoint) {
+}
+
+/*virtual*/ int T2MoverDef::GetInfoDialogID(T2TowerDoc*, const T2Mover*, PARTCODE, int) const {
+}
+
+/*virtual*/ T2InfoDialog* T2MoverDef::ConstructInfoDialog(T2Mover*, PARTCODE, int) {
+}
diff --git a/src/T2DLL/T2MoverDef.h b/src/T2DLL/T2MoverDef.h
new file mode 100644
index 0000000..32960c6
--- /dev/null
+++ b/src/T2DLL/T2MoverDef.h
@@ -0,0 +1,43 @@
+#pragma once
+#include "common.h"
+
+class T2MoverDef {
+public:
+ T2MoverDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldDef*, T2MoverPlugin*);
+ virtual ~T2MoverDef();
+ virtual void GetName(CString&);
+ int InitObject(T2Mover*, const POINT&);
+ virtual AREACHECKCODE AreaCheck(T2TowerDoc*, RECT&, unsigned int, int);
+ virtual int ClickProc(T2TowerDoc*, RECT*, unsigned int&);
+ virtual int MakeRequestProc(T2TowerDoc*, T2Equip*);
+ virtual PROCCODE AddModuleProc(T2TowerDoc*, T2Equip*, RECT*);
+ virtual int GetMinMaxRangeProc(T2TowerDoc*, T2Equip*, int);
+ virtual int HandleUpProc(T2TowerDoc*, T2Equip*, POINT);
+ virtual int HandleDownProc(T2TowerDoc*, T2Equip*, POINT);
+ virtual int ClickShaftProc(T2TowerDoc*, T2Equip*, POINT);
+ virtual int CalcModulePatIndex(int);
+ virtual CURSORTYPE QueryCursor(T2TowerDoc*, POINT, CString&, RECT&, POINT&, int, unsigned int, int);
+ virtual int IsaKindOfStopProc(T2TowerDoc*, T2Equip*, int, int) const;
+ virtual int CalcMentenanceCostProc(const T2HaveOutViewObject*) const;
+ virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*, T2Mover*, CPoint);
+ virtual int GetInfoDialogID(T2TowerDoc*, const T2Mover*, PARTCODE, int) const;
+ virtual T2InfoDialog* ConstructInfoDialog(T2Mover*, PARTCODE, int);
+
+ int GetMinLength() const {}
+ int GetMaxLength() const {}
+ virtual int IsMover() {}
+ virtual int InitObject(T2Object*) {}
+ virtual int CalcModulePosProc(T2Equip*, T2MoverModule*, ERequestUpDown) {}
+ virtual int CalcModuleRectProc(const T2Mover*, const T2MoverModule*, RECT&, int&) const {}
+ int GetSpeed(int) const {}
+ T2MoverDef& operator=(T2MoverDef&) {}
+ int IsStair() {}
+ void GetAddSize(RECT&) const {}
+ int GetDefaultWait() const {}
+ int GetMaxModule() const {}
+ void GetModuleInset(RECT&) const {}
+ int GetMaxStop() const {}
+ T2BitImage* GetOffBitMap() const {}
+ int GetScore() const {}
+ static unsigned int GetRequiredRequestSpace() {}
+};
diff --git a/src/T2DLL/T2MoverModule.cpp b/src/T2DLL/T2MoverModule.cpp
new file mode 100644
index 0000000..358c1f2
--- /dev/null
+++ b/src/T2DLL/T2MoverModule.cpp
@@ -0,0 +1,49 @@
+#include "T2MoverModule.h"
+
+T2MoverModule::T2MoverModule() {
+}
+
+/*virtual*/ T2MoverModule::~T2MoverModule() {
+}
+
+/*virtual*/ void T2MoverModule::SetUsed(int) {
+}
+
+/*virtual*/ void T2MoverModule::RemoveContents(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2MoverModule::StopAdded(T2TowerDoc*, T2Mover*, int) {
+}
+
+/*virtual*/ void T2MoverModule::StopRemoved(T2TowerDoc*, T2Mover*, int) {
+}
+
+/*virtual*/ void T2MoverModule::Enter(T2Mover*, T2People*) {
+}
+
+/*virtual*/ int T2MoverModule::Enter(CLink*) {
+}
+
+/*virtual*/ int T2MoverModule::Leave(CLink*) {
+}
+
+/*virtual*/ void T2MoverModule::LoadSelf(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2MoverModule::SaveSelf(T2Archive&) {
+}
+
+void T2MoverModule::SetDirection(int) {
+}
+
+void T2MoverModule::AddPosition(int) {
+}
+
+/*static*/ unsigned int T2MoverModule::GetNewModuleID(T2TowerDoc*) {
+}
+
+void T2MoverModule::SetModuleID(T2TowerDoc*) {
+}
+
+/*static*/ unsigned int T2MoverModule::sModuleID {
+}
diff --git a/src/T2DLL/T2MoverModule.h b/src/T2DLL/T2MoverModule.h
new file mode 100644
index 0000000..f9ce786
--- /dev/null
+++ b/src/T2DLL/T2MoverModule.h
@@ -0,0 +1,40 @@
+#pragma once
+#include "common.h"
+
+class T2MoverModule {
+public:
+ T2MoverModule();
+ virtual ~T2MoverModule();
+ virtual void SetUsed(int);
+ virtual void RemoveContents(T2TowerDoc*);
+ virtual void StopAdded(T2TowerDoc*, T2Mover*, int);
+ virtual void StopRemoved(T2TowerDoc*, T2Mover*, int);
+ virtual void Enter(T2Mover*, T2People*);
+ virtual int Enter(CLink*);
+ virtual int Leave(CLink*);
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+public:
+ void SetDirection(int);
+ void AddPosition(int);
+private:
+ static unsigned int GetNewModuleID(T2TowerDoc*);
+public:
+ void SetModuleID(T2TowerDoc*);
+private:
+ static unsigned int sModuleID;
+
+public:
+ unsigned int GetModuleID() const {}
+ int GetPosition() const {}
+ int GetDirection() const {}
+ int GetWaitCounter() const {}
+ void SetWaitCounter(int) {}
+ void SubWaitCounter(int) {}
+ int GetPatIndex() const {}
+ void SetPatIndex(int) {}
+ int GetNumPeople() const {}
+ T2MoverModule(const T2MoverModule&) {}
+ T2MoverModule& operator=(const T2MoverModule&) {}
+};
diff --git a/src/T2DLL/T2MoverModuleList.cpp b/src/T2DLL/T2MoverModuleList.cpp
new file mode 100644
index 0000000..a0262cd
--- /dev/null
+++ b/src/T2DLL/T2MoverModuleList.cpp
@@ -0,0 +1,49 @@
+#include "T2MoverModuleList.h"
+
+T2MoverModuleList::T2MoverModuleList() {
+}
+
+/*virtual*/ T2MoverModuleList::~T2MoverModuleList() {
+}
+
+/*virtual*/ int T2MoverModuleList::Init(T2MoverDef*, const RECT&) {
+}
+
+int T2MoverModuleList::InsertModuleAt(int, T2MoverModule*) {
+}
+
+void T2MoverModuleList::AllClear() {
+}
+
+/*virtual*/ void T2MoverModuleList::Destruct(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2MoverModuleList::RemoveModule(T2TowerDoc*, T2MoverModule*) {
+}
+
+/*virtual*/ void T2MoverModuleList::Read(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2MoverModuleList::Write(T2Archive&) {
+}
+
+/*virtual*/ T2MoverModule* T2MoverModuleList::ConstructModule() {
+}
+
+/*virtual*/ void T2MoverModuleList::StopAdded(T2TowerDoc*, T2Mover*, int) {
+}
+
+/*virtual*/ void T2MoverModuleList::StopRemoved(T2TowerDoc*, T2Mover*, int) {
+}
+
+unsigned int T2MoverModuleList::GetItemCount() {
+}
+
+/*static*/ T2MoverModuleList* T2MoverModuleList::ReadMMList(T2Archive&, T2TowerDoc*) {
+}
+
+/*static*/ void T2MoverModuleList::WriteMMList(T2MoverModuleList*, T2Archive&) {
+}
+
+/*virtual*/ int T2MoverModuleList::GetModuleCount() const {
+}
diff --git a/src/T2DLL/T2MoverModuleList.h b/src/T2DLL/T2MoverModuleList.h
new file mode 100644
index 0000000..de55200
--- /dev/null
+++ b/src/T2DLL/T2MoverModuleList.h
@@ -0,0 +1,29 @@
+#pragma once
+#include "common.h"
+
+class T2MoverModuleList {
+public:
+ T2MoverModuleList();
+ virtual ~T2MoverModuleList();
+ virtual int Init(T2MoverDef*, const RECT&);
+ int InsertModuleAt(int, T2MoverModule*);
+ void AllClear();
+ virtual void Destruct(T2TowerDoc*);
+ virtual void RemoveModule(T2TowerDoc*, T2MoverModule*);
+ virtual void Read(T2Archive&, T2TowerDoc*);
+ virtual void Write(T2Archive&);
+ virtual T2MoverModule* ConstructModule();
+ virtual void StopAdded(T2TowerDoc*, T2Mover*, int);
+ virtual void StopRemoved(T2TowerDoc*, T2Mover*, int);
+ unsigned int GetItemCount();
+ static T2MoverModuleList* ReadMMList(T2Archive&, T2TowerDoc*);
+ static void WriteMMList(T2MoverModuleList*, T2Archive&);
+ virtual int GetModuleCount() const;
+
+ void GetBaseRect(RECT&) const {}
+protected:
+ virtual unsigned long GetMMClassID() {}
+public:
+ T2MoverModuleList(const T2MoverModuleList&) {}
+ T2MoverModuleList& operator=(const T2MoverModuleList&) {}
+};
diff --git a/src/T2DLL/T2MoverNumberTable.cpp b/src/T2DLL/T2MoverNumberTable.cpp
new file mode 100644
index 0000000..2034d98
--- /dev/null
+++ b/src/T2DLL/T2MoverNumberTable.cpp
@@ -0,0 +1,58 @@
+#include "T2MoverNumberTable.h"
+
+/*virtual*/ void T2MoverModuleTable::OnT2DlgItemLButtonUp(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2MoverModuleTable::OnT2DlgItemMouseMove(unsigned int, CPoint) {
+}
+
+/*virtual*/ int T2MoverModuleTable::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
+
+T2MoverModuleTable::T2MoverModuleTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2MoverModuleTable::~T2MoverModuleTable() {
+}
+
+/*virtual*/ int T2MoverModuleTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+/*virtual*/ void T2MoverModuleTable::SpendTime() {
+}
+
+void T2MoverModuleTable::SetMover(T2Mover*) {
+}
+
+T2ElevatorModule* T2MoverModuleTable::GetModule(int) {
+}
+
+int T2MoverModuleTable::GetCellContent(const TableCellT&) {
+}
+
+int T2MoverModuleTable::GetVScrValue() {
+}
+
+/*virtual*/ void T2MoverModuleTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ void T2MoverModuleTable::ListenToMessage(unsigned int, void*) {
+}
+
+void T2MoverModuleTable::RefreshMoverCell(int, unsigned int) {
+}
+
+void T2MoverModuleTable::DrawMoverCellByIndex(unsigned int) {
+}
+
+/*virtual*/ void T2MoverModuleTable::ClickCell(const TableCellT&, const POINT&) {
+}
+
+/*virtual*/ int T2MoverModuleTable::OnCommand(unsigned int, long) {
+}
+
+/*virtual*/ int T2MoverModuleTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2MoverModuleTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
diff --git a/src/T2DLL/T2MoverNumberTable.h b/src/T2DLL/T2MoverNumberTable.h
new file mode 100644
index 0000000..a28ec31
--- /dev/null
+++ b/src/T2DLL/T2MoverNumberTable.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "common.h"
+
+class T2MoverModuleTable {
+protected:
+ virtual void OnT2DlgItemLButtonUp(unsigned int, CPoint);
+ virtual void OnT2DlgItemMouseMove(unsigned int, CPoint);
+public:
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+ T2MoverModuleTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2MoverModuleTable();
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+public:
+ virtual void SpendTime();
+ void SetMover(T2Mover*);
+protected:
+ T2ElevatorModule* GetModule(int);
+ int GetCellContent(const TableCellT&);
+ int GetVScrValue();
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+public:
+ virtual void ListenToMessage(unsigned int, void*);
+ void RefreshMoverCell(int, unsigned int);
+ void DrawMoverCellByIndex(unsigned int);
+protected:
+ virtual void ClickCell(const TableCellT&, const POINT&);
+ virtual int OnCommand(unsigned int, long);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+};
diff --git a/src/T2DLL/T2MoverPlugin.cpp b/src/T2DLL/T2MoverPlugin.cpp
new file mode 100644
index 0000000..a2a5a3a
--- /dev/null
+++ b/src/T2DLL/T2MoverPlugin.cpp
@@ -0,0 +1,13 @@
+#include "T2MoverPlugin.h"
+
+T2MoverPlugin::T2MoverPlugin(unsigned long, T2PluginSpecifier&) {
+}
+
+/*virtual*/ T2MoverPlugin::~T2MoverPlugin() {
+}
+
+int T2MoverPlugin::LoadAllTemplatePlugin(T2WorldDef*, T2TemplatePluginDB*) {
+}
+
+void T2MoverPlugin::LoadT2MoverDef(T2WorldDef*) {
+}
diff --git a/src/T2DLL/T2MoverPlugin.h b/src/T2DLL/T2MoverPlugin.h
new file mode 100644
index 0000000..4d8c8ec
--- /dev/null
+++ b/src/T2DLL/T2MoverPlugin.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class T2MoverPlugin {
+public:
+ T2MoverPlugin(unsigned long, T2PluginSpecifier&);
+ virtual ~T2MoverPlugin();
+ int LoadAllTemplatePlugin(T2WorldDef*, T2TemplatePluginDB*);
+private:
+ void LoadT2MoverDef(T2WorldDef*);
+
+public:
+ T2MoverPlugin& operator=(T2MoverPlugin&) {}
+};
diff --git a/src/T2DLL/T2MoverRoutingTable.cpp b/src/T2DLL/T2MoverRoutingTable.cpp
new file mode 100644
index 0000000..7ee928c
--- /dev/null
+++ b/src/T2DLL/T2MoverRoutingTable.cpp
@@ -0,0 +1,49 @@
+#include "T2MoverRoutingTable.h"
+
+T2MoverRoutingTable::T2MoverRoutingTable(T2FloorInfo*, T2FloorPtrList*, T2Mover*) {
+}
+
+/*virtual*/ T2MoverRoutingTable::~T2MoverRoutingTable() {
+}
+
+void T2MoverRoutingTable::AddItems(int) {
+}
+
+void T2MoverRoutingTable::RemoveItem(int) {
+}
+
+void T2MoverRoutingTable::ClearData() {
+}
+
+int T2MoverRoutingTable::GetItem(int, T2RoutingTableElem&) {
+}
+
+int T2MoverRoutingTable::IsStopFloor(int) {
+}
+
+void T2MoverRoutingTable::SetStopFloor() {
+}
+
+int T2MoverRoutingTable::Update(T2MoverRoutingTable*) {
+}
+
+int T2MoverRoutingTable::IsUpdate(const T2MoverRoutingTable*, unsigned int, unsigned int, T2RoutingTableElem&) {
+}
+
+int T2MoverRoutingTable::IsSetTable(unsigned int, unsigned int, unsigned int, int, int) {
+}
+
+int T2MoverRoutingTable::CalcHScore(int) {
+}
+
+int T2MoverRoutingTable::IsConnectRoute(int) {
+}
+
+int T2MoverRoutingTable::GetNextRoute(POINT, unsigned int, POINT&, unsigned int, unsigned int&) {
+}
+
+unsigned int T2MoverRoutingTable::CalcScore(POINT, POINT&, T2RoutingTableElem*) {
+}
+
+T2Tenant* T2MoverRoutingTable::SelectNearFloor(POINT, int&, unsigned int&) {
+}
diff --git a/src/T2DLL/T2MoverRoutingTable.h b/src/T2DLL/T2MoverRoutingTable.h
new file mode 100644
index 0000000..3621ae9
--- /dev/null
+++ b/src/T2DLL/T2MoverRoutingTable.h
@@ -0,0 +1,33 @@
+#pragma once
+#include "common.h"
+
+class T2MoverRoutingTable {
+public:
+ T2MoverRoutingTable(T2FloorInfo*, T2FloorPtrList*, T2Mover*);
+ virtual ~T2MoverRoutingTable();
+ void AddItems(int);
+ void RemoveItem(int);
+ void ClearData();
+ int GetItem(int, T2RoutingTableElem&);
+protected:
+ int IsStopFloor(int);
+public:
+ void SetStopFloor();
+ int Update(T2MoverRoutingTable*);
+protected:
+ int IsUpdate(const T2MoverRoutingTable*, unsigned int, unsigned int, T2RoutingTableElem&);
+ int IsSetTable(unsigned int, unsigned int, unsigned int, int, int);
+ int CalcHScore(int);
+public:
+ int IsConnectRoute(int);
+ int GetNextRoute(POINT, unsigned int, POINT&, unsigned int, unsigned int&);
+protected:
+ unsigned int CalcScore(POINT, POINT&, T2RoutingTableElem*);
+public:
+ T2Tenant* SelectNearFloor(POINT, int&, unsigned int&);
+
+ T2MoverRoutingTable(const T2MoverRoutingTable&) {}
+ T2MoverRoutingTable& operator=(const T2MoverRoutingTable&) {}
+ T2Mover* GetMover() const {}
+ int GetMoverHPos() const {}
+};
diff --git a/src/T2DLL/T2MovieParamArray.cpp b/src/T2DLL/T2MovieParamArray.cpp
new file mode 100644
index 0000000..325b4cd
--- /dev/null
+++ b/src/T2DLL/T2MovieParamArray.cpp
@@ -0,0 +1,25 @@
+#include "T2MovieParamArray.h"
+
+T2MovieParamArray::T2MovieParamArray() {
+}
+
+/*virtual*/ T2MovieParamArray::~T2MovieParamArray() {
+}
+
+int T2MovieParamArray::Regist(unsigned long, int) {
+}
+
+int T2MovieParamArray::GetParam(unsigned long) {
+}
+
+/*static*/ T2MovieParamArray* T2MovieParamArray::ReadMovieParamArray(T2Archive&) {
+}
+
+/*static*/ void T2MovieParamArray::WriteMovieParamArray(T2MovieParamArray*, T2Archive&) {
+}
+
+/*virtual*/ void T2MovieParamArray::Read(T2Archive&) {
+}
+
+/*virtual*/ void T2MovieParamArray::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2MovieParamArray.h b/src/T2DLL/T2MovieParamArray.h
new file mode 100644
index 0000000..70993b8
--- /dev/null
+++ b/src/T2DLL/T2MovieParamArray.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2MovieParamArray {
+public:
+ T2MovieParamArray();
+ virtual ~T2MovieParamArray();
+ int Regist(unsigned long, int);
+ int GetParam(unsigned long);
+ static T2MovieParamArray* ReadMovieParamArray(T2Archive&);
+ static void WriteMovieParamArray(T2MovieParamArray*, T2Archive&);
+ virtual void Read(T2Archive&);
+ virtual void Write(T2Archive&);
+
+ T2MovieParamArray(const T2MovieParamArray&) {}
+ T2MovieParamArray& operator=(const T2MovieParamArray&) {}
+};
diff --git a/src/T2DLL/T2MoviePlugin.cpp b/src/T2DLL/T2MoviePlugin.cpp
new file mode 100644
index 0000000..2d9250d
--- /dev/null
+++ b/src/T2DLL/T2MoviePlugin.cpp
@@ -0,0 +1,58 @@
+#include "T2MoviePlugin.h"
+
+T2MoviePlugin::T2MoviePlugin(unsigned long, T2PluginSpecifier&) {
+}
+
+/*virtual*/ T2MoviePlugin::~T2MoviePlugin() {
+}
+
+/*virtual*/ void T2MoviePlugin::LoadRsrcFromStream(CResFile&) {
+}
+
+/*virtual*/ void T2MoviePlugin::GlobalData(T2GlobalData*) {
+}
+
+int T2MoviePlugin::GetMovieLifePhase(T2DateTime*, int) {
+}
+
+void T2MoviePlugin::UnfoldPluginSelf() {
+}
+
+void T2MoviePlugin::ReMake() {
+}
+
+void T2MoviePlugin::GetTitle(CString&, int) {
+}
+
+int T2MoviePlugin::GetNOPersonsR() {
+}
+
+void T2MoviePlugin::SetNOPersonsR(int) {
+}
+
+int T2MoviePlugin::GetNOPersonsF() {
+}
+
+void T2MoviePlugin::SetNOPersonsF(int) {
+}
+
+int T2MoviePlugin::IsFamousFilm() {
+}
+
+int T2MoviePlugin::IsRoadshowFilm() {
+}
+
+void T2MoviePlugin::ChkReMake(int) {
+}
+
+/*static*/ void T2MoviePlugin::sDummyRead(T2Archive&) {
+}
+
+void T2MoviePlugin::Read(T2Archive&) {
+}
+
+void T2MoviePlugin::Write(T2Archive&) {
+}
+
+/*virtual*/ unsigned long T2MoviePlugin::LoadSelf() {
+}
diff --git a/src/T2DLL/T2MoviePlugin.h b/src/T2DLL/T2MoviePlugin.h
new file mode 100644
index 0000000..676ea5f
--- /dev/null
+++ b/src/T2DLL/T2MoviePlugin.h
@@ -0,0 +1,29 @@
+#pragma once
+#include "common.h"
+
+class T2MoviePlugin {
+public:
+ T2MoviePlugin(unsigned long, T2PluginSpecifier&);
+ virtual ~T2MoviePlugin();
+protected:
+ virtual void LoadRsrcFromStream(CResFile&);
+public:
+ virtual void GlobalData(T2GlobalData*);
+ int GetMovieLifePhase(T2DateTime*, int);
+ void UnfoldPluginSelf();
+ void ReMake();
+ void GetTitle(CString&, int);
+ int GetNOPersonsR();
+ void SetNOPersonsR(int);
+ int GetNOPersonsF();
+ void SetNOPersonsF(int);
+ int IsFamousFilm();
+ int IsRoadshowFilm();
+ void ChkReMake(int);
+ static void sDummyRead(T2Archive&);
+ void Read(T2Archive&);
+ void Write(T2Archive&);
+ virtual unsigned long LoadSelf();
+
+ T2MoviePlugin& operator=(T2MoviePlugin&) {}
+};
diff --git a/src/T2DLL/T2MoviePluginList.cpp b/src/T2DLL/T2MoviePluginList.cpp
new file mode 100644
index 0000000..66684eb
--- /dev/null
+++ b/src/T2DLL/T2MoviePluginList.cpp
@@ -0,0 +1,13 @@
+#include "T2MoviePluginList.h"
+
+T2MoviePluginList::T2MoviePluginList() {
+}
+
+/*virtual*/ T2MoviePluginList::~T2MoviePluginList() {
+}
+
+void T2MoviePluginList::Read(T2Archive&) {
+}
+
+void T2MoviePluginList::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2MoviePluginList.h b/src/T2DLL/T2MoviePluginList.h
new file mode 100644
index 0000000..107ca06
--- /dev/null
+++ b/src/T2DLL/T2MoviePluginList.h
@@ -0,0 +1,10 @@
+#pragma once
+#include "common.h"
+
+class T2MoviePluginList {
+public:
+ T2MoviePluginList();
+ virtual ~T2MoviePluginList();
+ void Read(T2Archive&);
+ void Write(T2Archive&);
+};
diff --git a/src/T2DLL/T2MovieTable.cpp b/src/T2DLL/T2MovieTable.cpp
new file mode 100644
index 0000000..ff1d779
--- /dev/null
+++ b/src/T2DLL/T2MovieTable.cpp
@@ -0,0 +1,31 @@
+#include "T2MovieTable.h"
+
+/*virtual*/ int T2MovieTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+T2MovieTable::T2MovieTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+void T2MovieTable::SetMovieType(int) {
+}
+
+void T2MovieTable::Add(T2MoviePlugin*) {
+}
+
+void T2MovieTable::Add(CFilePluginList*) {
+}
+
+/*virtual*/ void T2MovieTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ void T2MovieTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+void T2MovieTable::ClickCell(const TableCellT&, const CPoint&) {
+}
+
+/*virtual*/ void T2MovieTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ int T2MovieTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
diff --git a/src/T2DLL/T2MovieTable.h b/src/T2DLL/T2MovieTable.h
new file mode 100644
index 0000000..4ea9416
--- /dev/null
+++ b/src/T2DLL/T2MovieTable.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2MovieTable {
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+public:
+ T2MovieTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ void SetMovieType(int);
+ void Add(T2MoviePlugin*);
+ void Add(CFilePluginList*);
+protected:
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+ virtual void DrawCell(CDC*, const TableCellT&);
+ void ClickCell(const TableCellT&, const CPoint&);
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+
+public:
+ virtual ~T2MovieTable() {}
+};
diff --git a/src/T2DLL/T2MsgWindowCallback.cpp b/src/T2DLL/T2MsgWindowCallback.cpp
new file mode 100644
index 0000000..0b5aaa4
--- /dev/null
+++ b/src/T2DLL/T2MsgWindowCallback.cpp
@@ -0,0 +1,37 @@
+#include "T2MsgWindowCallback.h"
+
+/*virtual*/ void T2MsgWindowCallback::CallbackZoomIn() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackZoomOut() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackInView() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackOutView() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackPriceView() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackMaintView() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackTransView() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackEvalView() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackPause(int) {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackCalendar() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackFunds() {
+}
+
+/*virtual*/ void T2MsgWindowCallback::CallbackPopulation() {
+}
diff --git a/src/T2DLL/T2MsgWindowCallback.h b/src/T2DLL/T2MsgWindowCallback.h
new file mode 100644
index 0000000..3227093
--- /dev/null
+++ b/src/T2DLL/T2MsgWindowCallback.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "common.h"
+
+class T2MsgWindowCallback {
+public:
+ virtual void CallbackZoomIn();
+ virtual void CallbackZoomOut();
+ virtual void CallbackInView();
+ virtual void CallbackOutView();
+ virtual void CallbackPriceView();
+ virtual void CallbackMaintView();
+ virtual void CallbackTransView();
+ virtual void CallbackEvalView();
+ virtual void CallbackPause(int);
+ virtual void CallbackCalendar();
+ virtual void CallbackFunds();
+ virtual void CallbackPopulation();
+
+ T2MsgWindowCallback() {}
+ T2MsgWindowCallback(const T2MsgWindowCallback&) {}
+ T2MsgWindowCallback& operator=(const T2MsgWindowCallback&) {}
+};
diff --git a/src/T2DLL/T2Name.cpp b/src/T2DLL/T2Name.cpp
new file mode 100644
index 0000000..ab183e3
--- /dev/null
+++ b/src/T2DLL/T2Name.cpp
@@ -0,0 +1,37 @@
+#include "T2Name.h"
+
+T2Name::T2Name() {
+}
+
+T2Name::T2Name(T2Archive&) {
+}
+
+T2Name::T2Name(CString, T2Tenant*, int) {
+}
+
+T2Name::T2Name(CString, T2People*, int) {
+}
+
+T2Name::T2Name(CString, T2Mover*, int) {
+}
+
+T2Name::T2Name(CString, T2MoverModule*, int) {
+}
+
+/*virtual*/ T2Name::~T2Name() {
+}
+
+short T2Name::GetName(CString&, unsigned int&) {
+}
+
+void T2Name::SetName(CString) {
+}
+
+void T2Name::MakeFullName(T2TowerDoc*, CString&) {
+}
+
+int T2Name::operator==(const CString&) const {
+}
+
+void T2Name::Write(T2Archive&) const {
+}
diff --git a/src/T2DLL/T2Name.h b/src/T2DLL/T2Name.h
new file mode 100644
index 0000000..290f842
--- /dev/null
+++ b/src/T2DLL/T2Name.h
@@ -0,0 +1,25 @@
+#pragma once
+#include "common.h"
+
+class T2Name {
+public:
+ T2Name();
+ T2Name(T2Archive&);
+ T2Name(CString, T2Tenant*, int);
+ T2Name(CString, T2People*, int);
+ T2Name(CString, T2Mover*, int);
+ T2Name(CString, T2MoverModule*, int);
+ virtual ~T2Name();
+ short GetName(CString&, unsigned int&);
+ void SetName(CString);
+ void MakeFullName(T2TowerDoc*, CString&);
+ int operator==(const CString&) const;
+ void Write(T2Archive&) const;
+
+ int GetSortKey() {}
+ int GetType() {}
+ unsigned int GetID() {}
+ int IsFavorite() const {}
+ T2Name(const T2Name&) {}
+ T2Name& operator=(const T2Name&) {}
+};
diff --git a/src/T2DLL/T2NameList.cpp b/src/T2DLL/T2NameList.cpp
new file mode 100644
index 0000000..cee243a
--- /dev/null
+++ b/src/T2DLL/T2NameList.cpp
@@ -0,0 +1,43 @@
+#include "T2NameList.h"
+
+T2NameList::T2NameList() {
+}
+
+/*virtual*/ T2NameList::~T2NameList() {
+}
+
+unsigned int T2NameList::GetItemCount() {
+}
+
+void T2NameList::Clear() {
+}
+
+void T2NameList::Add(T2Name*) {
+}
+
+void T2NameList::RemoveName(T2Name*) {
+}
+
+T2Name* T2NameList::Search(const T2Tenant*, int) const {
+}
+
+T2Name* T2NameList::Search(const T2Mover*, int) const {
+}
+
+T2Name* T2NameList::Search(const T2MoverModule*, int) const {
+}
+
+T2Name* T2NameList::Search(const T2People*, int) const {
+}
+
+T2Name* T2NameList::Search(const CString&, int) const {
+}
+
+T2Name* T2NameList::FullNameSearch(T2TowerDoc*, const CString&, int) const {
+}
+
+void T2NameList::Read(T2Archive&) {
+}
+
+void T2NameList::Write(T2Archive&) const {
+}
diff --git a/src/T2DLL/T2NameList.h b/src/T2DLL/T2NameList.h
new file mode 100644
index 0000000..82a3e5b
--- /dev/null
+++ b/src/T2DLL/T2NameList.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "common.h"
+
+class T2NameList {
+public:
+ T2NameList();
+ virtual ~T2NameList();
+ unsigned int GetItemCount();
+ void Clear();
+ void Add(T2Name*);
+ void RemoveName(T2Name*);
+ T2Name* Search(const T2Tenant*, int) const;
+ T2Name* Search(const T2Mover*, int) const;
+ T2Name* Search(const T2MoverModule*, int) const;
+ T2Name* Search(const T2People*, int) const;
+ T2Name* Search(const CString&, int) const;
+ T2Name* FullNameSearch(T2TowerDoc*, const CString&, int) const;
+ void Read(T2Archive&);
+ void Write(T2Archive&) const;
+
+ T2NameList(const T2NameList&) {}
+ T2NameList& operator=(const T2NameList&) {}
+};
diff --git a/src/T2DLL/T2NameTable.cpp b/src/T2DLL/T2NameTable.cpp
new file mode 100644
index 0000000..c68c2fd
--- /dev/null
+++ b/src/T2DLL/T2NameTable.cpp
@@ -0,0 +1,34 @@
+#include "T2NameTable.h"
+
+/*virtual*/ int T2NameTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+T2NameTable::T2NameTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+T2Name* T2NameTable::GetSelectedName() {
+}
+
+/*virtual*/ void T2NameTable::ClickSelf(POINT) {
+}
+
+/*virtual*/ void T2NameTable::OnT2DlgItemLButtonDown(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2NameTable::Add(T2NameList*) {
+}
+
+/*virtual*/ void T2NameTable::Add(T2Name*) {
+}
+
+/*virtual*/ void T2NameTable::RemoveCurrentCell() {
+}
+
+/*virtual*/ void T2NameTable::DrawCell(CDC*, const TableCellT&) {
+}
+
+/*virtual*/ void T2NameTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ int T2NameTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
diff --git a/src/T2DLL/T2NameTable.h b/src/T2DLL/T2NameTable.h
new file mode 100644
index 0000000..139c611
--- /dev/null
+++ b/src/T2DLL/T2NameTable.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+
+class T2NameTable {
+protected:
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+public:
+ T2NameTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ T2Name* GetSelectedName();
+ virtual void ClickSelf(POINT);
+protected:
+ virtual void OnT2DlgItemLButtonDown(unsigned int, CPoint);
+public:
+ virtual void Add(T2NameList*);
+ virtual void Add(T2Name*);
+ virtual void RemoveCurrentCell();
+protected:
+ virtual void DrawCell(CDC*, const TableCellT&);
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+
+public:
+ virtual ~T2NameTable() {}
+};
diff --git a/src/T2DLL/T2Object.cpp b/src/T2DLL/T2Object.cpp
new file mode 100644
index 0000000..7336a5a
--- /dev/null
+++ b/src/T2DLL/T2Object.cpp
@@ -0,0 +1,52 @@
+#include "T2Archive.h"
+#include "T2Object.h"
+
+T2Object::T2Object() {
+ mUsed = false;
+ mStatus = 0;
+ mFavorite = false;
+}
+
+/*virtual*/ void T2Object::SetFavorite(BOOL v) {
+ mFavorite = v;
+}
+
+/*virtual*/ void T2Object::Load(T2Archive& archive, T2TowerDoc* towerDoc) {
+ LoadSelf(archive, towerDoc);
+ InitLoaded();
+}
+
+/*virtual*/ void T2Object::Save(T2Archive& archive) {
+ SaveSelf(archive);
+}
+
+/*virtual*/ void T2Object::LoadSelf(T2Archive& archive, T2TowerDoc* towerDoc) {
+ unsigned char b;
+ short s;
+
+ archive >> b;
+ mUsed = (b != 0);
+
+ archive >> s;
+ mStatus = s;
+
+ archive >> b;
+ mFavorite = (b != 0);
+}
+
+/*virtual*/ void T2Object::SaveSelf(T2Archive& archive) {
+ unsigned char b;
+ short s;
+
+ b = (mUsed != 0);
+ archive << b;
+
+ s = mStatus;
+ archive << s;
+
+ b = (mFavorite != 0);
+ archive << b;
+}
+
+/*virtual*/ void T2Object::InitLoaded() {
+}
diff --git a/src/T2DLL/T2Object.h b/src/T2DLL/T2Object.h
new file mode 100644
index 0000000..8084bc7
--- /dev/null
+++ b/src/T2DLL/T2Object.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "common.h"
+#include "CLink.h"
+
+class DLL_EXPORT T2Object {
+public:
+ T2Object();
+ virtual ~T2Object() {}
+
+ virtual void SetUsed(BOOL u) { mUsed = u; }
+ virtual int Enter(CLink*) { return 0; }
+ virtual int Leave(CLink*) { return 0; }
+ virtual unsigned int Idle(T2TowerDoc*) { return 0; }
+ virtual void SetFavorite(BOOL v);
+ virtual void Load(T2Archive& archive, T2TowerDoc* towerDoc);
+ virtual void Save(T2Archive& archive);
+ virtual void LoadSelf(T2Archive& archive, T2TowerDoc* towerDoc);
+ virtual void SaveSelf(T2Archive& archive);
+
+ BOOL IsUsed() const { return mUsed; }
+ int GetStatus() const { return mStatus; }
+ void SetStatus(int s) { mStatus = s; }
+ BOOL IsFavorite() const { return mFavorite; }
+
+protected:
+ virtual void InitLoaded();
+
+ BOOL mUsed;
+ int mStatus;
+ BOOL mFavorite;
+};
diff --git a/src/T2DLL/T2ObjectArray.cpp b/src/T2DLL/T2ObjectArray.cpp
new file mode 100644
index 0000000..e6a9e51
--- /dev/null
+++ b/src/T2DLL/T2ObjectArray.cpp
@@ -0,0 +1,12 @@
+#include "T2ObjectArray.h"
+
+T2ObjectArray::T2ObjectArray(unsigned int startID) {
+ mStartID = startID;
+}
+
+/*virtual*/ T2ObjectArray::~T2ObjectArray() {
+}
+
+/*virtual*/ T2Object* T2ObjectArray::GetIndexObject(int) {
+ return NULL;
+}
diff --git a/src/T2DLL/T2ObjectArray.h b/src/T2DLL/T2ObjectArray.h
new file mode 100644
index 0000000..5c422da
--- /dev/null
+++ b/src/T2DLL/T2ObjectArray.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2ObjectArray {
+public:
+ T2ObjectArray(unsigned int startID = 1);
+ virtual ~T2ObjectArray();
+ virtual T2Object* GetIndexObject(int);
+
+ unsigned int GetStartID() { return mStartID; }
+ virtual T2Object* FindUnusedObject() { return NULL; }
+ virtual void DispatchIdle(T2TowerDoc*, int) {}
+
+protected:
+ unsigned int mStartID;
+};
diff --git a/src/T2DLL/T2ObjectArrayList.cpp b/src/T2DLL/T2ObjectArrayList.cpp
new file mode 100644
index 0000000..20ccd32
--- /dev/null
+++ b/src/T2DLL/T2ObjectArrayList.cpp
@@ -0,0 +1,13 @@
+#include "T2ObjectArrayList.h"
+
+T2ObjectArrayList::T2ObjectArrayList() {
+}
+
+/*virtual*/ T2ObjectArrayList::~T2ObjectArrayList() {
+}
+
+void T2ObjectArrayList::AddObjectArray(T2ObjectArray*) {
+}
+
+T2ObjectArray* T2ObjectArrayList::GetObjectArrayAt(int) {
+}
diff --git a/src/T2DLL/T2ObjectArrayList.h b/src/T2DLL/T2ObjectArrayList.h
new file mode 100644
index 0000000..6fd379e
--- /dev/null
+++ b/src/T2DLL/T2ObjectArrayList.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "common.h"
+
+class T2ObjectArrayList {
+public:
+ T2ObjectArrayList();
+ virtual ~T2ObjectArrayList();
+ void AddObjectArray(T2ObjectArray*);
+ T2ObjectArray* GetObjectArrayAt(int);
+
+ T2ObjectArrayList(const T2ObjectArrayList&) {}
+ T2ObjectArrayList& operator=(const T2ObjectArrayList&) {}
+};
diff --git a/src/T2DLL/T2OptionPluginList.cpp b/src/T2DLL/T2OptionPluginList.cpp
new file mode 100644
index 0000000..b8d49d6
--- /dev/null
+++ b/src/T2DLL/T2OptionPluginList.cpp
@@ -0,0 +1,16 @@
+#include "T2OptionPluginList.h"
+
+T2OptionPluginList::T2OptionPluginList() {
+}
+
+/*virtual*/ T2OptionPluginList::~T2OptionPluginList() {
+}
+
+void T2OptionPluginList::Add(T2OptionPlugin*) {
+}
+
+void T2OptionPluginList::OnIdle(T2TowerDoc*) {
+}
+
+int T2OptionPluginList::DispatchEvent(OPTIONEVENTTYPE, T2TowerDoc*, void*) {
+}
diff --git a/src/T2DLL/T2OptionPluginList.h b/src/T2DLL/T2OptionPluginList.h
new file mode 100644
index 0000000..bb25c65
--- /dev/null
+++ b/src/T2DLL/T2OptionPluginList.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class T2OptionPluginList {
+public:
+ T2OptionPluginList();
+ virtual ~T2OptionPluginList();
+ void Add(T2OptionPlugin*);
+ void OnIdle(T2TowerDoc*);
+ int DispatchEvent(OPTIONEVENTTYPE, T2TowerDoc*, void*);
+
+ T2OptionPluginList(const T2OptionPluginList&) {}
+ T2OptionPluginList& operator=(const T2OptionPluginList&) {}
+};
diff --git a/src/T2DLL/T2OutDecoration.cpp b/src/T2DLL/T2OutDecoration.cpp
new file mode 100644
index 0000000..ba8e432
--- /dev/null
+++ b/src/T2DLL/T2OutDecoration.cpp
@@ -0,0 +1,22 @@
+#include "T2OutDecoration.h"
+
+T2OutDecoration::T2OutDecoration(T2TowerEvent*, CResFile*, int) {
+}
+
+/*virtual*/ T2OutDecoration::~T2OutDecoration() {
+}
+
+/*virtual*/ int T2OutDecoration::Exec(T2TowerDoc*) {
+}
+
+void T2OutDecoration::DoDecoration(T2TowerDoc*, VIEWMODE, int) {
+}
+
+/*virtual*/ void T2OutDecoration::ViewModeChanged(T2TowerDoc*, VIEWMODE) {
+}
+
+void T2OutDecoration::CheckRoofTop(T2Equip*) {
+}
+
+LArray* T2OutDecoration::MakeLoofList() {
+}
diff --git a/src/T2DLL/T2OutDecoration.h b/src/T2DLL/T2OutDecoration.h
new file mode 100644
index 0000000..c865bab
--- /dev/null
+++ b/src/T2DLL/T2OutDecoration.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+
+class T2OutDecoration {
+public:
+ T2OutDecoration(T2TowerEvent*, CResFile*, int);
+ virtual ~T2OutDecoration();
+ virtual int Exec(T2TowerDoc*);
+ void DoDecoration(T2TowerDoc*, VIEWMODE, int);
+ virtual void ViewModeChanged(T2TowerDoc*, VIEWMODE);
+ void CheckRoofTop(T2Equip*);
+private:
+ LArray* MakeLoofList();
+
+public:
+ virtual unsigned long GetID() {}
+ virtual int IsBeginTime(unsigned int) {}
+ T2OutDecoration(const T2OutDecoration&) {}
+ T2OutDecoration& operator=(const T2OutDecoration&) {}
+};
diff --git a/src/T2DLL/T2OutObj.cpp b/src/T2DLL/T2OutObj.cpp
new file mode 100644
index 0000000..7eb99b0
--- /dev/null
+++ b/src/T2DLL/T2OutObj.cpp
@@ -0,0 +1,40 @@
+#include "T2OutObj.h"
+
+T2OutObj::T2OutObj() {
+}
+
+/*virtual*/ T2OutObj::~T2OutObj() {
+}
+
+/*virtual*/ void T2OutObj::Draw(T2TowerDoc*, const CRect&) {
+}
+
+/*virtual*/ PROCCODE T2OutObj::DoDestruct(T2TowerDoc*, int, CPoint, CPoint, CRect&) {
+}
+
+/*virtual*/ PROCCODE T2OutObj::Destruct(T2TowerDoc*, RECT&) {
+}
+
+/*virtual*/ void T2OutObj::GetOutObjArea(RECT&) const {
+}
+
+/*virtual*/ unsigned int T2OutObj::Idle(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2OutObj::InitOutObj(T2OuterObjDef*, const RECT&, unsigned int) {
+}
+
+/*virtual*/ void T2OutObj::LoadSelf(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2OutObj::SaveSelf(T2Archive&) {
+}
+
+/*virtual*/ void T2OutObj::StartBuild(T2TowerDoc*) {
+}
+
+/*virtual*/ T2InfoDialog* T2OutObj::ShowInfoDialog(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2OutObj::DrawHitMask(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2OutObj.h b/src/T2DLL/T2OutObj.h
new file mode 100644
index 0000000..615895d
--- /dev/null
+++ b/src/T2DLL/T2OutObj.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+
+class T2OutObj {
+public:
+ T2OutObj();
+ virtual ~T2OutObj();
+ virtual void Draw(T2TowerDoc*, const CRect&);
+ virtual PROCCODE DoDestruct(T2TowerDoc*, int, CPoint, CPoint, CRect&);
+ virtual PROCCODE Destruct(T2TowerDoc*, RECT&);
+ virtual void GetOutObjArea(RECT&) const;
+ virtual unsigned int Idle(T2TowerDoc*);
+ virtual int InitOutObj(T2OuterObjDef*, const RECT&, unsigned int);
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+ virtual void StartBuild(T2TowerDoc*);
+ virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*);
+ virtual void DrawHitMask(T2TowerDoc*);
+
+ T2ToolDef* GetToolDef() const {}
+ void SetToolDef(T2ToolDef*) {}
+ T2OutObj(const T2OutObj&) {}
+ T2OutObj& operator=(const T2OutObj&) {}
+};
diff --git a/src/T2DLL/T2OutObjArray.cpp b/src/T2DLL/T2OutObjArray.cpp
new file mode 100644
index 0000000..ef96821
--- /dev/null
+++ b/src/T2DLL/T2OutObjArray.cpp
@@ -0,0 +1,22 @@
+#include "T2OutObjArray.h"
+
+T2OutObjArray::T2OutObjArray(unsigned int) {
+}
+
+/*virtual*/ T2OutObjArray::~T2OutObjArray() {
+}
+
+T2OutObj* T2OutObjArray::FindUnusedOutObj() const {
+}
+
+/*virtual*/ void T2OutObjArray::DispatchIdle(T2TowerDoc*, int) {
+}
+
+int T2OutObjArray::CalcMentenanceCost(T2TowerDoc*) const {
+}
+
+void T2OutObjArray::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2OutObjArray::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2OutObjArray.h b/src/T2DLL/T2OutObjArray.h
new file mode 100644
index 0000000..504f1d7
--- /dev/null
+++ b/src/T2DLL/T2OutObjArray.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "common.h"
+
+class T2OutObjArray {
+public:
+ T2OutObjArray(unsigned int);
+ virtual ~T2OutObjArray();
+ T2OutObj* FindUnusedOutObj() const;
+ virtual void DispatchIdle(T2TowerDoc*, int);
+ int CalcMentenanceCost(T2TowerDoc*) const;
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+
+ T2OutObj* GetIndexOutObj(int) {}
+ T2OutObjArray(const T2OutObjArray&) {}
+ T2OutObjArray& operator=(const T2OutObjArray&) {}
+ void `default constructor closure'() {}
+};
diff --git a/src/T2DLL/T2OutObjArrayList.cpp b/src/T2DLL/T2OutObjArrayList.cpp
new file mode 100644
index 0000000..3948561
--- /dev/null
+++ b/src/T2DLL/T2OutObjArrayList.cpp
@@ -0,0 +1,34 @@
+#include "T2OutObjArrayList.h"
+
+T2OutObjArrayList::T2OutObjArrayList() {
+}
+
+/*virtual*/ T2OutObjArrayList::~T2OutObjArrayList() {
+}
+
+void T2OutObjArrayList::Add(T2OutObjArray*) {
+}
+
+T2OutObjArray* T2OutObjArrayList::GetItemAt(int) {
+}
+
+T2OutObj* T2OutObjArrayList::FindUnusedOutObj() {
+}
+
+void T2OutObjArrayList::DispatchIdle(T2TowerDoc*) {
+}
+
+T2OutObj* T2OutObjArrayList::GetIndOutObj(unsigned int) {
+}
+
+T2OutObj* T2OutObjArrayList::GetOutObjByID(unsigned int) {
+}
+
+int T2OutObjArrayList::CalcMentenanceCost(T2TowerDoc*) const {
+}
+
+void T2OutObjArrayList::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2OutObjArrayList::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2OutObjArrayList.h b/src/T2DLL/T2OutObjArrayList.h
new file mode 100644
index 0000000..137c182
--- /dev/null
+++ b/src/T2DLL/T2OutObjArrayList.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+
+class T2OutObjArrayList {
+public:
+ T2OutObjArrayList();
+ virtual ~T2OutObjArrayList();
+ void Add(T2OutObjArray*);
+ T2OutObjArray* GetItemAt(int);
+ T2OutObj* FindUnusedOutObj();
+ void DispatchIdle(T2TowerDoc*);
+ T2OutObj* GetIndOutObj(unsigned int);
+ T2OutObj* GetOutObjByID(unsigned int);
+ int CalcMentenanceCost(T2TowerDoc*) const;
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+
+ T2OutObjArrayList(const T2OutObjArrayList&) {}
+ T2OutObjArrayList& operator=(const T2OutObjArrayList&) {}
+};
diff --git a/src/T2DLL/T2OutObjInfoDialog.cpp b/src/T2DLL/T2OutObjInfoDialog.cpp
new file mode 100644
index 0000000..fe3fce4
--- /dev/null
+++ b/src/T2DLL/T2OutObjInfoDialog.cpp
@@ -0,0 +1,7 @@
+#include "T2OutObjInfoDialog.h"
+
+T2OutObjInfoDialog::T2OutObjInfoDialog(T2OutObj*) {
+}
+
+/*virtual*/ T2OutObjInfoDialog::~T2OutObjInfoDialog() {
+}
diff --git a/src/T2DLL/T2OutObjInfoDialog.h b/src/T2DLL/T2OutObjInfoDialog.h
new file mode 100644
index 0000000..e06a0c6
--- /dev/null
+++ b/src/T2DLL/T2OutObjInfoDialog.h
@@ -0,0 +1,8 @@
+#pragma once
+#include "common.h"
+
+class T2OutObjInfoDialog {
+public:
+ T2OutObjInfoDialog(T2OutObj*);
+ virtual ~T2OutObjInfoDialog();
+};
diff --git a/src/T2DLL/T2OuterObjDef.cpp b/src/T2DLL/T2OuterObjDef.cpp
new file mode 100644
index 0000000..cefb374
--- /dev/null
+++ b/src/T2DLL/T2OuterObjDef.cpp
@@ -0,0 +1,28 @@
+#include "T2OuterObjDef.h"
+
+T2OuterObjDef::T2OuterObjDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldDef*, T2ToolPlugin*) {
+}
+
+/*virtual*/ T2OuterObjDef::~T2OuterObjDef() {
+}
+
+/*virtual*/ CURSORTYPE T2OuterObjDef::QueryCursor(T2TowerDoc*, POINT, CString&, RECT&, POINT&, int, unsigned int, int) {
+}
+
+/*virtual*/ void T2OuterObjDef::DrawProc(T2HaveOutViewObject*, const RECT&, T2TowerDoc*) const {
+}
+
+/*virtual*/ AREACHECKCODE T2OuterObjDef::AreaCheck(T2TowerDoc*, RECT&, unsigned int, int) {
+}
+
+/*virtual*/ T2InfoDialog* T2OuterObjDef::ShowInfoDialog(T2TowerDoc*, T2OutObj*) {
+}
+
+/*virtual*/ int T2OuterObjDef::GetInfoDialogID(T2TowerDoc*, const T2OutObj*) const {
+}
+
+/*virtual*/ T2InfoDialog* T2OuterObjDef::ConstructInfoDialog(T2OutObj*) {
+}
+
+/*virtual*/ PROCCODE T2OuterObjDef::DoDestructProc(T2TowerDoc*, T2HaveOutViewObject*, POINT, RECT&) {
+}
diff --git a/src/T2DLL/T2OuterObjDef.h b/src/T2DLL/T2OuterObjDef.h
new file mode 100644
index 0000000..1ffea45
--- /dev/null
+++ b/src/T2DLL/T2OuterObjDef.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "common.h"
+
+class T2OuterObjDef {
+public:
+ T2OuterObjDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldDef*, T2ToolPlugin*);
+ virtual ~T2OuterObjDef();
+ virtual CURSORTYPE QueryCursor(T2TowerDoc*, POINT, CString&, RECT&, POINT&, int, unsigned int, int);
+ virtual void DrawProc(T2HaveOutViewObject*, const RECT&, T2TowerDoc*) const;
+ virtual AREACHECKCODE AreaCheck(T2TowerDoc*, RECT&, unsigned int, int);
+ virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*, T2OutObj*);
+ virtual int GetInfoDialogID(T2TowerDoc*, const T2OutObj*) const;
+ virtual T2InfoDialog* ConstructInfoDialog(T2OutObj*);
+ virtual PROCCODE DoDestructProc(T2TowerDoc*, T2HaveOutViewObject*, POINT, RECT&);
+
+ virtual int IsOutObj() {}
+ virtual void SetTenantDef(T2TenantDef*) {}
+ T2OuterObjDef& operator=(T2OuterObjDef&) {}
+};
diff --git a/src/T2DLL/T2OuterObjList.cpp b/src/T2DLL/T2OuterObjList.cpp
new file mode 100644
index 0000000..09c2908
--- /dev/null
+++ b/src/T2DLL/T2OuterObjList.cpp
@@ -0,0 +1,4 @@
+#include "T2OuterObjList.h"
+
+T2OuterObjList::~T2OuterObjList() {
+}
diff --git a/src/T2DLL/T2OuterObjList.h b/src/T2DLL/T2OuterObjList.h
new file mode 100644
index 0000000..0ee652f
--- /dev/null
+++ b/src/T2DLL/T2OuterObjList.h
@@ -0,0 +1,11 @@
+#pragma once
+#include "common.h"
+
+class T2OuterObjList {
+public:
+ ~T2OuterObjList();
+
+ T2OuterObjList() {}
+ T2OuterObjList(const T2OuterObjList&) {}
+ T2OuterObjList& operator=(const T2OuterObjList&) {}
+};
diff --git a/src/T2DLL/T2OuterObjPlugin.cpp b/src/T2DLL/T2OuterObjPlugin.cpp
new file mode 100644
index 0000000..cc33816
--- /dev/null
+++ b/src/T2DLL/T2OuterObjPlugin.cpp
@@ -0,0 +1,13 @@
+#include "T2OuterObjPlugin.h"
+
+T2OuterObjPlugin::T2OuterObjPlugin(unsigned long, T2PluginSpecifier&) {
+}
+
+/*virtual*/ T2OuterObjPlugin::~T2OuterObjPlugin() {
+}
+
+int T2OuterObjPlugin::LoadAllTemplatePlugin(T2WorldDef*, T2TemplatePluginDB*) {
+}
+
+void T2OuterObjPlugin::LoadT2OuterObjDef(T2WorldDef*) {
+}
diff --git a/src/T2DLL/T2OuterObjPlugin.h b/src/T2DLL/T2OuterObjPlugin.h
new file mode 100644
index 0000000..38b4c36
--- /dev/null
+++ b/src/T2DLL/T2OuterObjPlugin.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class T2OuterObjPlugin {
+public:
+ T2OuterObjPlugin(unsigned long, T2PluginSpecifier&);
+ virtual ~T2OuterObjPlugin();
+ int LoadAllTemplatePlugin(T2WorldDef*, T2TemplatePluginDB*);
+private:
+ void LoadT2OuterObjDef(T2WorldDef*);
+
+public:
+ T2OuterObjPlugin& operator=(T2OuterObjPlugin&) {}
+};
diff --git a/src/T2DLL/T2OutsideInfo.cpp b/src/T2DLL/T2OutsideInfo.cpp
new file mode 100644
index 0000000..e90fb10
--- /dev/null
+++ b/src/T2DLL/T2OutsideInfo.cpp
@@ -0,0 +1,46 @@
+#include "T2OutsideInfo.h"
+
+T2OutsideInfo::T2OutsideInfo(const T2FloorInfo&) {
+}
+
+/*virtual*/ T2OutsideInfo::~T2OutsideInfo() {
+}
+
+void T2OutsideInfo::Reset() {
+}
+
+void T2OutsideInfo::SetArea(const RECT&) {
+}
+
+POINT T2OutsideInfo::CurrentPt() const {
+}
+
+unsigned int T2OutsideInfo::GetUnitInfo(int, int) const {
+}
+
+T2OutObj* T2OutsideInfo::GetOutObj(int, int) const {
+}
+
+void T2OutsideInfo::FillOutObjID(const RECT&, unsigned int) {
+}
+
+unsigned int T2OutsideInfo::GetOutObjID(int, int) const {
+}
+
+int T2OutsideInfo::CalcNextUnitInfo() {
+}
+
+int T2OutsideInfo::NextValue(unsigned int&) {
+}
+
+int T2OutsideInfo::NextIndex(int&) {
+}
+
+int T2OutsideInfo::NextOutObj(T2OutObj*&) {
+}
+
+void T2OutsideInfo::Read(T2Archive&) {
+}
+
+void T2OutsideInfo::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2OutsideInfo.h b/src/T2DLL/T2OutsideInfo.h
new file mode 100644
index 0000000..0f87d43
--- /dev/null
+++ b/src/T2DLL/T2OutsideInfo.h
@@ -0,0 +1,29 @@
+#pragma once
+#include "common.h"
+
+class T2OutsideInfo {
+public:
+ T2OutsideInfo(const T2FloorInfo&);
+ virtual ~T2OutsideInfo();
+protected:
+ void Reset();
+public:
+ void SetArea(const RECT&);
+protected:
+ POINT CurrentPt() const;
+ unsigned int GetUnitInfo(int, int) const;
+ T2OutObj* GetOutObj(int, int) const;
+public:
+ void FillOutObjID(const RECT&, unsigned int);
+ unsigned int GetOutObjID(int, int) const;
+protected:
+ int CalcNextUnitInfo();
+ int NextValue(unsigned int&);
+ int NextIndex(int&);
+public:
+ int NextOutObj(T2OutObj*&);
+ void Read(T2Archive&);
+ void Write(T2Archive&);
+
+ T2OutsideInfo(const T2OutsideInfo&) {}
+};
diff --git a/src/T2DLL/T2PaletteAnime.cpp b/src/T2DLL/T2PaletteAnime.cpp
new file mode 100644
index 0000000..da9fc8e
--- /dev/null
+++ b/src/T2DLL/T2PaletteAnime.cpp
@@ -0,0 +1,220 @@
+#include "GlobalFunc.h"
+#include "T2DateTime.h"
+#include "T2DayLightFilter.h"
+#include "T2PaletteAnime.h"
+#include "T2PaletteAnimeDef.h"
+#include "T2TowerDoc.h"
+#include "T2TowerMainView.h"
+#include "T2WeatherFilter.h"
+#include "T2WorldDef.h"
+
+T2PaletteAnime::T2PaletteAnime(T2WorldDef* worldDef, T2DateTime* dateTime) {
+ Init();
+
+ mWorldDef = worldDef;
+ mWorldPlugin = (T2WorldPlugin *) mWorldDef->GetPlugin();
+ mPaletteAnimeDef = worldDef->GetPaletteAnimeDef();
+ mInterCTab = MakeInterCTab();
+ mDayLightFilter = new T2DayLightFilter;
+ mWeatherFilter = new T2WeatherFilter;
+
+ AdjustWindowColor(dateTime);
+}
+
+void T2PaletteAnime::Init() {
+ mWorldDef = NULL;
+ mWorldPlugin = NULL;
+ mPaletteAnimeDef = NULL;
+ mInterCTab = NULL;
+ mPaletteUpdated = false;
+ mSkyState = 0;
+ mSkyCount = 0;
+ mSECount = 0;
+ mSEKind = 0;
+ mSETimeNextTick = 0;
+ mDayLightFilter = NULL;
+ mWeatherFilter = NULL;
+}
+
+/*virtual*/ T2PaletteAnime::~T2PaletteAnime() {
+ if (mInterCTab)
+ free(mInterCTab);
+ if (mDayLightFilter)
+ delete mDayLightFilter;
+ if (mWeatherFilter)
+ delete mWeatherFilter;
+}
+
+LOGPALETTE* T2PaletteAnime::MakeInterCTab() {
+ LOGPALETTE *pal = (LOGPALETTE *) malloc(sizeof(LOGPALETTE) + sizeof(PALETTEENTRY) * 256);
+
+ for (int i = 0; i < 256; i++) {
+ pal->palPalEntry[i].peRed = 0;
+ pal->palPalEntry[i].peGreen = 0;
+ pal->palPalEntry[i].peBlue = 0;
+ if (i < mPaletteAnimeDef->GetNumOfAnimColor())
+ pal->palPalEntry[i].peFlags = PC_RESERVED;
+ else
+ pal->palPalEntry[i].peFlags = 0;
+ }
+
+ pal->palVersion = 0x300; // is there a GDI constant for this?
+ pal->palNumEntries = 256;
+
+ return pal;
+}
+
+BOOL T2PaletteAnime::IsSETime() {
+ BOOL result = false;
+ DWORD now = TickCount();
+
+ if (mSETimeNextTick <= now) {
+ mSETimeNextTick = now + 2;
+ mSECount++;
+ if (mSECount >= 60)
+ mSECount = 0;
+ result = true;
+ }
+
+ return result;
+}
+
+void T2PaletteAnime::ChangeSE() {
+ mPaletteUpdated = mWorldDef->ChangeFastSEProc(this) == BOOL3_1;
+
+ if ((mSECount % mPaletteAnimeDef->GetSEInterval()) == 0) {
+ mSEKind++;
+ if (mSEKind >= mPaletteAnimeDef->GetNumOfSEKind())
+ mSEKind = 0;
+
+ int numOfSEColor = mPaletteAnimeDef->GetNumOfSEColor();
+ int interStartIndex = mPaletteAnimeDef->GetNumOfRefrectColor() + mPaletteAnimeDef->GetNumOfSkyColor();
+ int seStartIndex = numOfSEColor * mSEKind;
+ LOGPALETTE *sePal = mPaletteAnimeDef->GetSEPalette();
+
+ for (int i = 0; i < numOfSEColor; i++) {
+ mInterCTab->palPalEntry[interStartIndex + i].peRed = sePal->palPalEntry[seStartIndex + i].peRed;
+ mInterCTab->palPalEntry[interStartIndex + i].peGreen = sePal->palPalEntry[seStartIndex + i].peGreen;
+ mInterCTab->palPalEntry[interStartIndex + i].peBlue = sePal->palPalEntry[seStartIndex + i].peBlue;
+ }
+
+ mWorldDef->ChangeSEProc(this);
+ mPaletteUpdated = true;
+ }
+}
+
+void T2PaletteAnime::RotateDayLightPalette(unsigned int start, unsigned int count) const {
+ RotatePalette(mPaletteAnimeDef->GetDayLightPalette(), start, count);
+ RotatePalette(mInterCTab, start, count);
+}
+
+void T2PaletteAnime::RotatePalette(LOGPALETTE* pal, unsigned int start, unsigned int count) const {
+ PALETTEENTRY save = pal->palPalEntry[start];
+
+ for (unsigned int i = start + 1; i < (start + count); i++) {
+ PALETTEENTRY entry = pal->palPalEntry[i];
+ pal->palPalEntry[i - 1] = entry;
+ }
+
+ pal->palPalEntry[start + count - 1] = save;
+}
+
+void T2PaletteAnime::AdjustSkyState(T2DateTime* dateTime) {
+ if (mWorldDef->AdjustSkyStateProc(this, dateTime) == BOOL3_NEG1) {
+ mDayLightFilter->SetTime(0, (dateTime->GetRawMinutes() * 1000) / 1440);
+ }
+}
+
+BOOL T2PaletteAnime::IsChangeSkyTime() {
+ BOOL result = false;
+
+ if (mSkyCount > 0) {
+ mSkyCount--;
+ if ((mSkyCount % 6) == 0)
+ result = true;
+ }
+
+ return result;
+}
+
+void T2PaletteAnime::ChangeSkyColor() {
+ BOOL3 result = mWorldDef->ChangeSkyColorProc(this);
+ if (result == BOOL3_1) {
+ mPaletteUpdated = true;
+ } else if (result == BOOL3_NEG1) {
+ int i;
+ int numOfSkyColor = mPaletteAnimeDef->GetNumOfSkyColor();
+ int numOfRefrectColor = mPaletteAnimeDef->GetNumOfRefrectColor();
+ LOGPALETTE *dayLightPalette = mPaletteAnimeDef->GetDayLightPalette();
+
+ for (i = 0; i < numOfSkyColor; i++) {
+ RGBQUAD c;
+ c.rgbRed = dayLightPalette->palPalEntry[i].peRed;
+ c.rgbGreen = dayLightPalette->palPalEntry[i].peGreen;
+ c.rgbBlue = dayLightPalette->palPalEntry[i].peBlue;
+ mDayLightFilter->SkyColor(&c);
+ mInterCTab->palPalEntry[i].peRed = c.rgbRed;
+ mInterCTab->palPalEntry[i].peGreen = c.rgbGreen;
+ mInterCTab->palPalEntry[i].peBlue = c.rgbBlue;
+ }
+
+ for (i = 0; i < numOfRefrectColor; i++) {
+ RGBQUAD c;
+ c.rgbRed = dayLightPalette->palPalEntry[i + numOfSkyColor].peRed;
+ c.rgbGreen = dayLightPalette->palPalEntry[i + numOfSkyColor].peGreen;
+ c.rgbBlue = dayLightPalette->palPalEntry[i + numOfSkyColor].peBlue;
+ mDayLightFilter->RefractionColor(&c);
+ mInterCTab->palPalEntry[i + numOfSkyColor].peRed = c.rgbRed;
+ mInterCTab->palPalEntry[i + numOfSkyColor].peGreen = c.rgbGreen;
+ mInterCTab->palPalEntry[i + numOfSkyColor].peBlue = c.rgbBlue;
+ }
+
+ mPaletteUpdated = true;
+ }
+}
+
+void T2PaletteAnime::MinuteChanged(T2DateTime* dateTime) {
+ unsigned int minute = dateTime->GetMinutes();
+ if (mWorldDef->UseOwnSkyPaletteFunction()) {
+ if (minute == 1)
+ AdjustSkyState(dateTime);
+ if (IsChangeSkyTime())
+ ChangeSkyColor();
+ } else {
+ if ((minute % 6) == 0) {
+ AdjustSkyState(dateTime);
+ ChangeSkyColor();
+ }
+ }
+}
+
+void T2PaletteAnime::DoAnimatePalette() {
+ if (mPaletteUpdated) {
+ GetCurrentT2TowerDoc()->towerDoc_vf11C(
+ mPaletteAnimeDef->GetAnimStartIndex(),
+ mPaletteAnimeDef->GetNumOfAnimColor(),
+ mInterCTab->palPalEntry
+ );
+ mPaletteUpdated = false;
+ }
+}
+
+void T2PaletteAnime::ReplaceDayLightPalette(int id) {
+ mPaletteAnimeDef->ReplaceDayLightPalette(mWorldDef->mModuleHandle, id);
+ mPaletteUpdated = false;
+}
+
+void T2PaletteAnime::SetSkyState(int skyState, int skyCount) {
+ if (mSkyState != skyState)
+ GetCurrentT2TowerDoc()->GetTowerMainView()->tmv_vf124(true);
+
+ mSkyState = skyState;
+ mSkyCount = skyCount;
+}
+
+void T2PaletteAnime::AdjustWindowColor(T2DateTime* dateTime) {
+ AdjustSkyState(dateTime);
+ ChangeSkyColor();
+ ChangeSE();
+ DoAnimatePalette();
+}
diff --git a/src/T2DLL/T2PaletteAnime.h b/src/T2DLL/T2PaletteAnime.h
new file mode 100644
index 0000000..fd6ef53
--- /dev/null
+++ b/src/T2DLL/T2PaletteAnime.h
@@ -0,0 +1,69 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2PaletteAnime {
+public:
+ T2PaletteAnime(T2WorldDef*, T2DateTime*);
+ virtual ~T2PaletteAnime();
+
+ int IsSETime();
+ void ChangeSE();
+ void RotateDayLightPalette(unsigned int, unsigned int) const;
+ void MinuteChanged(T2DateTime*);
+ void DoAnimatePalette();
+ void ReplaceDayLightPalette(int);
+ void SetSkyState(int, int);
+
+ T2PaletteAnimeDef* GetPaletteAnimeDef() const { return mPaletteAnimeDef; }
+ int GetSkyState() const { return mSkyState; }
+ int GetSkyCount() const { return mSkyCount; }
+ int GetSECount() const { return mSECount; }
+ LOGPALETTE* GetInterPalette() { return mInterCTab; }
+ int GetSEKind() const { return mSEKind; }
+ BOOL IsUpdated() const { return mPaletteUpdated; }
+ void ClearUpdate() { mPaletteUpdated = false; }
+ void IncSECount() {
+ mSECount++;
+ if (mSECount >= 60)
+ mSECount = 0;
+ }
+ BOOL IsFine() const {
+ return (mSkyState == 3) || (mSkyState == 4);
+ }
+ BOOL IsSnow() const { return (mSkyState == 4); }
+ BOOL IsShininDay() const {
+ switch (mSkyState) {
+ case 3:
+ case 4:
+ case 9:
+ case 10:
+ return false;
+ default:
+ return true;
+ }
+ }
+
+protected:
+ void RotatePalette(LOGPALETTE*, unsigned int, unsigned int) const;
+ void AdjustSkyState(T2DateTime*);
+ int IsChangeSkyTime();
+ void ChangeSkyColor();
+
+private:
+ void Init();
+ LOGPALETTE* MakeInterCTab();
+ void AdjustWindowColor(T2DateTime*);
+
+ T2WorldDef *mWorldDef;
+ T2WorldPlugin *mWorldPlugin;
+ T2PaletteAnimeDef *mPaletteAnimeDef;
+ LOGPALETTE *mInterCTab;
+ BOOL mPaletteUpdated;
+ int mSkyState;
+ int mSkyCount;
+ int mSECount;
+ int mSEKind;
+ unsigned int mSETimeNextTick;
+ T2DayLightFilter *mDayLightFilter;
+ T2WeatherFilter *mWeatherFilter;
+};
diff --git a/src/T2DLL/T2PaletteAnimeDef.cpp b/src/T2DLL/T2PaletteAnimeDef.cpp
new file mode 100644
index 0000000..98628fc
--- /dev/null
+++ b/src/T2DLL/T2PaletteAnimeDef.cpp
@@ -0,0 +1,112 @@
+#include "CResFile.h"
+#include "GlobalFunc.h"
+#include "T2PaletteAnimeDef.h"
+
+int DLL_EXPORT gCommonColor[20];
+
+T2PaletteAnimeDef::T2PaletteAnimeDef(HINSTANCE instance, CResFile* resFile) {
+ int i, j;
+
+ Init();
+
+ *resFile >> mNumOfTowerColor;
+ *resFile >> mNumOfAnimColor;
+ *resFile >> mAnimStartIndex;
+ *resFile >> mNumOfRefrectColor;
+ *resFile >> mNumOfSkyColor;
+ *resFile >> mNumOfSEKind;
+ *resFile >> mNumOfSEColor;
+ *resFile >> mSEInterval;
+
+ LOGPALETTE *basePal = LoadACTPaletteEntries(instance, 100);
+#line 22
+ _ASSERT(basePal);
+
+ for (i = mAnimStartIndex; i < (mAnimStartIndex + mNumOfAnimColor); i++)
+ basePal->palPalEntry[i].peFlags = PC_RESERVED;
+ basePal->palPalEntry[253].peFlags = PC_RESERVED;
+ basePal->palPalEntry[254].peFlags = PC_RESERVED;
+
+ mTowerPalette = new CPalette;
+ mTowerPalette->CreatePalette(basePal);
+
+
+ mSEPalette = LoadACTPaletteEntries(instance, 102);
+#line 31
+ _ASSERT(mSEPalette);
+
+ for (i = 0; i < (mNumOfSEKind * mNumOfSEColor); i++)
+ mSEPalette->palPalEntry[i].peFlags = PC_RESERVED;
+
+
+ mDayLightPalette = LoadACTPaletteEntries(instance, 101);
+#line 36
+ _ASSERT(mDayLightPalette);
+
+ for (i = 0; i < (mNumOfRefrectColor + mNumOfSkyColor); i++)
+ mDayLightPalette->palPalEntry[i].peFlags = PC_RESERVED;
+
+
+ mUnknownPalette = LoadACTPaletteEntries(instance, 103);
+#line 41
+ _ASSERT(mUnknownPalette);
+
+ gCommonColor[0] = 0;
+ gCommonColor[1] = 255;
+ for (i = 2; i <= 19; i++) {
+ if (
+ mUnknownPalette->palPalEntry[i].peRed == 0 &&
+ mUnknownPalette->palPalEntry[i].peGreen == 0 &&
+ mUnknownPalette->palPalEntry[i].peBlue == 0
+ )
+ {
+ gCommonColor[i] = 255;
+ }
+ else {
+ for (j = 0; j < mNumOfTowerColor; j++) {
+ if (
+ basePal->palPalEntry[j].peRed == mUnknownPalette->palPalEntry[i].peRed &&
+ basePal->palPalEntry[j].peGreen == mUnknownPalette->palPalEntry[i].peGreen &&
+ basePal->palPalEntry[j].peBlue == mUnknownPalette->palPalEntry[i].peBlue
+ )
+ {
+ break;
+ }
+ }
+
+#line 53
+ _ASSERT(j < mNumOfTowerColor);
+ gCommonColor[i] = j;
+ }
+ }
+
+ free(basePal);
+}
+
+T2PaletteAnimeDef::~T2PaletteAnimeDef() {
+ delete mTowerPalette;
+ free(mSEPalette);
+ free(mDayLightPalette);
+ free(mUnknownPalette);
+}
+
+void T2PaletteAnimeDef::Init() {
+ mUnknownPalette = NULL;
+ mSEPalette = NULL;
+ mDayLightPalette = NULL;
+}
+
+void T2PaletteAnimeDef::ReplaceDayLightPalette(HINSTANCE instance, int id) {
+ LOGPALETTE *pal = LoadACTPaletteEntries(instance, id);
+#line 80
+ _ASSERT(pal);
+
+ for (int i = 0; i < (mNumOfRefrectColor + mNumOfSkyColor); i++) {
+ pal->palPalEntry[i].peFlags = PC_RESERVED;
+ mDayLightPalette->palPalEntry[i] = pal->palPalEntry[i];
+ }
+}
+
+/*static*/ int T2PaletteAnimeDef::GetCommonColor(int i) {
+ return gCommonColor[i];
+}
diff --git a/src/T2DLL/T2PaletteAnimeDef.h b/src/T2DLL/T2PaletteAnimeDef.h
new file mode 100644
index 0000000..981c872
--- /dev/null
+++ b/src/T2DLL/T2PaletteAnimeDef.h
@@ -0,0 +1,38 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2PaletteAnimeDef {
+public:
+ T2PaletteAnimeDef(HINSTANCE, CResFile*);
+ ~T2PaletteAnimeDef();
+
+ void ReplaceDayLightPalette(HINSTANCE, int);
+ static int GetCommonColor(int);
+
+ int GetNumOfAnimColor() const { return mNumOfAnimColor; }
+ int GetAnimStartIndex() const { return mAnimStartIndex; }
+ int GetNumOfRefrectColor() const { return mNumOfRefrectColor; }
+ int GetNumOfSkyColor() const { return mNumOfSkyColor; }
+ int GetNumOfSEKind() const { return mNumOfSEKind; }
+ int GetNumOfSEColor() const { return mNumOfSEColor; }
+ int GetSEInterval() const { return mSEInterval; }
+ CPalette* GetTowerPalette() const { return mTowerPalette; }
+ LOGPALETTE* GetDayLightPalette() const { return mDayLightPalette; }
+ LOGPALETTE* GetSEPalette() const { return mSEPalette; }
+
+private:
+ void Init();
+
+ int mNumOfTowerColor;
+ int mNumOfAnimColor;
+ int mAnimStartIndex;
+ int mNumOfRefrectColor;
+ int mNumOfSkyColor;
+ int mNumOfSEKind;
+ int mNumOfSEColor;
+ int mSEInterval;
+ CPalette *mTowerPalette;
+ LOGPALETTE *mDayLightPalette;
+ LOGPALETTE *mSEPalette;
+ LOGPALETTE *mUnknownPalette;
+};
diff --git a/src/T2DLL/T2People.cpp b/src/T2DLL/T2People.cpp
new file mode 100644
index 0000000..c434626
--- /dev/null
+++ b/src/T2DLL/T2People.cpp
@@ -0,0 +1,235 @@
+#include "T2People.h"
+
+T2People::T2People() {
+}
+
+void T2People::Initialize() {
+}
+
+/*virtual*/ T2People::~T2People() {
+}
+
+/*virtual*/ void T2People::SetUsed(int) {
+}
+
+void T2People::Initialize(T2PeopleDef*, T2PeopleType*) {
+}
+
+int T2People::IsMale() const {
+}
+
+int T2People::IsGeneral() const {
+}
+
+int T2People::IsSpecialColor() const {
+}
+
+void T2People::ChangeStyle(int) {
+}
+
+int T2People::GetWidth() const {
+}
+
+int T2People::GetRouteType() {
+}
+
+int T2People::CalcWaitPersonArea(T2FloorInfo*, RECT&) {
+}
+
+void T2People::CalcWalkingSilhouetteArea(RECT&) const {
+}
+
+unsigned int T2People::GetCurTenantID() const {
+}
+
+/*virtual*/ unsigned int T2People::Idle(T2TowerDoc*) {
+}
+
+void T2People::IdleWaitMover(T2TowerDoc*) {
+}
+
+void T2People::MoveToTowerEntrance(T2TowerDoc*) {
+}
+
+void T2People::MoveToLobby(T2TowerDoc*) {
+}
+
+int T2People::MoveToParking(T2TowerDoc*) {
+}
+
+int T2People::MoveToSubway(T2TowerDoc*) {
+}
+
+int T2People::MoveToShip(T2TowerDoc*) {
+}
+
+void T2People::MoveByEStair(T2TowerDoc*) {
+}
+
+void T2People::SolveNoRoute(T2TowerDoc*) {
+}
+
+int T2People::FindRoute(T2TowerDoc*) {
+}
+
+void T2People::JumpToDestination(T2TowerDoc*) {
+}
+
+void T2People::GoOutTower(T2TowerDoc*) {
+}
+
+void T2People::IdleSearchedPerson(T2TowerDoc*) {
+}
+
+int T2People::WalkSearchedPersonRight(T2TowerDoc*) {
+}
+
+int T2People::WalkSearchedPersonLeft(T2TowerDoc*) {
+}
+
+int T2People::IsReachDestination(int) {
+}
+
+int T2People::IsRegistRequest(T2TowerDoc*) {
+}
+
+void T2People::ChangeStatus(int) {
+}
+
+void T2People::ChangeSilhouette() {
+}
+
+void T2People::SetSilhouette() {
+}
+
+void T2People::ChangeWalkStyle(int) {
+}
+
+void T2People::SetAnimePattern(int, int, int, int) {
+}
+
+int T2People::StopOnHisWay(T2TenantMemberDef*, int, int, RECT, int, int, int, int) {
+}
+
+int T2People::CalledInTenant(T2TenantMemberDef*, int, int, int, unsigned int, unsigned int) {
+}
+
+int T2People::CalcFreeTime(unsigned int) {
+}
+
+int T2People::IsGoToPool() const {
+}
+
+void T2People::Return() {
+}
+
+void T2People::SetDestinationToOutOfTower(T2TowerDoc*) {
+}
+
+void T2People::ChangeDestination(unsigned int, unsigned int) {
+}
+
+int T2People::CalcCurrEstimate() const {
+}
+
+void T2People::IncEstimate(int) {
+}
+
+void T2People::UpdateEstimation() {
+}
+
+int T2People::GetAverageStress() const {
+}
+
+int T2People::IncStress(int) {
+}
+
+int T2People::StressChanged() {
+}
+
+int T2People::IsVIP() const {
+}
+
+int T2People::IsNamed() const {
+}
+
+void T2People::SetColor(int) {
+}
+
+void T2People::ClearColor() {
+}
+
+/*virtual*/ void T2People::SetFavorite(int) {
+}
+
+int T2People::VIPEstimation() {
+}
+
+int T2People::SearchToilet(T2TowerDoc*) {
+}
+
+void T2People::DrawSearchedPerson(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2People::Draw(T2TowerDoc*, const RECT&) {
+}
+
+void T2People::Draw(T2BitImage*, const RECT&) {
+}
+
+void T2People::Draw(T2TowerDoc*, T2Equip*) {
+}
+
+void T2People::DrawAt(T2TowerDoc*, T2Equip*, POINT) {
+}
+
+void T2People::Duplicate(T2TowerDoc*) {
+}
+
+void T2People::Remove(T2TowerDoc*, unsigned int) {
+}
+
+void T2People::TenantRemoved(unsigned int) {
+}
+
+void T2People::Interview(T2TowerDoc*) {
+}
+
+int T2People::GetInterviewWords(T2TowerDoc*, CString&) {
+}
+
+int T2People::IsMaru() const {
+}
+
+int T2People::IsReggae() const {
+}
+
+void T2People::BreakoutEmergency(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2People::LoadSelf(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2People::SaveSelf(T2Archive&) {
+}
+
+void T2People::ResolveLink(T2PeopleArrayList*) {
+}
+
+/*virtual*/ T2InfoDialog* T2People::ShowInfoDialog(T2TowerDoc*) {
+}
+
+void T2People::GetName(CString&) {
+}
+
+/*virtual*/ int T2People::GetSilhouetteRect(RECT&) {
+}
+
+/*virtual*/ void T2People::DrawHitMask(T2TowerDoc*) {
+}
+
+void T2People::ClearSpecialFlag(unsigned int) {
+}
+
+void T2People::SetSpecialFlag(unsigned int) {
+}
diff --git a/src/T2DLL/T2People.h b/src/T2DLL/T2People.h
new file mode 100644
index 0000000..f02058b
--- /dev/null
+++ b/src/T2DLL/T2People.h
@@ -0,0 +1,122 @@
+#pragma once
+#include "common.h"
+
+class T2People {
+public:
+ T2People();
+private:
+ void Initialize();
+public:
+ virtual ~T2People();
+ virtual void SetUsed(int);
+ void Initialize(T2PeopleDef*, T2PeopleType*);
+ int IsMale() const;
+ int IsGeneral() const;
+ int IsSpecialColor() const;
+ void ChangeStyle(int);
+ int GetWidth() const;
+ int GetRouteType();
+ int CalcWaitPersonArea(T2FloorInfo*, RECT&);
+ void CalcWalkingSilhouetteArea(RECT&) const;
+ unsigned int GetCurTenantID() const;
+ virtual unsigned int Idle(T2TowerDoc*);
+protected:
+ void IdleWaitMover(T2TowerDoc*);
+ void MoveToTowerEntrance(T2TowerDoc*);
+ void MoveToLobby(T2TowerDoc*);
+ int MoveToParking(T2TowerDoc*);
+ int MoveToSubway(T2TowerDoc*);
+ int MoveToShip(T2TowerDoc*);
+ void MoveByEStair(T2TowerDoc*);
+ void SolveNoRoute(T2TowerDoc*);
+ int FindRoute(T2TowerDoc*);
+ void JumpToDestination(T2TowerDoc*);
+public:
+ void GoOutTower(T2TowerDoc*);
+ void IdleSearchedPerson(T2TowerDoc*);
+protected:
+ int WalkSearchedPersonRight(T2TowerDoc*);
+ int WalkSearchedPersonLeft(T2TowerDoc*);
+ int IsReachDestination(int);
+ int IsRegistRequest(T2TowerDoc*);
+public:
+ void ChangeStatus(int);
+protected:
+ void ChangeSilhouette();
+ void SetSilhouette();
+public:
+ void ChangeWalkStyle(int);
+ void SetAnimePattern(int, int, int, int);
+ int StopOnHisWay(T2TenantMemberDef*, int, int, RECT, int, int, int, int);
+ int CalledInTenant(T2TenantMemberDef*, int, int, int, unsigned int, unsigned int);
+protected:
+ int CalcFreeTime(unsigned int);
+public:
+ int IsGoToPool() const;
+ void Return();
+ void SetDestinationToOutOfTower(T2TowerDoc*);
+ void ChangeDestination(unsigned int, unsigned int);
+ int CalcCurrEstimate() const;
+ void IncEstimate(int);
+ void UpdateEstimation();
+ int GetAverageStress() const;
+ int IncStress(int);
+protected:
+ int StressChanged();
+public:
+ int IsVIP() const;
+ int IsNamed() const;
+ void SetColor(int);
+ void ClearColor();
+ virtual void SetFavorite(int);
+ int VIPEstimation();
+ int SearchToilet(T2TowerDoc*);
+ void DrawSearchedPerson(T2TowerDoc*);
+ virtual void Draw(T2TowerDoc*, const RECT&);
+ void Draw(T2BitImage*, const RECT&);
+ void Draw(T2TowerDoc*, T2Equip*);
+ void DrawAt(T2TowerDoc*, T2Equip*, POINT);
+ void Duplicate(T2TowerDoc*);
+ void Remove(T2TowerDoc*, unsigned int);
+ void TenantRemoved(unsigned int);
+ void Interview(T2TowerDoc*);
+ int GetInterviewWords(T2TowerDoc*, CString&);
+ int IsMaru() const;
+ int IsReggae() const;
+ void BreakoutEmergency(T2TowerDoc*);
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+public:
+ void ResolveLink(T2PeopleArrayList*);
+ virtual T2InfoDialog* ShowInfoDialog(T2TowerDoc*);
+ void GetName(CString&);
+ virtual int GetSilhouetteRect(RECT&);
+ virtual void DrawHitMask(T2TowerDoc*);
+ void ClearSpecialFlag(unsigned int);
+ void SetSpecialFlag(unsigned int);
+
+ unsigned int GetPeopleID() { return 0; }
+ T2PeopleType* GetPeopleType() const { return 0; }
+ unsigned int GetEconoType() { return 0; }
+ int IsFatSilhouette() const { return 0; }
+ int IsInTower() const { return 0; }
+ int GetColor() const { return 0; }
+ int IsSetSpecialFlag(unsigned int) const { return 0; }
+ void SetToSleep() {}
+ int IsSleep() const { return 0; }
+ int IsWalk() const { return 0; }
+ void SetWalk(int) {}
+ void SetFiller(int) {}
+ void SetStyle(int) {}
+ int GetStyle() const { return 0; }
+ void SetSilhouetteDef(int, T2SilhouetteDef*) {}
+ void SetPeopleType(T2PeopleType*) {}
+ void SetPrevTenantType(int) {}
+ int GetPrevTenantType() const { return 0; }
+ void InitStress() {}
+ int GetStress() const { return 0; }
+ int GetEstimate() const { return 0; }
+ unsigned int GetAge() const { return 0; }
+ unsigned int GetSex() const { return 0; }
+};
diff --git a/src/T2DLL/T2PeopleAnimeDef.cpp b/src/T2DLL/T2PeopleAnimeDef.cpp
new file mode 100644
index 0000000..59e8ace
--- /dev/null
+++ b/src/T2DLL/T2PeopleAnimeDef.cpp
@@ -0,0 +1,25 @@
+#include "T2PeopleAnimeDef.h"
+
+T2PeopleAnimeDef::T2PeopleAnimeDef(CResFile&) {
+}
+
+void T2PeopleAnimeDef::Init() {
+}
+
+/*virtual*/ T2PeopleAnimeDef::~T2PeopleAnimeDef() {
+}
+
+void T2PeopleAnimeDef::Set(T2People*, int, int) {
+}
+
+T2PeopleAnimeDefElem::T2PeopleAnimeDefElem() {
+}
+
+/*virtual*/ T2PeopleAnimeDefElem::~T2PeopleAnimeDefElem() {
+}
+
+void T2PeopleAnimeDefElem::Initialize(CResFile&) {
+}
+
+void T2PeopleAnimeDefElem::Set(T2People*, int) {
+}
diff --git a/src/T2DLL/T2PeopleAnimeDef.h b/src/T2DLL/T2PeopleAnimeDef.h
new file mode 100644
index 0000000..e3c98ad
--- /dev/null
+++ b/src/T2DLL/T2PeopleAnimeDef.h
@@ -0,0 +1,25 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleAnimeDef {
+public:
+ T2PeopleAnimeDef(CResFile&);
+private:
+ void Init();
+public:
+ virtual ~T2PeopleAnimeDef();
+ void Set(T2People*, int, int);
+
+ T2PeopleAnimeDef(const T2PeopleAnimeDef&) {}
+ T2PeopleAnimeDef& operator=(const T2PeopleAnimeDef&) {}
+};
+class T2PeopleAnimeDefElem {
+public:
+ T2PeopleAnimeDefElem();
+ virtual ~T2PeopleAnimeDefElem();
+ void Initialize(CResFile&);
+ void Set(T2People*, int);
+
+ T2PeopleAnimeDefElem(const T2PeopleAnimeDefElem&) {}
+ T2PeopleAnimeDefElem& operator=(const T2PeopleAnimeDefElem&) {}
+};
diff --git a/src/T2DLL/T2PeopleArray.cpp b/src/T2DLL/T2PeopleArray.cpp
new file mode 100644
index 0000000..53a56e9
--- /dev/null
+++ b/src/T2DLL/T2PeopleArray.cpp
@@ -0,0 +1,40 @@
+#include "T2PeopleArray.h"
+
+T2PeopleArray::T2PeopleArray(unsigned int) {
+}
+
+T2People* T2PeopleArray::FindPeople(unsigned int) {
+}
+
+void T2PeopleArray::ResolveLink(T2PeopleArrayList*) {
+}
+
+T2People* T2PeopleArray::FindUnusedPeople() {
+}
+
+/*virtual*/ void T2PeopleArray::DispatchIdle(T2TowerDoc*, int) {
+}
+
+void T2PeopleArray::DrawSearchedPerson(T2TowerDoc*) {
+}
+
+void T2PeopleArray::SetWalkPeople(int) {
+}
+
+void T2PeopleArray::DayChanged() {
+}
+
+void T2PeopleArray::TenantRemoved(unsigned int) {
+}
+
+void T2PeopleArray::AddStress(int) {
+}
+
+void T2PeopleArray::BreakoutEmergency(T2TowerDoc*) {
+}
+
+void T2PeopleArray::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2PeopleArray::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2PeopleArray.h b/src/T2DLL/T2PeopleArray.h
new file mode 100644
index 0000000..3e1521c
--- /dev/null
+++ b/src/T2DLL/T2PeopleArray.h
@@ -0,0 +1,25 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleArray {
+public:
+ T2PeopleArray(unsigned int);
+ T2People* FindPeople(unsigned int);
+ void ResolveLink(T2PeopleArrayList*);
+ T2People* FindUnusedPeople();
+ virtual void DispatchIdle(T2TowerDoc*, int);
+ void DrawSearchedPerson(T2TowerDoc*);
+ void SetWalkPeople(int);
+ void DayChanged();
+ void TenantRemoved(unsigned int);
+ void AddStress(int);
+ void BreakoutEmergency(T2TowerDoc*);
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+
+ virtual ~T2PeopleArray() {}
+ T2People* GetIndexPeople(int) {}
+ T2PeopleArray(const T2PeopleArray&) {}
+ T2PeopleArray& operator=(const T2PeopleArray&) {}
+ void `default constructor closure'() {}
+};
diff --git a/src/T2DLL/T2PeopleArrayList.cpp b/src/T2DLL/T2PeopleArrayList.cpp
new file mode 100644
index 0000000..19db7d8
--- /dev/null
+++ b/src/T2DLL/T2PeopleArrayList.cpp
@@ -0,0 +1,46 @@
+#include "T2PeopleArrayList.h"
+
+T2PeopleArrayList::T2PeopleArrayList() {
+}
+
+/*virtual*/ T2PeopleArrayList::~T2PeopleArrayList() {
+}
+
+void T2PeopleArrayList::Add(T2PeopleArray*) {
+}
+
+unsigned int T2PeopleArrayList::GetItemCount() {
+}
+
+T2PeopleArray* T2PeopleArrayList::GetItemAt(int) {
+}
+
+T2People* T2PeopleArrayList::FindPeople(unsigned int) {
+}
+
+T2People* T2PeopleArrayList::FindUnusedPeople() {
+}
+
+void T2PeopleArrayList::DispatchIdle(T2TowerDoc*) {
+}
+
+void T2PeopleArrayList::DrawSearchedPerson(T2TowerDoc*) {
+}
+
+void T2PeopleArrayList::SetWalkPeople(int) {
+}
+
+void T2PeopleArrayList::TenantRemoved(unsigned int) {
+}
+
+void T2PeopleArrayList::AddStress(int) {
+}
+
+void T2PeopleArrayList::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2PeopleArrayList::Write(T2Archive&) {
+}
+
+void T2PeopleArrayList::BreakoutEmergency(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2PeopleArrayList.h b/src/T2DLL/T2PeopleArrayList.h
new file mode 100644
index 0000000..60c059c
--- /dev/null
+++ b/src/T2DLL/T2PeopleArrayList.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleArrayList {
+public:
+ T2PeopleArrayList();
+ virtual ~T2PeopleArrayList();
+ void Add(T2PeopleArray*);
+ unsigned int GetItemCount();
+ T2PeopleArray* GetItemAt(int);
+ T2People* FindPeople(unsigned int);
+ T2People* FindUnusedPeople();
+ void DispatchIdle(T2TowerDoc*);
+ void DrawSearchedPerson(T2TowerDoc*);
+ void SetWalkPeople(int);
+ void TenantRemoved(unsigned int);
+ void AddStress(int);
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+ void BreakoutEmergency(T2TowerDoc*);
+
+ T2PeopleArrayList(const T2PeopleArrayList&) {}
+ T2PeopleArrayList& operator=(const T2PeopleArrayList&) {}
+};
diff --git a/src/T2DLL/T2PeopleDef.cpp b/src/T2DLL/T2PeopleDef.cpp
new file mode 100644
index 0000000..1c07737
--- /dev/null
+++ b/src/T2DLL/T2PeopleDef.cpp
@@ -0,0 +1,10 @@
+#include "T2PeopleDef.h"
+
+T2PeopleDef::T2PeopleDef(unsigned long, T2PluginSpecifier&, CResFile*) {
+}
+
+/*virtual*/ T2PeopleDef::~T2PeopleDef() {
+}
+
+/*virtual*/ void T2PeopleDef::GetName(CString&) {
+}
diff --git a/src/T2DLL/T2PeopleDef.h b/src/T2DLL/T2PeopleDef.h
new file mode 100644
index 0000000..8f32c2c
--- /dev/null
+++ b/src/T2DLL/T2PeopleDef.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleDef {
+public:
+ T2PeopleDef(unsigned long, T2PluginSpecifier&, CResFile*);
+ virtual ~T2PeopleDef();
+ virtual void GetName(CString&);
+
+ int GetPeopleType() {}
+ int GetStressMax() {}
+ int GetStressBlueLimit() {}
+ int GetStressYellowLimit() {}
+ T2PeopleDef& operator=(T2PeopleDef&) {}
+};
diff --git a/src/T2DLL/T2PeopleDemandList.cpp b/src/T2DLL/T2PeopleDemandList.cpp
new file mode 100644
index 0000000..06e943c
--- /dev/null
+++ b/src/T2DLL/T2PeopleDemandList.cpp
@@ -0,0 +1,40 @@
+#include "T2PeopleDemandList.h"
+
+T2PeopleDemandList::T2PeopleDemandList(T2PoolDef*, T2SeasonParamDef*, T2WorldDef*) {
+}
+
+T2PeopleDemandList::T2PeopleDemandList(T2Archive&, T2SeasonParamDef*, T2WorldDef*) {
+}
+
+/*virtual*/ T2PeopleDemandList::~T2PeopleDemandList() {
+}
+
+void T2PeopleDemandList::Add(T2PeopleTimeZoneList*) {
+}
+
+void T2PeopleDemandList::Add(T2PoolGradeDef*) {
+}
+
+void T2PeopleDemandList::Init(unsigned int, unsigned int) {
+}
+
+void T2PeopleDemandList::IncHour(unsigned int) {
+}
+
+T2PeopleTimeZoneList* T2PeopleDemandList::GetItem(int) const {
+}
+
+int T2PeopleDemandList::Find(T2TenantMemberDef*, int, unsigned int, int) const {
+}
+
+int T2PeopleDemandList::Call(T2TenantMemberDef*, int, unsigned int, T2PeopleType&) const {
+}
+
+void T2PeopleDemandList::DispatchRestore(T2PeopleType&) {
+}
+
+void T2PeopleDemandList::DispatchAdd(T2PeopleType*) {
+}
+
+void T2PeopleDemandList::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2PeopleDemandList.h b/src/T2DLL/T2PeopleDemandList.h
new file mode 100644
index 0000000..1e4ceef
--- /dev/null
+++ b/src/T2DLL/T2PeopleDemandList.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleDemandList {
+public:
+ T2PeopleDemandList(T2PoolDef*, T2SeasonParamDef*, T2WorldDef*);
+ T2PeopleDemandList(T2Archive&, T2SeasonParamDef*, T2WorldDef*);
+ virtual ~T2PeopleDemandList();
+protected:
+ void Add(T2PeopleTimeZoneList*);
+public:
+ void Add(T2PoolGradeDef*);
+ void Init(unsigned int, unsigned int);
+ void IncHour(unsigned int);
+protected:
+ T2PeopleTimeZoneList* GetItem(int) const;
+public:
+ int Find(T2TenantMemberDef*, int, unsigned int, int) const;
+ int Call(T2TenantMemberDef*, int, unsigned int, T2PeopleType&) const;
+ void DispatchRestore(T2PeopleType&);
+ void DispatchAdd(T2PeopleType*);
+ void Write(T2Archive&);
+
+ T2PeopleDemandList(const T2PeopleDemandList&) {}
+ T2PeopleDemandList& operator=(const T2PeopleDemandList&) {}
+};
diff --git a/src/T2DLL/T2PeopleInfoDialog.cpp b/src/T2DLL/T2PeopleInfoDialog.cpp
new file mode 100644
index 0000000..1593309
--- /dev/null
+++ b/src/T2DLL/T2PeopleInfoDialog.cpp
@@ -0,0 +1,28 @@
+#include "T2PeopleInfoDialog.h"
+
+T2PeopleInfoDialog::T2PeopleInfoDialog(T2People*) {
+}
+
+/*virtual*/ T2PeopleInfoDialog::~T2PeopleInfoDialog() {
+}
+
+/*virtual*/ void T2PeopleInfoDialog::OnT2Create() {
+}
+
+CString T2PeopleInfoDialog::GetTenantName(T2TowerDoc*, unsigned int) {
+}
+
+/*virtual*/ void T2PeopleInfoDialog::CreateDlgItem(CTokenizer&, T2Dialog::T2DialogDef&) {
+}
+
+/*virtual*/ void T2PeopleInfoDialog::OnT2Destroy() {
+}
+
+/*virtual*/ int T2PeopleInfoDialog::OnT2DialogCommand(unsigned int, long) {
+}
+
+/*virtual*/ int T2PeopleInfoDialog::OnT2EraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2PeopleInfoDialog::OnT2OK() {
+}
diff --git a/src/T2DLL/T2PeopleInfoDialog.h b/src/T2DLL/T2PeopleInfoDialog.h
new file mode 100644
index 0000000..cd970bf
--- /dev/null
+++ b/src/T2DLL/T2PeopleInfoDialog.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleInfoDialog {
+public:
+ T2PeopleInfoDialog(T2People*);
+ virtual ~T2PeopleInfoDialog();
+protected:
+ virtual void OnT2Create();
+ CString GetTenantName(T2TowerDoc*, unsigned int);
+ virtual void CreateDlgItem(CTokenizer&, T2Dialog::T2DialogDef&);
+ virtual void OnT2Destroy();
+ virtual int OnT2DialogCommand(unsigned int, long);
+ virtual int OnT2EraseBkgnd(CDC*);
+ virtual void OnT2OK();
+};
diff --git a/src/T2DLL/T2PeopleLinkIterator.cpp b/src/T2DLL/T2PeopleLinkIterator.cpp
new file mode 100644
index 0000000..96ad5d8
--- /dev/null
+++ b/src/T2DLL/T2PeopleLinkIterator.cpp
@@ -0,0 +1,28 @@
+#include "T2PeopleLinkIterator.h"
+
+T2PeopleLinkIterator::T2PeopleLinkIterator(T2People* people)
+ : mFirst(people)
+ , mCurrent(people)
+{
+}
+
+/*virtual*/ T2PeopleLinkIterator::~T2PeopleLinkIterator() {
+}
+
+int T2PeopleLinkIterator::Current(T2People** pPeople) {
+ if (mCurrent) {
+ *pPeople = mCurrent;
+ return true;
+ }
+ return false;
+}
+
+int T2PeopleLinkIterator::Prev(T2People** pPeople) {
+ // TODO once T2Matter, T2People is done
+}
+
+int T2PeopleLinkIterator::Next(T2People** pPeople) {
+}
+
+void T2PeopleLinkIterator::Reset() {
+}
diff --git a/src/T2DLL/T2PeopleLinkIterator.h b/src/T2DLL/T2PeopleLinkIterator.h
new file mode 100644
index 0000000..e6b15a5
--- /dev/null
+++ b/src/T2DLL/T2PeopleLinkIterator.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleLinkIterator {
+public:
+ T2PeopleLinkIterator(T2People*);
+ virtual ~T2PeopleLinkIterator();
+ int Current(T2People**);
+ int Prev(T2People**);
+ int Next(T2People**);
+ void Reset();
+
+protected:
+ T2People *mFirst;
+ T2People *mCurrent;
+};
diff --git a/src/T2DLL/T2PeopleLoader.cpp b/src/T2DLL/T2PeopleLoader.cpp
new file mode 100644
index 0000000..3552889
--- /dev/null
+++ b/src/T2DLL/T2PeopleLoader.cpp
@@ -0,0 +1,13 @@
+#include "T2PeopleLoader.h"
+
+/*static*/ void T2PeopleLoader::Load(T2PluginSpecifier*, T2TemplatePluginDB*) {
+}
+
+/*static*/ void T2PeopleLoader::Unload(T2TemplatePluginDB*) {
+}
+
+/*static*/ int T2PeopleLoader::LoadSilhouette(T2PluginSpecifier*, T2TemplatePluginDB*) {
+}
+
+/*static*/ int T2PeopleLoader::LoadPeople(T2PluginSpecifier*, T2TemplatePluginDB*) {
+}
diff --git a/src/T2DLL/T2PeopleLoader.h b/src/T2DLL/T2PeopleLoader.h
new file mode 100644
index 0000000..f96a8f0
--- /dev/null
+++ b/src/T2DLL/T2PeopleLoader.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleLoader {
+public:
+ static void Load(T2PluginSpecifier*, T2TemplatePluginDB*);
+ static void Unload(T2TemplatePluginDB*);
+protected:
+ static int LoadSilhouette(T2PluginSpecifier*, T2TemplatePluginDB*);
+ static int LoadPeople(T2PluginSpecifier*, T2TemplatePluginDB*);
+
+public:
+ T2PeopleLoader& operator=(const T2PeopleLoader&) {}
+};
diff --git a/src/T2DLL/T2PeoplePtrList.cpp b/src/T2DLL/T2PeoplePtrList.cpp
new file mode 100644
index 0000000..cffd0fb
--- /dev/null
+++ b/src/T2DLL/T2PeoplePtrList.cpp
@@ -0,0 +1,52 @@
+#include "T2PeoplePtrList.h"
+
+T2PeoplePtrList::T2PeoplePtrList(int) {
+}
+
+/*virtual*/ T2PeoplePtrList::~T2PeoplePtrList() {
+}
+
+void T2PeoplePtrList::Init(unsigned int) {
+}
+
+int T2PeoplePtrList::Add(T2People*) {
+}
+
+T2People* T2PeoplePtrList::GetItemAt(int) const {
+}
+
+int T2PeoplePtrList::GetPeopleIndex(T2People*, int&) const {
+}
+
+int T2PeoplePtrList::HasSpace() const {
+}
+
+void T2PeoplePtrList::Clear() {
+}
+
+void T2PeoplePtrList::Clear(T2People*) {
+}
+
+void T2PeoplePtrList::SetDestination(unsigned int) {
+}
+
+void T2PeoplePtrList::ChangeDestination(unsigned int) {
+}
+
+void T2PeoplePtrList::SetReturn(unsigned int) {
+}
+
+void T2PeoplePtrList::IncStress(int) {
+}
+
+void T2PeoplePtrList::IncEstimate(int) {
+}
+
+int T2PeoplePtrList::InSameTenant(unsigned int) const {
+}
+
+void T2PeoplePtrList::LoadSelf(T2Archive&, T2PeopleArrayList*) {
+}
+
+void T2PeoplePtrList::SaveSelf(T2Archive&) const {
+}
diff --git a/src/T2DLL/T2PeoplePtrList.h b/src/T2DLL/T2PeoplePtrList.h
new file mode 100644
index 0000000..8738224
--- /dev/null
+++ b/src/T2DLL/T2PeoplePtrList.h
@@ -0,0 +1,29 @@
+#pragma once
+#include "common.h"
+
+class T2PeoplePtrList {
+public:
+ T2PeoplePtrList(int);
+ virtual ~T2PeoplePtrList();
+protected:
+ void Init(unsigned int);
+public:
+ int Add(T2People*);
+ T2People* GetItemAt(int) const;
+ int GetPeopleIndex(T2People*, int&) const;
+ int HasSpace() const;
+ void Clear();
+ void Clear(T2People*);
+ void SetDestination(unsigned int);
+ void ChangeDestination(unsigned int);
+ void SetReturn(unsigned int);
+ void IncStress(int);
+ void IncEstimate(int);
+ int InSameTenant(unsigned int) const;
+ void LoadSelf(T2Archive&, T2PeopleArrayList*);
+ void SaveSelf(T2Archive&) const;
+
+ T2PeoplePtrList(const T2PeoplePtrList&) {}
+ T2PeoplePtrList& operator=(const T2PeoplePtrList&) {}
+ void `default constructor closure'() {}
+};
diff --git a/src/T2DLL/T2PeopleTimeZoneList.cpp b/src/T2DLL/T2PeopleTimeZoneList.cpp
new file mode 100644
index 0000000..8cb68ee
--- /dev/null
+++ b/src/T2DLL/T2PeopleTimeZoneList.cpp
@@ -0,0 +1,43 @@
+#include "T2PeopleTimeZoneList.h"
+
+T2PeopleTimeZoneList::T2PeopleTimeZoneList(unsigned int, unsigned int, T2WorldDef*) {
+}
+
+T2PeopleTimeZoneList::T2PeopleTimeZoneList(T2Archive&, T2WorldDef*) {
+}
+
+/*virtual*/ T2PeopleTimeZoneList::~T2PeopleTimeZoneList() {
+}
+
+void T2PeopleTimeZoneList::Add(T2PeopleTypeArray*) {
+}
+
+void T2PeopleTimeZoneList::Add(T2PeopleType*, T2PoolDefDemandElem*) {
+}
+
+void T2PeopleTimeZoneList::Init(unsigned int, float) {
+}
+
+void T2PeopleTimeZoneList::IncHour(float) {
+}
+
+T2PeopleTypeArray* T2PeopleTimeZoneList::GetItem(int) const {
+}
+
+T2PeopleTypeArray* T2PeopleTimeZoneList::CurrentItem() const {
+}
+
+int T2PeopleTimeZoneList::Find(T2TenantMemberDef*, int, unsigned int, int) const {
+}
+
+int T2PeopleTimeZoneList::Call(T2TenantMemberDef*, int, unsigned int, T2PeopleType&) {
+}
+
+void T2PeopleTimeZoneList::DispatchRestore(T2PeopleType&) {
+}
+
+void T2PeopleTimeZoneList::DispatchAdd(T2PeopleType*) {
+}
+
+void T2PeopleTimeZoneList::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2PeopleTimeZoneList.h b/src/T2DLL/T2PeopleTimeZoneList.h
new file mode 100644
index 0000000..918471b
--- /dev/null
+++ b/src/T2DLL/T2PeopleTimeZoneList.h
@@ -0,0 +1,30 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleTimeZoneList {
+public:
+ T2PeopleTimeZoneList(unsigned int, unsigned int, T2WorldDef*);
+ T2PeopleTimeZoneList(T2Archive&, T2WorldDef*);
+ virtual ~T2PeopleTimeZoneList();
+protected:
+ void Add(T2PeopleTypeArray*);
+public:
+ void Add(T2PeopleType*, T2PoolDefDemandElem*);
+ void Init(unsigned int, float);
+ void IncHour(float);
+protected:
+ T2PeopleTypeArray* GetItem(int) const;
+ T2PeopleTypeArray* CurrentItem() const;
+public:
+ int Find(T2TenantMemberDef*, int, unsigned int, int) const;
+ int Call(T2TenantMemberDef*, int, unsigned int, T2PeopleType&);
+ void DispatchRestore(T2PeopleType&);
+ void DispatchAdd(T2PeopleType*);
+ void Write(T2Archive&);
+
+ T2PeopleTimeZoneList(const T2PeopleTimeZoneList&) {}
+ T2PeopleTimeZoneList& operator=(const T2PeopleTimeZoneList&) {}
+ int IsFixed() const {}
+protected:
+ int GetNumOfTimeZone() const {}
+};
diff --git a/src/T2DLL/T2PeopleType.cpp b/src/T2DLL/T2PeopleType.cpp
new file mode 100644
index 0000000..bf456c4
--- /dev/null
+++ b/src/T2DLL/T2PeopleType.cpp
@@ -0,0 +1,160 @@
+#include "T2Archive.h"
+#include "T2PeopleType.h"
+#include "T2TenantMemberDef.h"
+#include "UT2Utils.h"
+
+T2PeopleType::T2PeopleType() {
+ mAttribute = 0;
+ mSilhouetteType = 0;
+ mEconoType = 0;
+ mTransportType = 0;
+ mLife = 0;
+}
+
+T2PeopleType::~T2PeopleType() {
+}
+
+void T2PeopleType::SetDemandType(int v) {
+ mAttribute &= 0xF8;
+ mAttribute |= (v & 7);
+}
+
+void T2PeopleType::SetTimeZoneType(int v) {
+ mAttribute &= 7;
+ mAttribute |= ((v << 3) & 0xF8);
+}
+
+int T2PeopleType::GetDemandType() const {
+ return mAttribute & 7;
+}
+
+int T2PeopleType::GetTimeZoneType() const {
+ return (mAttribute & 0xF8) >> 3;
+}
+
+void T2PeopleType::RecoverLife() {
+ if (!IsImmortal())
+ mLife = 12;
+}
+
+void T2PeopleType::Duplicate(T2PeopleType& dest) const {
+ dest = *this;
+ dest.mLife = 1;
+
+ int econoType = mEconoType + UT2Utils::Randomize(3) - 1;
+ if (econoType <= 0)
+ econoType = 1;
+ else if (econoType >= 7)
+ econoType = 6;
+ dest.mEconoType = econoType;
+}
+
+int T2PeopleType::Check(T2TenantMemberDef* def, int var, unsigned int flags) const {
+ int result = (flags & (1 << mTransportType)) != 0;
+
+ if (result)
+ result = CheckSilhouetteType(def);
+ if (result)
+ result = CheckSilhouetteOptionType(def->GetOptionType());
+ if (result && var > -1) {
+ if (mEconoType < var || mEconoType >= (var + 3))
+ result = false;
+ }
+
+ return result;
+}
+
+int T2PeopleType::CheckWithDemand(T2TenantMemberDef* def, int var) const {
+ return (CheckDemandType(def->GetDemandType()) && Check(def, var, 0xFF));
+}
+
+int T2PeopleType::CheckDemandType(int demandType) const {
+ int result = true;
+
+ if (demandType != -1 && GetDemandType() != demandType)
+ result = false;
+
+ return result;
+}
+
+int T2PeopleType::CheckSilhouetteType(T2TenantMemberDef* def) const {
+ int result = true;
+ int start = def->GetStartSilhouetteType();
+
+ if (start < -1) {
+ switch (start) {
+ case -3:
+ if (mSilhouetteType < 8 || mSilhouetteType >= 16)
+ result = false;
+ break;
+ case -4:
+ if (mSilhouetteType < 16 || mSilhouetteType >= 24)
+ result = false;
+ break;
+ case -5:
+ if (mSilhouetteType < 24 || mSilhouetteType >= 56)
+ result = false;
+ break;
+ case -6:
+ if (mSilhouetteType < 30 || mSilhouetteType >= 51)
+ result = false;
+ break;
+ }
+ } else if (start > -1) {
+ if (mSilhouetteType < start) {
+ result = false;
+ } else {
+ int end = def->GetEndSilhouetteType();
+ if (mSilhouetteType > end)
+ result = false;
+ }
+ }
+
+ return result;
+}
+
+int T2PeopleType::CheckSilhouetteOptionType(int var) const {
+ int result = true;
+
+ if (var > -1) {
+ if (var & 1) {
+ if ((mSilhouetteType % 2) != 0)
+ result = false;
+ } else if (var & 2) {
+ if ((mSilhouetteType % 2) == 0)
+ result = false;
+ }
+
+ if (var & 4) {
+ if (((mSilhouetteType / 4) % 2) != 0)
+ result = false;
+ } else if (var & 8) {
+ if (((mSilhouetteType / 4) % 2) == 0)
+ result = false;
+ }
+ }
+
+ return result;
+}
+
+void T2PeopleType::Read(T2Archive& archive) {
+ char v;
+ archive >> v;
+ mAttribute = v;
+ archive >> v;
+ mSilhouetteType = v;
+ archive >> v;
+ mEconoType = v;
+ archive >> v;
+ mTransportType = v;
+ archive >> v;
+ mLife = v;
+}
+
+void T2PeopleType::Write(T2Archive& archive) {
+ archive << (char) mAttribute;
+ archive << (char) mSilhouetteType;
+ archive << (char) mEconoType;
+ archive << (char) mTransportType;
+ archive << (char) mLife;
+}
diff --git a/src/T2DLL/T2PeopleType.h b/src/T2DLL/T2PeopleType.h
new file mode 100644
index 0000000..cc3f7ee
--- /dev/null
+++ b/src/T2DLL/T2PeopleType.h
@@ -0,0 +1,53 @@
+#pragma once
+#include "common.h"
+
+class T2PeopleType {
+public:
+ T2PeopleType();
+ ~T2PeopleType();
+ void SetDemandType(int);
+ void SetTimeZoneType(int);
+ int GetDemandType() const;
+ int GetTimeZoneType() const;
+ void RecoverLife();
+ void Duplicate(T2PeopleType&) const;
+ int Check(T2TenantMemberDef*, int, unsigned int) const;
+ int CheckWithDemand(T2TenantMemberDef*, int) const;
+ void Read(T2Archive&);
+ void Write(T2Archive&);
+
+ void SetSilhouetteType(int v) { mSilhouetteType = v; }
+ void SetEconoType(int v) { mEconoType = v; }
+ void SetTransportType(int v) { mTransportType = v; }
+ void SetLifeCount(int v) { mLife = v; }
+ int GetSilhouetteType() const { return mSilhouetteType; }
+ int GetTransportType() const { return mTransportType; }
+ int GetAge() const {
+ return mSilhouetteType / 8;
+ }
+ int IsMale() const {
+ return (mSilhouetteType % 2) == 0;
+ }
+ int IsImmortal() const {
+ return (mLife == 127);
+ }
+ int HasLife() const {
+ return (mLife > 0);
+ }
+ void DecreaseLife() {
+ if (!IsImmortal())
+ mLife--;
+ }
+ int GetEconoType() const { return mEconoType; }
+
+protected:
+ int CheckDemandType(int) const;
+ int CheckSilhouetteType(T2TenantMemberDef*) const;
+ int CheckSilhouetteOptionType(int) const;
+
+ unsigned int mAttribute;
+ int mSilhouetteType;
+ int mEconoType;
+ int mLife;
+ int mTransportType;
+};
diff --git a/src/T2DLL/T2PeopleTypeArray.cpp b/src/T2DLL/T2PeopleTypeArray.cpp
new file mode 100644
index 0000000..c05769c
--- /dev/null
+++ b/src/T2DLL/T2PeopleTypeArray.cpp
@@ -0,0 +1,154 @@
+#include "T2Archive.h"
+#include "T2PeopleType.h"
+#include "T2PeopleTypeArray.h"
+#include "T2PoolDef.h"
+#include "T2TenantMemberDef.h"
+
+T2PeopleTypeArray::T2PeopleTypeArray(unsigned int val)
+ : LArray(sizeof(T2PeopleType))
+{
+ m24 = val;
+ m20 = 0;
+ InitSearchLimit(1.0f);
+}
+
+T2PeopleTypeArray::T2PeopleTypeArray(T2Archive& archive)
+ : LArray(sizeof(T2PeopleType))
+{
+ m20 = 0;
+ Read(archive);
+}
+
+/*virtual*/ T2PeopleTypeArray::~T2PeopleTypeArray() {
+}
+
+void T2PeopleTypeArray::Add(T2PeopleType* type, unsigned int count, int where) {
+ if (where == 0) {
+ for (unsigned int i = 0; i < count; i++)
+ LArray::Add(type);
+ } else {
+ InsertItemsAt(count, where, type);
+ }
+}
+
+void T2PeopleTypeArray::Add(T2PeopleType* type, T2PoolTimeZoneDef* timeZoneDef, unsigned int count) {
+ for (unsigned int i = 0; i < count; i++) {
+ unsigned int numOfElems = timeZoneDef->GetNumOfElems();
+ for (unsigned int j = 0; j < numOfElems; j++) {
+ PeopleElem *peopleElem = timeZoneDef->GetPeopleElem(j);
+#line 49
+ _ASSERT(peopleElem);
+
+ type->SetSilhouetteType(peopleElem->mSilhouetteType);
+ type->SetEconoType(peopleElem->mEconoType);
+ type->SetTransportType(peopleElem->mTransportType);
+ type->SetLifeCount(127);
+ Add(type, peopleElem->m4, 1);
+ }
+ }
+}
+
+void T2PeopleTypeArray::AdjustLife() {
+ for (int i = m2C; i >= m28; i--) {
+ T2PeopleType peopleType;
+ if (FetchItemAt(i, &peopleType)) {
+ peopleType.DecreaseLife();
+ if (peopleType.HasLife())
+ AssignItemsAt(1, i, &peopleType);
+ else
+ RemoveItemsAt(1, i);
+ }
+ }
+}
+
+void T2PeopleTypeArray::InitSearchLimit(float limit) {
+ m28 = 1;
+ m2C = GetCount();
+ if (m24 == 0)
+ m2C = m2C * limit;
+}
+
+int T2PeopleTypeArray::Find(T2TenantMemberDef* tenantMemberDef, int a, unsigned int b, int c) const {
+ int result = false;
+ T2PeopleType peopleType;
+
+ int numOfPeople = tenantMemberDef->GetNumOfPeople();
+ int xxx = 0;
+ int yyy = a;
+
+ if (numOfPeople > 1 && m24 != 0)
+ numOfPeople = 1;
+
+ for (int i = m28; !result && i <= m2C; i++) {
+ if (FetchItemAt(i, &peopleType)) {
+ if (peopleType.Check(tenantMemberDef, yyy, b)) {
+ xxx++;
+ if (xxx >= numOfPeople) {
+ result = true;
+ } else if (xxx == 1 && c) {
+ yyy = -1;
+ }
+ }
+ }
+ }
+
+ return result;
+}
+
+int T2PeopleTypeArray::Call(T2TenantMemberDef* tenantMemberDef, int a, unsigned int b, T2PeopleType& outPeopleType) {
+ int result = false;
+ T2PeopleType peopleType;
+
+ for (int i = m28; !result && i <= m2C; i++) {
+ if (FetchItemAt(i, &peopleType)) {
+ if (peopleType.Check(tenantMemberDef, a, b)) {
+ result = true;
+ outPeopleType = peopleType;
+ if (!m24) {
+ RemoveItemsAt(1, i);
+ m2C--;
+ }
+ }
+ }
+ }
+
+ return result;
+}
+
+void T2PeopleTypeArray::Restore(T2PeopleType& peopleType) {
+ peopleType.RecoverLife();
+ InsertItemsAt(1, 1, &peopleType);
+ m28++;
+ m2C++;
+}
+
+void T2PeopleTypeArray::Read(T2Archive& archive) {
+ RemoveItemsAt(GetCount(), 1);
+
+ int count;
+ archive >> count;
+
+ for (int i = 0; i < count; i++) {
+ T2PeopleType peopleType;
+ peopleType.Read(archive);
+ Add(&peopleType, 1);
+ }
+
+ archive >> m24;
+ archive >> m28;
+ archive >> m2C;
+}
+
+void T2PeopleTypeArray::Write(T2Archive& archive) {
+ archive << mItemCount;
+
+ LArrayIterator iter(*this);
+ T2PeopleType peopleType;
+
+ while (iter.Next(&peopleType))
+ peopleType.Write(archive);
+
+ archive << m24;
+ archive << m28;
+ archive << m2C;
+}
diff --git a/src/T2DLL/T2PeopleTypeArray.h b/src/T2DLL/T2PeopleTypeArray.h
new file mode 100644
index 0000000..f16734c
--- /dev/null
+++ b/src/T2DLL/T2PeopleTypeArray.h
@@ -0,0 +1,25 @@
+#pragma once
+#include "common.h"
+#include "LArray.h"
+
+class T2PeopleTypeArray : protected LArray {
+public:
+ T2PeopleTypeArray(unsigned int);
+ T2PeopleTypeArray(T2Archive&);
+ virtual ~T2PeopleTypeArray();
+ void Add(T2PeopleType* type, unsigned int count, int where = 0);
+ void Add(T2PeopleType*, T2PoolTimeZoneDef*, unsigned int);
+ void AdjustLife();
+ void InitSearchLimit(float);
+ int Find(T2TenantMemberDef*, int, unsigned int, int) const;
+ int Call(T2TenantMemberDef*, int, unsigned int, T2PeopleType&);
+ void Restore(T2PeopleType&);
+ void Write(T2Archive&);
+protected:
+ void Read(T2Archive&);
+
+ int m20;
+ unsigned int m24;
+ int m28;
+ int m2C;
+};
diff --git a/src/T2DLL/T2PlaceParamDef.cpp b/src/T2DLL/T2PlaceParamDef.cpp
new file mode 100644
index 0000000..a89b4e1
--- /dev/null
+++ b/src/T2DLL/T2PlaceParamDef.cpp
@@ -0,0 +1,15 @@
+#include "CResFile.h"
+#include "T2PlaceParamDef.h"
+
+T2PlaceParamDef::T2PlaceParamDef(CResFile& resFile) {
+ float divisor = 100.0f;
+
+ for (unsigned int i = 0; i < kMaxPlace; i++) {
+ resFile >> mEntries[i].mPercent;
+ resFile >> mEntries[i].mScore;
+ mEntries[i].mRate = mEntries[i].mPercent / divisor;
+ }
+}
+
+/*virtual*/ T2PlaceParamDef::~T2PlaceParamDef() {
+}
diff --git a/src/T2DLL/T2PlaceParamDef.h b/src/T2DLL/T2PlaceParamDef.h
new file mode 100644
index 0000000..b3165f4
--- /dev/null
+++ b/src/T2DLL/T2PlaceParamDef.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "common.h"
+
+class T2PlaceParamDef {
+public:
+ enum EPlace {
+ Place_0,
+ Place_1,
+ Place_2,
+ kMaxPlace
+ };
+
+ T2PlaceParamDef(CResFile& resFile);
+ virtual ~T2PlaceParamDef();
+
+ unsigned int GetPercent(EPlace place) const { return mEntries[place].mPercent; }
+ float GetRate(EPlace place) const { return mEntries[place].mRate; }
+ short GetScore(EPlace place) const { return mEntries[place].mScore; }
+
+protected:
+ struct {
+ unsigned int mPercent;
+ short mScore;
+ float mRate;
+ } mEntries[kMaxPlace];
+};
diff --git a/src/T2DLL/T2PluginInfoTable.cpp b/src/T2DLL/T2PluginInfoTable.cpp
new file mode 100644
index 0000000..718bc5c
--- /dev/null
+++ b/src/T2DLL/T2PluginInfoTable.cpp
@@ -0,0 +1,25 @@
+#include "T2PluginInfoTable.h"
+
+/*virtual*/ int T2PluginInfoTable::Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int) {
+}
+
+T2PluginInfoTable::T2PluginInfoTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2PluginInfoTable::~T2PluginInfoTable() {
+}
+
+void T2PluginInfoTable::Add(CPluginInfo*) {
+}
+
+void T2PluginInfoTable::Add(T2PluginSpecifier*) {
+}
+
+/*virtual*/ void T2PluginInfoTable::DrawCellSelf(CDC*, const TableCellT&, int) {
+}
+
+/*virtual*/ int T2PluginInfoTable::OnT2DlgItemCreate(CREATESTRUCTA*) {
+}
+
+/*virtual*/ int T2PluginInfoTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
diff --git a/src/T2DLL/T2PluginInfoTable.h b/src/T2DLL/T2PluginInfoTable.h
new file mode 100644
index 0000000..244efa3
--- /dev/null
+++ b/src/T2DLL/T2PluginInfoTable.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2PluginInfoTable {
+public:
+ virtual int Create(const char*, unsigned long, const RECT&, CWnd*, unsigned int);
+ T2PluginInfoTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2PluginInfoTable();
+ void Add(CPluginInfo*);
+ void Add(T2PluginSpecifier*);
+protected:
+ virtual void DrawCellSelf(CDC*, const TableCellT&, int);
+ virtual int OnT2DlgItemCreate(CREATESTRUCTA*);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+};
diff --git a/src/T2DLL/T2PluginLoader.cpp b/src/T2DLL/T2PluginLoader.cpp
new file mode 100644
index 0000000..57867ed
--- /dev/null
+++ b/src/T2DLL/T2PluginLoader.cpp
@@ -0,0 +1,214 @@
+#include "CT2App.h"
+#include "GlobalFunc.h"
+#include "T2PluginLoader.h"
+#include "T2PluginSpecifier.h"
+
+T2PluginLoader::T2PluginLoader() {
+}
+
+T2PluginLoader::~T2PluginLoader() {
+ POSITION p = mList.GetHeadPosition();
+ while (p) {
+ T2PluginSpecifier *spec = (T2PluginSpecifier *) mList.GetNext(p);
+ if (spec->mIsLoaded)
+ UnloadPlugin(spec);
+ delete spec;
+ }
+}
+
+void T2PluginLoader::InitFileList() {
+ char *dirBuf = (char *) malloc(1000);
+ GetTowerDirectory(dirBuf);
+ strcat(dirBuf, "Plugins\\");
+ char *dirBufEnd = &dirBuf[strlen(dirBuf)];
+
+ CString dbPath = GetTowerDirectory() + "plugins\\Database";
+ BOOL errorFlag = false;
+
+ CFile file;
+ if (file.Open(dbPath, CFile::modeRead)) {
+ CArchive archive(&file, CArchive::load);
+
+ DWORD count = mList.GetCount();
+ archive >> count;
+
+ for (unsigned int i = 0; i < count; i++) {
+ T2PluginSpecifier *spec = new T2PluginSpecifier;
+ spec->Read(archive);
+ mList.AddTail(spec);
+ }
+
+ archive.Close();
+ file.Close();
+
+ // check that the database is up-to-date
+ CFileStatus status;
+ int count2 = 0;
+
+ POSITION p = mList.GetHeadPosition();
+ while (p) {
+ T2PluginSpecifier *spec = (T2PluginSpecifier *) mList.GetNext(p);
+ if (CFile::GetStatus(spec->mPath, status)) {
+ if (status.m_mtime == spec->mTime)
+ count2++;
+ }
+ }
+
+ if (count2 != mList.GetCount())
+ errorFlag = true;
+
+ count2 = 0;
+
+ strcpy(dirBufEnd, "*.t2p");
+ WIN32_FIND_DATA findData;
+ HANDLE findHandle = FindFirstFile(dirBuf, &findData);
+ BOOL findOK = (findHandle != INVALID_HANDLE_VALUE);
+ while (findOK) {
+ findOK = FindNextFile(findHandle, &findData);
+ count2++;
+ }
+ FindClose(findHandle);
+
+ if (count2 != mList.GetCount())
+ errorFlag = true;
+ } else {
+ errorFlag = true;
+ }
+
+ if (errorFlag) {
+ // update the DB
+ AfxSetResourceHandle(gT2App->m_hInstance);
+
+ CDialog *dialog = new CDialog;
+ dialog->Create(1000);
+ gT2App->app_vfB4();
+
+ POSITION p = mList.GetHeadPosition();
+ while (p) {
+ T2PluginSpecifier *spec = (T2PluginSpecifier *) mList.GetNext(p);
+ delete spec;
+ }
+ mList.RemoveAll();
+
+ strcpy(dirBufEnd, "*.t2p");
+ WIN32_FIND_DATA findData;
+ HANDLE findHandle = FindFirstFile(dirBuf, &findData);
+ BOOL findOK = (findHandle != INVALID_HANDLE_VALUE);
+ while (findOK) {
+ strcpy(dirBufEnd, findData.cFileName);
+
+ T2PluginSpecifier *spec = new T2PluginSpecifier;
+ spec->Initialize(NULL, dirBuf);
+ spec->mInstance = NULL;
+ spec->mIsLoaded = false;
+ mList.AddTail(spec);
+
+ findOK = FindNextFile(findHandle, &findData);
+ }
+ FindClose(findHandle);
+
+ if (file.Open(dbPath, CFile::modeWrite | CFile::modeCreate)) {
+ CArchive archive(&file, CArchive::store);
+
+ DWORD count = mList.GetCount();
+ archive << count;
+
+ p = mList.GetHeadPosition();
+ while (p) {
+ T2PluginSpecifier *spec = (T2PluginSpecifier *) mList.GetNext(p);
+ spec->Write(archive);
+ }
+
+ archive.Close();
+ file.Close();
+ }
+
+ dialog->DestroyWindow();
+ }
+
+ free(dirBuf);
+}
+
+typedef void *(MSVC_STDCALL* ConstructProgramPluginType) (T2PluginSpecifier *);
+typedef void (MSVC_STDCALL* DestructProgramPluginType) (void);
+
+/*static*/ void* T2PluginLoader::LoadPlugin(T2PluginSpecifier* spec) {
+ if (!spec->mIsLoaded) {
+ HMODULE module = LoadLibrary(spec->mPath);
+ spec->mInstance = (HINSTANCE) module;
+ }
+
+ ConstructProgramPluginType func = (ConstructProgramPluginType) GetProcAddress((HMODULE) spec->mInstance, "ConstructProgramPlugin");
+#line 142
+ _ASSERT(func);
+
+ spec->mIsLoaded = true;
+ return func(spec);
+}
+
+/*static*/ void T2PluginLoader::UnloadPlugin(T2PluginSpecifier* spec) {
+ if (spec->mIsSubPlugin) {
+ spec->mIsLoaded = false;
+ return;
+ }
+
+#line 154
+ _ASSERT(spec->mIsLoaded);
+ DestructProgramPluginType func = (DestructProgramPluginType) GetProcAddress((HMODULE) spec->mInstance, "DestructProgramPlugin");
+#line 156
+ _ASSERT(func);
+
+ spec->mIsLoaded = false;
+ func();
+ FreeLibrary((HMODULE) spec->mInstance);
+}
+
+void T2PluginLoader::SetTypeFilter(POSITION& p, DWORD type) {
+ p = mList.GetHeadPosition();
+
+ if (type)
+ mTypeFilter = type;
+ else
+ mTypeFilter = 0;
+}
+
+T2PluginSpecifier* T2PluginLoader::GetNext(POSITION& p) {
+ while (p) {
+ T2PluginSpecifier *spec = (T2PluginSpecifier *) mList.GetNext(p);
+ if (
+ (mTypeFilter == 0 || spec->mType == mTypeFilter) &&
+ (spec->m28 == -1 || spec->m28 == 1) // 1 might be a version constant here
+ )
+ return spec;
+ }
+
+ return NULL;
+}
+
+T2PluginSpecifier* T2PluginLoader::FindPlugin(DWORD id, DWORD type) {
+ POSITION p;
+ T2PluginSpecifier *spec;
+
+ SetTypeFilter(p, type);
+
+ while ((spec = GetNext(p))) {
+ if (spec->mID == id)
+ return spec;
+ }
+
+ return NULL;
+}
+
+T2PluginSpecifier* T2PluginLoader::FindPlugin(const char* name, DWORD type) {
+ POSITION p;
+ T2PluginSpecifier *spec;
+
+ SetTypeFilter(p, type);
+
+ while ((spec = GetNext(p))) {
+ if (spec->mPluginName == name)
+ return spec;
+ }
+
+ return NULL;
+}
diff --git a/src/T2DLL/T2PluginLoader.h b/src/T2DLL/T2PluginLoader.h
new file mode 100644
index 0000000..58faf15
--- /dev/null
+++ b/src/T2DLL/T2PluginLoader.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2PluginLoader {
+public:
+ T2PluginLoader();
+ ~T2PluginLoader();
+ void InitFileList();
+ static void* LoadPlugin(T2PluginSpecifier*);
+ static void UnloadPlugin(T2PluginSpecifier*);
+ void SetTypeFilter(POSITION& p, DWORD type);
+ T2PluginSpecifier* GetNext(POSITION& p);
+ T2PluginSpecifier* FindPlugin(DWORD id, DWORD type);
+ T2PluginSpecifier* FindPlugin(const char* name, DWORD type);
+
+protected:
+ CObList mList;
+ DWORD mTypeFilter;
+};
diff --git a/src/T2DLL/T2PluginSpecifier.cpp b/src/T2DLL/T2PluginSpecifier.cpp
new file mode 100644
index 0000000..5e8c16b
--- /dev/null
+++ b/src/T2DLL/T2PluginSpecifier.cpp
@@ -0,0 +1,114 @@
+#include "T2PluginSpecifier.h"
+#include "CResFile.h"
+#include "GlobalFunc.h"
+
+T2PluginSpecifier::T2PluginSpecifier() {
+ mInstance = NULL;
+ mPluginName = "Not loaded";
+ mPath = "Not loaded";
+ mIsSubPlugin = false;
+ mType = 0;
+ mID = 0;
+ mSecretItem = 0;
+ m28 = -1;
+ mIsLoaded = 0;
+}
+
+/*virtual*/ void T2PluginSpecifier::operator=(T2PluginSpecifier& other) {
+ mInstance = other.mInstance;
+ mPluginName = other.mPluginName;
+ mPath = other.mPath;
+ mIsSubPlugin = other.mIsSubPlugin;
+ mType = other.mType;
+ mID = other.mID;
+ mAttrib = other.mAttrib;
+ mGameLevel = other.mGameLevel;
+ mSecretItem = other.mSecretItem;
+ m28 = other.m28;
+ mIsLoaded = other.mIsLoaded;
+ mTime = other.mTime;
+}
+
+void T2PluginSpecifier::Initialize(HINSTANCE inst, const char* path) {
+ CResFile resFile;
+
+ if (inst) {
+ if (!resFile.OpenResource(inst, 128, "ATTR")) {
+#line 45
+ __Rep1(__FILE__, __LINE__, "�v���O�C�������Ă��邩�A�ȑO��The Tower�U���Ù�I���������߂ÉA�v���O�C�����g���Ȃ��Ȃ��Ă��܂��B\nWindows���ċN�����Ă݂Ă��������B\n�v���O�C�� �F %s", (DWORD) path);
+ }
+ } else {
+ if (!resFile.OpenResource(path, 128, 'ATTR')) {
+#line 50
+ __Rep1(__FILE__, __LINE__, "�v���O�C�������Ă��邩�A�ȑO��The Tower�U���Ù�I���������߂ÉA�v���O�C�����g���Ȃ��Ȃ��Ă��܂��B\nWindows���ċN�����Ă݂Ă��������B\n�v���O�C�� �F %s", (DWORD) path);
+ }
+ }
+
+ int a;
+
+ resFile >> mID;
+ resFile >> mAttrib;
+ resFile >> a; // mDependID
+ resFile >> mGameLevel;
+ resFile >> mSecretItem;
+ resFile >> a; // mItemType
+ resFile >> a; // mMustItem
+ resFile >> mPluginName;
+
+ mIsSubPlugin = resFile.IsSubPlugin();
+ mPath = path;
+ mInstance = inst;
+ mIsLoaded = true;
+
+ if (inst) {
+ if (!resFile.OpenResource(inst, 128, "DESC")) {
+#line 68
+ __Rep1(__FILE__, __LINE__, "�v���O�C�������Ă��邩�A�ȑO��The Tower�U���Ù�I���������߂ÉA�v���O�C�����g���Ȃ��Ȃ��Ă��܂��B\nWindows���ċN�����Ă݂Ă��������B\n�v���O�C�� �F %s", (DWORD) path);
+ }
+ } else {
+ if (!resFile.OpenResource(path, 128, 'DESC')) {
+#line 73
+ __Rep1(__FILE__, __LINE__, "�v���O�C�������Ă��邩�A�ȑO��The Tower�U���Ù�I���������߂ÉA�v���O�C�����g���Ȃ��Ȃ��Ă��܂��B\nWindows���ċN�����Ă݂Ă��������B\n�v���O�C�� �F %s", (DWORD) path);
+ }
+ }
+
+ resFile >> mType;
+ resFile >> m28;
+
+ CFileStatus fileStatus;
+ CFile::GetStatus(path, fileStatus);
+ mTime = fileStatus.m_mtime;
+}
+
+void T2PluginSpecifier::Read(CArchive& archive) {
+ DWORD inst;
+ archive >> inst;
+ mInstance = (HINSTANCE) inst;
+ archive >> mPluginName;
+ archive >> mPath;
+ archive >> mIsSubPlugin;
+ archive >> mType;
+ archive >> mID;
+ archive >> mAttrib;
+ archive >> mGameLevel;
+ archive >> mSecretItem;
+ archive >> m28;
+ archive >> mIsLoaded;
+ archive >> mTime;
+}
+
+void T2PluginSpecifier::Write(CArchive& archive) {
+ DWORD inst = (DWORD) mInstance;
+ archive << inst;
+ archive << mPluginName;
+ archive << mPath;
+ archive << mIsSubPlugin;
+ archive << mType;
+ archive << mID;
+ archive << mAttrib;
+ archive << mGameLevel;
+ archive << mSecretItem;
+ archive << m28;
+ archive << mIsLoaded;
+ archive << mTime;
+}
diff --git a/src/T2DLL/T2PluginSpecifier.h b/src/T2DLL/T2PluginSpecifier.h
new file mode 100644
index 0000000..c6a6eb5
--- /dev/null
+++ b/src/T2DLL/T2PluginSpecifier.h
@@ -0,0 +1,27 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2PluginSpecifier : public CObject {
+public:
+ T2PluginSpecifier();
+ virtual void operator=(T2PluginSpecifier&);
+ void Initialize(HINSTANCE, const char*);
+ void Read(CArchive&);
+ void Write(CArchive&);
+
+ // virtual ~T2PluginSpecifier() {}
+
+public:
+ HINSTANCE mInstance;
+ CString mPluginName;
+ CString mPath;
+ BOOL mIsSubPlugin;
+ DWORD mID;
+ DWORD mType;
+ unsigned int mAttrib;
+ int mGameLevel;
+ int mSecretItem;
+ int m28; // maybe game version?
+ BOOL mIsLoaded;
+ CTime mTime;
+};
diff --git a/src/T2DLL/T2Pool.cpp b/src/T2DLL/T2Pool.cpp
new file mode 100644
index 0000000..1b1d709
--- /dev/null
+++ b/src/T2DLL/T2Pool.cpp
@@ -0,0 +1,58 @@
+#include "T2Pool.h"
+
+T2Pool::T2Pool(T2PoolDef*, T2SeasonParamDef*, T2TemplatePluginList*, T2PeopleArrayList*, int, unsigned int, unsigned int, T2WorldDef*) {
+}
+
+T2Pool::T2Pool(T2Archive&, T2PoolDef*, T2SeasonParamDef*, T2TemplatePluginList*, T2PeopleArrayList*, T2WorldDef*) {
+}
+
+/*virtual*/ T2Pool::~T2Pool() {
+}
+
+void T2Pool::GameLevelChanged(int) {
+}
+
+void T2Pool::IncHour(T2DateTime*) {
+}
+
+void T2Pool::DayChanged() {
+}
+
+int T2Pool::IsChangePopulation() {
+}
+
+int T2Pool::Find(T2TenantMemberDef*, int, unsigned int, int) const {
+}
+
+int T2Pool::Find(T2TenantMemberTableDef*, int, unsigned int, int) const {
+}
+
+T2People* T2Pool::Call(T2TenantMemberDef*, int, unsigned int, unsigned int) {
+}
+
+void T2Pool::Enter(T2People*) {
+}
+
+void T2Pool::Leave(T2People*) {
+}
+
+T2People* T2Pool::RecoverPeople(T2PeopleType*) {
+}
+
+void T2Pool::ShrinkPeople(T2People*, T2PeopleType&) {
+}
+
+void T2Pool::DuplicatePeople(T2PeopleType*) {
+}
+
+void T2Pool::RemovePeople(T2People*) {
+}
+
+T2People* T2Pool::BornVIP(int, int) {
+}
+
+void T2Pool::DeadVIP(T2People*) {
+}
+
+void T2Pool::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2Pool.h b/src/T2DLL/T2Pool.h
new file mode 100644
index 0000000..edd9020
--- /dev/null
+++ b/src/T2DLL/T2Pool.h
@@ -0,0 +1,33 @@
+#pragma once
+#include "common.h"
+
+class T2Pool {
+public:
+ T2Pool(T2PoolDef*, T2SeasonParamDef*, T2TemplatePluginList*, T2PeopleArrayList*, int, unsigned int, unsigned int, T2WorldDef*);
+ T2Pool(T2Archive&, T2PoolDef*, T2SeasonParamDef*, T2TemplatePluginList*, T2PeopleArrayList*, T2WorldDef*);
+ virtual ~T2Pool();
+ void GameLevelChanged(int);
+ void IncHour(T2DateTime*);
+protected:
+ void DayChanged();
+public:
+ int IsChangePopulation();
+ int Find(T2TenantMemberDef*, int, unsigned int, int) const;
+ int Find(T2TenantMemberTableDef*, int, unsigned int, int) const;
+ T2People* Call(T2TenantMemberDef*, int, unsigned int, unsigned int);
+ void Enter(T2People*);
+ void Leave(T2People*);
+protected:
+ T2People* RecoverPeople(T2PeopleType*);
+ void ShrinkPeople(T2People*, T2PeopleType&);
+public:
+ void DuplicatePeople(T2PeopleType*);
+ void RemovePeople(T2People*);
+ T2People* BornVIP(int, int);
+ void DeadVIP(T2People*);
+ void Write(T2Archive&);
+
+ T2Pool(const T2Pool&) {}
+ T2Pool& operator=(const T2Pool&) {}
+ int GetPopulation() const {}
+};
diff --git a/src/T2DLL/T2PoolDef.cpp b/src/T2DLL/T2PoolDef.cpp
new file mode 100644
index 0000000..8dba974
--- /dev/null
+++ b/src/T2DLL/T2PoolDef.cpp
@@ -0,0 +1,152 @@
+#include "CResFile.h"
+#include "T2PoolDef.h"
+
+T2PoolTimeZoneDef::T2PoolTimeZoneDef(CResFile &resFile) {
+ Initialize();
+
+ resFile >> mNumOfElems;
+ mPeopleElems = new PeopleElem[mNumOfElems];
+
+ unsigned int theSum = 0;
+
+ for (unsigned int i = 0; i < mNumOfElems; i++) {
+ resFile >> mPeopleElems[i].mSilhouetteType;
+ resFile >> mPeopleElems[i].mEconoType;
+ resFile >> mPeopleElems[i].mTransportType;
+ resFile >> mPeopleElems[i].mRate;
+ mPeopleElems[i].m4 = (mPeopleElems[i].mRate * 20) / 100;
+ theSum += mPeopleElems[i].m4;
+ }
+}
+
+void T2PoolTimeZoneDef::Initialize() {
+ mNumOfElems = 0;
+ mPeopleElems = NULL;
+}
+
+T2PoolTimeZoneDef::~T2PoolTimeZoneDef() {
+ delete[] mPeopleElems;
+}
+
+PeopleElem *T2PoolTimeZoneDef::GetPeopleElem(unsigned int index) const {
+ PeopleElem *elem = NULL;
+ if (index < mNumOfElems)
+ elem = &mPeopleElems[index];
+ return elem;
+}
+
+
+
+T2PoolDefDemandElem::T2PoolDefDemandElem() {
+ mNumOfElems = 0;
+ mElems = NULL;
+}
+
+void T2PoolDefDemandElem::Initialize(CResFile &resFile) {
+ resFile >> mNumOfElems;
+ mElems = new TimeZoneInfo[mNumOfElems];
+
+ for (unsigned int i = 0; i < mNumOfElems; i++) {
+ resFile >> mElems[i].m0;
+ resFile >> mElems[i].m4;
+ }
+}
+
+T2PoolDefDemandElem::~T2PoolDefDemandElem() {
+ delete[] mElems;
+}
+
+TimeZoneInfo *T2PoolDefDemandElem::GetTimeZoneInfo(unsigned int index) const {
+ TimeZoneInfo *elem = NULL;
+ if (index < mNumOfElems)
+ elem = &mElems[index];
+ return elem;
+}
+
+
+
+T2PoolGradeDef::T2PoolGradeDef(CResFile &resFile) {
+ Initialize();
+
+ resFile >> mNumOfElems;
+ mDemandElems = new T2PoolDefDemandElem[mNumOfElems];
+
+ for (unsigned int i = 0; i < mNumOfElems; i++) {
+ mDemandElems[i].Initialize(resFile);
+ }
+}
+
+void T2PoolGradeDef::Initialize() {
+ mNumOfElems = 0;
+ mDemandElems = NULL;
+}
+
+T2PoolGradeDef::~T2PoolGradeDef() {
+ delete[] mDemandElems;
+}
+
+T2PoolDefDemandElem *T2PoolGradeDef::GetDemandElem(unsigned int index) const {
+ T2PoolDefDemandElem *elem = NULL;
+ if (index < mNumOfElems)
+ elem = &mDemandElems[index];
+ return elem;
+}
+
+
+
+T2PoolDef::T2PoolDef(CResFile &resFile, T2WorldPlugin *worldPlugin) {
+ unsigned int i;
+
+ Initialize();
+
+ mWorldPlugin = worldPlugin;
+
+ resFile >> m8;
+ for (i = 0; i < 5; i++)
+ resFile >> mGradeDefResID[i];
+
+ resFile >> m20;
+ resFile >> mNumOfDemand;
+#line 129
+ _ASSERT(mNumOfDemand <= 8);
+
+ mDemand = new DemandInfo[mNumOfDemand];
+ for (i = 0; i < mNumOfDemand; i++) {
+ resFile >> mDemand[i].a;
+ resFile >> mDemand[i].b;
+ }
+}
+
+void T2PoolDef::Initialize() {
+ mWorldPlugin = NULL;
+ m20 = 0;
+ mNumOfDemand = 0;
+ m8 = 0;
+ for (unsigned int i = 0; i < 5; i++)
+ mGradeDefResID[i] = 0;
+ mDemand = NULL;
+}
+
+T2PoolDef::~T2PoolDef() {
+ delete[] mDemand;
+}
+
+HINSTANCE T2PoolDef::GetModuleHandle() {
+ // TODO T2WorldPlugin
+ return 0;
+}
+
+DemandInfo *T2PoolDef::GetDemandInfo(unsigned int index) const {
+ DemandInfo *info = NULL;
+ if (index < mNumOfDemand)
+ info = &mDemand[index];
+ return info;
+}
+
+int T2PoolDef::GetGradeDefResID(unsigned int index) const {
+ int resID = 0;
+ int index0 = index - 1;
+ if (index0 < 5)
+ resID = mGradeDefResID[index0];
+ return resID;
+}
diff --git a/src/T2DLL/T2PoolDef.h b/src/T2DLL/T2PoolDef.h
new file mode 100644
index 0000000..b999575
--- /dev/null
+++ b/src/T2DLL/T2PoolDef.h
@@ -0,0 +1,78 @@
+#pragma once
+#include "common.h"
+
+// actual name unknown
+struct PeopleElem {
+ unsigned char mSilhouetteType;
+ unsigned char mEconoType;
+ unsigned char mTransportType;
+ unsigned char mRate;
+ unsigned int m4;
+};
+
+class T2PoolTimeZoneDef {
+public:
+ T2PoolTimeZoneDef(CResFile &resFile);
+ void Initialize();
+ ~T2PoolTimeZoneDef();
+ PeopleElem *GetPeopleElem(unsigned int index) const;
+
+ // p sure this exists (1005f090)
+ unsigned int GetNumOfElems() const { return mNumOfElems; }
+
+ unsigned int mNumOfElems;
+ PeopleElem *mPeopleElems;
+};
+
+// actual name unknown
+struct TimeZoneInfo {
+ int m0;
+ unsigned int m4;
+};
+
+class T2PoolDefDemandElem {
+public:
+ T2PoolDefDemandElem();
+ void Initialize(CResFile &resFile);
+ ~T2PoolDefDemandElem();
+ TimeZoneInfo *GetTimeZoneInfo(unsigned int index) const;
+
+ unsigned int mNumOfElems;
+ TimeZoneInfo *mElems;
+};
+
+class T2PoolGradeDef {
+public:
+ T2PoolGradeDef(CResFile &resFile);
+ void Initialize();
+ virtual ~T2PoolGradeDef();
+ T2PoolDefDemandElem *GetDemandElem(unsigned int index) const;
+
+ unsigned int mNumOfElems;
+ T2PoolDefDemandElem *mDemandElems;
+};
+
+// actual name unknown
+struct DemandInfo {
+ int a;
+ unsigned char b;
+};
+
+class T2PoolDef {
+public:
+ T2PoolDef(CResFile &resFile, T2WorldPlugin *worldPlugin);
+ void Initialize();
+ virtual ~T2PoolDef();
+ HINSTANCE GetModuleHandle();
+ DemandInfo *GetDemandInfo(unsigned int index) const;
+ int GetGradeDefResID(unsigned int index) const;
+
+ unsigned char Get20() const { return m20; }
+
+ T2WorldPlugin *mWorldPlugin;
+ int m8;
+ int mGradeDefResID[5];
+ unsigned char m20;
+ unsigned char mNumOfDemand;
+ DemandInfo *mDemand;
+};
diff --git a/src/T2DLL/T2PrefDialogBox.cpp b/src/T2DLL/T2PrefDialogBox.cpp
new file mode 100644
index 0000000..c476826
--- /dev/null
+++ b/src/T2DLL/T2PrefDialogBox.cpp
@@ -0,0 +1,25 @@
+#include "T2PrefDialogBox.h"
+
+T2PrefDialogBox::T2PrefDialogBox() {
+}
+
+/*virtual*/ T2PrefDialogBox::~T2PrefDialogBox() {
+}
+
+/*virtual*/ int T2PrefDialogBox::OnT2DialogCommand(unsigned int, long) {
+}
+
+/*virtual*/ int T2PrefDialogBox::OnT2EraseBkgnd(CDC*) {
+}
+
+/*virtual*/ void T2PrefDialogBox::OnT2Create() {
+}
+
+/*virtual*/ void T2PrefDialogBox::OnT2Destroy() {
+}
+
+/*virtual*/ void T2PrefDialogBox::CreateDlgItem(CTokenizer&, T2Dialog::T2DialogDef&) {
+}
+
+void T2PrefDialogBox::SetupPluginPref() {
+}
diff --git a/src/T2DLL/T2PrefDialogBox.h b/src/T2DLL/T2PrefDialogBox.h
new file mode 100644
index 0000000..0fb015b
--- /dev/null
+++ b/src/T2DLL/T2PrefDialogBox.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2PrefDialogBox {
+public:
+ T2PrefDialogBox();
+ virtual ~T2PrefDialogBox();
+protected:
+ virtual int OnT2DialogCommand(unsigned int, long);
+ virtual int OnT2EraseBkgnd(CDC*);
+ virtual void OnT2Create();
+ virtual void OnT2Destroy();
+ virtual void CreateDlgItem(CTokenizer&, T2Dialog::T2DialogDef&);
+ void SetupPluginPref();
+};
diff --git a/src/T2DLL/T2PrefFile.cpp b/src/T2DLL/T2PrefFile.cpp
new file mode 100644
index 0000000..3b973e8
--- /dev/null
+++ b/src/T2DLL/T2PrefFile.cpp
@@ -0,0 +1,8 @@
+#include "T2PrefFile.h"
+
+T2PrefFile::T2PrefFile(const unsigned char* str1, const unsigned char* str2, int val) {
+ mStr = str2;
+}
+
+/*virtual*/ T2PrefFile::~T2PrefFile() {
+}
diff --git a/src/T2DLL/T2PrefFile.h b/src/T2DLL/T2PrefFile.h
new file mode 100644
index 0000000..1c33962
--- /dev/null
+++ b/src/T2DLL/T2PrefFile.h
@@ -0,0 +1,11 @@
+#pragma once
+#include "common.h"
+
+class T2PrefFile {
+public:
+ T2PrefFile(const unsigned char* str1, const unsigned char* str2, int val);
+ virtual ~T2PrefFile();
+
+protected:
+ CString mStr;
+};
diff --git a/src/T2DLL/T2RegistedTenantDB.cpp b/src/T2DLL/T2RegistedTenantDB.cpp
new file mode 100644
index 0000000..939d158
--- /dev/null
+++ b/src/T2DLL/T2RegistedTenantDB.cpp
@@ -0,0 +1,31 @@
+#include "T2RegistedTenantDB.h"
+
+T2RegistedTenantDB::T2RegistedTenantDB() {
+}
+
+/*virtual*/ T2RegistedTenantDB::~T2RegistedTenantDB() {
+}
+
+void T2RegistedTenantDB::Init(T2TenantArrayList*) {
+}
+
+void T2RegistedTenantDB::AddItem(T2Tenant*) {
+}
+
+void T2RegistedTenantDB::RemoveItem(T2Tenant*) {
+}
+
+T2EquipPtrList* T2RegistedTenantDB::GetList(unsigned int) const {
+}
+
+T2Tenant* T2RegistedTenantDB::GetFirstTenant(unsigned int) const {
+}
+
+T2Tenant* T2RegistedTenantDB::SearchToilet(const T2RouteNavigator*, POINT, int&) const {
+}
+
+T2Tenant* T2RegistedTenantDB::FindEmptyParking() const {
+}
+
+T2Tenant* T2RegistedTenantDB::FindHisParking(T2People*) const {
+}
diff --git a/src/T2DLL/T2RegistedTenantDB.h b/src/T2DLL/T2RegistedTenantDB.h
new file mode 100644
index 0000000..fbe75d9
--- /dev/null
+++ b/src/T2DLL/T2RegistedTenantDB.h
@@ -0,0 +1,19 @@
+#pragma once
+#include "common.h"
+
+class T2RegistedTenantDB {
+public:
+ T2RegistedTenantDB();
+ virtual ~T2RegistedTenantDB();
+ void Init(T2TenantArrayList*);
+ void AddItem(T2Tenant*);
+ void RemoveItem(T2Tenant*);
+ T2EquipPtrList* GetList(unsigned int) const;
+ T2Tenant* GetFirstTenant(unsigned int) const;
+ T2Tenant* SearchToilet(const T2RouteNavigator*, POINT, int&) const;
+ T2Tenant* FindEmptyParking() const;
+ T2Tenant* FindHisParking(T2People*) const;
+
+ T2RegistedTenantDB(const T2RegistedTenantDB&) {}
+ T2RegistedTenantDB& operator=(const T2RegistedTenantDB&) {}
+};
diff --git a/src/T2DLL/T2RegistedTenantIterator.cpp b/src/T2DLL/T2RegistedTenantIterator.cpp
new file mode 100644
index 0000000..ee47955
--- /dev/null
+++ b/src/T2DLL/T2RegistedTenantIterator.cpp
@@ -0,0 +1,13 @@
+#include "T2RegistedTenantIterator.h"
+
+T2RegistedTenantIterator::T2RegistedTenantIterator(const T2RegistedTenantDB*, unsigned int, const T2RouteNavigator*, POINT) {
+}
+
+T2RegistedTenantIterator::~T2RegistedTenantIterator() {
+}
+
+int T2RegistedTenantIterator::Next(T2Tenant*&) {
+}
+
+int T2RegistedTenantIterator::NextJob(T2Tenant*&) {
+}
diff --git a/src/T2DLL/T2RegistedTenantIterator.h b/src/T2DLL/T2RegistedTenantIterator.h
new file mode 100644
index 0000000..7f4a58a
--- /dev/null
+++ b/src/T2DLL/T2RegistedTenantIterator.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class T2RegistedTenantIterator {
+public:
+ T2RegistedTenantIterator(const T2RegistedTenantDB*, unsigned int, const T2RouteNavigator*, POINT);
+ ~T2RegistedTenantIterator();
+ int Next(T2Tenant*&);
+ int NextJob(T2Tenant*&);
+
+ T2RegistedTenantIterator& operator=(const T2RegistedTenantIterator&) {}
+};
diff --git a/src/T2DLL/T2RemoveFavoriteDialog.cpp b/src/T2DLL/T2RemoveFavoriteDialog.cpp
new file mode 100644
index 0000000..1a64b4e
--- /dev/null
+++ b/src/T2DLL/T2RemoveFavoriteDialog.cpp
@@ -0,0 +1,25 @@
+#include "T2RemoveFavoriteDialog.h"
+
+T2RemoveFavoriteDialog::T2RemoveFavoriteDialog() {
+}
+
+/*virtual*/ T2RemoveFavoriteDialog::~T2RemoveFavoriteDialog() {
+}
+
+/*virtual*/ void T2RemoveFavoriteDialog::OnT2Create() {
+}
+
+/*virtual*/ void T2RemoveFavoriteDialog::CreateDlgItem(CTokenizer&, T2Dialog::T2DialogDef&) {
+}
+
+/*virtual*/ void T2RemoveFavoriteDialog::OnT2Destroy() {
+}
+
+/*virtual*/ int T2RemoveFavoriteDialog::OnT2DialogCommand(unsigned int, long) {
+}
+
+void T2RemoveFavoriteDialog::InitializeForRemovePeople(T2TowerDoc*) {
+}
+
+void T2RemoveFavoriteDialog::InitializeForRemoveTenant(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2RemoveFavoriteDialog.h b/src/T2DLL/T2RemoveFavoriteDialog.h
new file mode 100644
index 0000000..fbcebd3
--- /dev/null
+++ b/src/T2DLL/T2RemoveFavoriteDialog.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2RemoveFavoriteDialog {
+public:
+ T2RemoveFavoriteDialog();
+ virtual ~T2RemoveFavoriteDialog();
+protected:
+ virtual void OnT2Create();
+ virtual void CreateDlgItem(CTokenizer&, T2Dialog::T2DialogDef&);
+ virtual void OnT2Destroy();
+ virtual int OnT2DialogCommand(unsigned int, long);
+public:
+ void InitializeForRemovePeople(T2TowerDoc*);
+ void InitializeForRemoveTenant(T2TowerDoc*);
+};
diff --git a/src/T2DLL/T2Request.cpp b/src/T2DLL/T2Request.cpp
new file mode 100644
index 0000000..7ae0b8e
--- /dev/null
+++ b/src/T2DLL/T2Request.cpp
@@ -0,0 +1,118 @@
+#include "T2Request.h"
+
+T2Request::T2Request() {
+}
+
+/*virtual*/ T2Request::~T2Request() {
+}
+
+void T2Request::InitRequest(unsigned int, int, const RECT&) {
+}
+
+void T2Request::InitRequest(T2FloorInfo*, unsigned int, POINT, ERequestUpDown) {
+}
+
+void T2Request::RemoveRequest(T2TowerDoc*) {
+}
+
+void T2Request::RemoveContents(T2FloorInfo*) {
+}
+
+/*virtual*/ void T2Request::SetUsed(int) {
+}
+
+void T2Request::StopRemoved(T2TowerDoc*, int) {
+}
+
+void T2Request::CalcArea(RECT&) {
+}
+
+void T2Request::CalcOnArea(RECT&) {
+}
+
+void T2Request::CalcOffArea(RECT&) {
+}
+
+void T2Request::CalcPrevArea(RECT&) {
+}
+
+int T2Request::CalcPersonArea(T2People*, RECT&) {
+}
+
+/*virtual*/ int T2Request::Enter(CLink*) {
+}
+
+/*virtual*/ int T2Request::Leave(CLink*) {
+}
+
+T2People* T2Request::LeaveFirst() {
+}
+
+int T2Request::Regist(T2TowerDoc*, T2People*) {
+}
+
+void T2Request::ChangeOffPPLStatus(T2FloorInfo*, T2People*) {
+}
+
+void T2Request::AddOnPeople(T2People*) {
+}
+
+T2People* T2Request::RemoveOnPeople() {
+}
+
+void T2Request::AddOffPeople(T2People*) {
+}
+
+T2People* T2Request::RemoveOffPeople() {
+}
+
+/*virtual*/ unsigned int T2Request::Idle(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Request::Draw(T2TowerDoc*, const RECT&) {
+}
+
+void T2Request::DrawUp(T2TowerDoc*, const RECT&) {
+}
+
+void T2Request::DrawDown(T2TowerDoc*, const RECT&) {
+}
+
+void* T2Request::GetInfoClick(T2TowerDoc*, POINT) {
+}
+
+void* T2Request::GetInfoClickUp(T2TowerDoc*, POINT) {
+}
+
+void* T2Request::GetInfoClickDown(T2TowerDoc*, POINT) {
+}
+
+void T2Request::BreakoutEmergency(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Request::LoadSelf(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Request::SaveSelf(T2Archive&) {
+}
+
+T2People* T2Request::FindPeople(int) const {
+}
+
+int T2Request::CalcIncQueueArea(RECT&) const {
+}
+
+void T2Request::DrawFinished() {
+}
+
+T2People* T2Request::FindUpPeople(int) const {
+}
+
+T2People* T2Request::FindDownPeople(int) const {
+}
+
+void T2Request::CalcValidArea(RECT&) {
+}
+
+/*virtual*/ void T2Request::DrawHitMask(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2Request.h b/src/T2DLL/T2Request.h
new file mode 100644
index 0000000..0657b3a
--- /dev/null
+++ b/src/T2DLL/T2Request.h
@@ -0,0 +1,67 @@
+#pragma once
+#include "common.h"
+
+class T2Request {
+public:
+ T2Request();
+ virtual ~T2Request();
+ void InitRequest(unsigned int, int, const RECT&);
+ void InitRequest(T2FloorInfo*, unsigned int, POINT, ERequestUpDown);
+ void RemoveRequest(T2TowerDoc*);
+protected:
+ void RemoveContents(T2FloorInfo*);
+public:
+ virtual void SetUsed(int);
+ void StopRemoved(T2TowerDoc*, int);
+ void CalcArea(RECT&);
+ void CalcOnArea(RECT&);
+ void CalcOffArea(RECT&);
+ void CalcPrevArea(RECT&);
+ int CalcPersonArea(T2People*, RECT&);
+ virtual int Enter(CLink*);
+ virtual int Leave(CLink*);
+ T2People* LeaveFirst();
+ int Regist(T2TowerDoc*, T2People*);
+ void ChangeOffPPLStatus(T2FloorInfo*, T2People*);
+ void AddOnPeople(T2People*);
+ T2People* RemoveOnPeople();
+ void AddOffPeople(T2People*);
+ T2People* RemoveOffPeople();
+ virtual unsigned int Idle(T2TowerDoc*);
+ virtual void Draw(T2TowerDoc*, const RECT&);
+protected:
+ void DrawUp(T2TowerDoc*, const RECT&);
+ void DrawDown(T2TowerDoc*, const RECT&);
+ void* GetInfoClick(T2TowerDoc*, POINT);
+ void* GetInfoClickUp(T2TowerDoc*, POINT);
+ void* GetInfoClickDown(T2TowerDoc*, POINT);
+public:
+ void BreakoutEmergency(T2TowerDoc*);
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+public:
+ T2People* FindPeople(int) const;
+protected:
+ int CalcIncQueueArea(RECT&) const;
+ void DrawFinished();
+ T2People* FindUpPeople(int) const;
+ T2People* FindDownPeople(int) const;
+public:
+ void CalcValidArea(RECT&);
+ virtual void DrawHitMask(T2TowerDoc*);
+
+ unsigned int GetRequestID() const {}
+ unsigned int GetMoverID() const {}
+ void MoverIDChanged(unsigned int) {}
+ ERequestUpDown GetUpDown() const {}
+ POINT GetHeadPosition() const {}
+ int GetModuleIndex() const {}
+ int IsModuleReserved() const {}
+ void CancelReservingModule() {}
+ int GetDrawWidth() const {}
+ void SetDrawWidth(int) {}
+ int GetNumOfContent() const {}
+ T2Request(const T2Request&) {}
+ T2Request& operator=(const T2Request&) {}
+};
diff --git a/src/T2DLL/T2RequestArray.cpp b/src/T2DLL/T2RequestArray.cpp
new file mode 100644
index 0000000..ddaf603
--- /dev/null
+++ b/src/T2DLL/T2RequestArray.cpp
@@ -0,0 +1,22 @@
+#include "T2RequestArray.h"
+
+T2RequestArray::T2RequestArray(unsigned int) {
+}
+
+/*virtual*/ T2RequestArray::~T2RequestArray() {
+}
+
+T2Request* T2RequestArray::FindUnusedRequest() {
+}
+
+/*virtual*/ void T2RequestArray::DispatchIdle(T2TowerDoc*, int) {
+}
+
+void T2RequestArray::BreakoutEmergency(T2TowerDoc*) {
+}
+
+void T2RequestArray::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2RequestArray::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2RequestArray.h b/src/T2DLL/T2RequestArray.h
new file mode 100644
index 0000000..67eb51f
--- /dev/null
+++ b/src/T2DLL/T2RequestArray.h
@@ -0,0 +1,18 @@
+#pragma once
+#include "common.h"
+
+class T2RequestArray {
+public:
+ T2RequestArray(unsigned int);
+ virtual ~T2RequestArray();
+ T2Request* FindUnusedRequest();
+ virtual void DispatchIdle(T2TowerDoc*, int);
+ void BreakoutEmergency(T2TowerDoc*);
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+
+ T2Request* GetIndexRequest(int) {}
+ T2RequestArray(const T2RequestArray&) {}
+ T2RequestArray& operator=(const T2RequestArray&) {}
+ void `default constructor closure'() {}
+};
diff --git a/src/T2DLL/T2RequestArrayList.cpp b/src/T2DLL/T2RequestArrayList.cpp
new file mode 100644
index 0000000..1bc4a9b
--- /dev/null
+++ b/src/T2DLL/T2RequestArrayList.cpp
@@ -0,0 +1,34 @@
+#include "T2RequestArrayList.h"
+
+T2RequestArrayList::T2RequestArrayList() {
+}
+
+/*virtual*/ T2RequestArrayList::~T2RequestArrayList() {
+}
+
+void T2RequestArrayList::Add(T2RequestArray*) {
+}
+
+unsigned int T2RequestArrayList::GetItemCount() {
+}
+
+T2RequestArray* T2RequestArrayList::GetItemAt(int) {
+}
+
+T2Request* T2RequestArrayList::GetRequestByID(unsigned int) {
+}
+
+T2Request* T2RequestArrayList::FindUnusedRequest() {
+}
+
+void T2RequestArrayList::BreakoutEmergency(T2TowerDoc*) {
+}
+
+void T2RequestArrayList::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2RequestArrayList::Write(T2Archive&) {
+}
+
+void T2RequestArrayList::DispatchIdle(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2RequestArrayList.h b/src/T2DLL/T2RequestArrayList.h
new file mode 100644
index 0000000..a481e8d
--- /dev/null
+++ b/src/T2DLL/T2RequestArrayList.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+
+class T2RequestArrayList {
+public:
+ T2RequestArrayList();
+ virtual ~T2RequestArrayList();
+ void Add(T2RequestArray*);
+ unsigned int GetItemCount();
+ T2RequestArray* GetItemAt(int);
+ T2Request* GetRequestByID(unsigned int);
+ T2Request* FindUnusedRequest();
+ void BreakoutEmergency(T2TowerDoc*);
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+ void DispatchIdle(T2TowerDoc*);
+
+ T2RequestArrayList(const T2RequestArrayList&) {}
+ T2RequestArrayList& operator=(const T2RequestArrayList&) {}
+};
diff --git a/src/T2DLL/T2RequestIDArray.cpp b/src/T2DLL/T2RequestIDArray.cpp
new file mode 100644
index 0000000..5cd2209
--- /dev/null
+++ b/src/T2DLL/T2RequestIDArray.cpp
@@ -0,0 +1,52 @@
+#include "T2RequestIDArray.h"
+
+T2RequestIDArray::T2RequestIDArray() {
+}
+
+/*virtual*/ T2RequestIDArray::~T2RequestIDArray() {
+}
+
+void T2RequestIDArray::Init(const RECT&) {
+}
+
+unsigned int T2RequestIDArray::GetItemCount() const {
+}
+
+void T2RequestIDArray::AllClear() {
+}
+
+void T2RequestIDArray::Expand(EReqIDArrayPos, int) {
+}
+
+void T2RequestIDArray::SetRequestIDAt(int, ERequestUpDown, unsigned int) {
+}
+
+unsigned int T2RequestIDArray::GetRequestIDAt(int, ERequestUpDown) const {
+}
+
+int T2RequestIDArray::GetIndex(int, ERequestUpDown) const {
+}
+
+int T2RequestIDArray::IsStopPosition(int) const {
+}
+
+void T2RequestIDArray::RemoveRequest(T2TowerDoc*, int, ERequestUpDown) {
+}
+
+void T2RequestIDArray::Union(T2RequestIDArray*) {
+}
+
+void T2RequestIDArray::MoverIDChanged(T2FloorInfo*, unsigned int) {
+}
+
+void T2RequestIDArray::StopRemoved(T2TowerDoc*, int) {
+}
+
+void T2RequestIDArray::ModuleRemoved(T2TowerDoc*, unsigned int) {
+}
+
+/*static*/ T2RequestIDArray* T2RequestIDArray::ReadReqIDArray(T2Archive&) {
+}
+
+/*static*/ void T2RequestIDArray::WriteReqIDArray(T2RequestIDArray*, T2Archive&) {
+}
diff --git a/src/T2DLL/T2RequestIDArray.h b/src/T2DLL/T2RequestIDArray.h
new file mode 100644
index 0000000..3351078
--- /dev/null
+++ b/src/T2DLL/T2RequestIDArray.h
@@ -0,0 +1,28 @@
+#pragma once
+#include "common.h"
+
+class T2RequestIDArray {
+public:
+ T2RequestIDArray();
+ virtual ~T2RequestIDArray();
+ void Init(const RECT&);
+ unsigned int GetItemCount() const;
+ void AllClear();
+ void Expand(EReqIDArrayPos, int);
+ void SetRequestIDAt(int, ERequestUpDown, unsigned int);
+ unsigned int GetRequestIDAt(int, ERequestUpDown) const;
+private:
+ int GetIndex(int, ERequestUpDown) const;
+public:
+ int IsStopPosition(int) const;
+ void RemoveRequest(T2TowerDoc*, int, ERequestUpDown);
+ void Union(T2RequestIDArray*);
+ void MoverIDChanged(T2FloorInfo*, unsigned int);
+ void StopRemoved(T2TowerDoc*, int);
+ void ModuleRemoved(T2TowerDoc*, unsigned int);
+ static T2RequestIDArray* ReadReqIDArray(T2Archive&);
+ static void WriteReqIDArray(T2RequestIDArray*, T2Archive&);
+
+ T2RequestIDArray(const T2RequestIDArray&) {}
+ T2RequestIDArray& operator=(const T2RequestIDArray&) {}
+};
diff --git a/src/T2DLL/T2ReturnStack.cpp b/src/T2DLL/T2ReturnStack.cpp
new file mode 100644
index 0000000..4c046bb
--- /dev/null
+++ b/src/T2DLL/T2ReturnStack.cpp
@@ -0,0 +1,140 @@
+#include "T2Archive.h"
+#include "T2ReturnStack.h"
+
+T2ReturnStack::T2ReturnStack() {
+ Init();
+}
+
+T2ReturnStack::~T2ReturnStack() {
+}
+
+void T2ReturnStack::Init() {
+ for (int i = 0; i < 3; i++) {
+ mEntries[i].tenant = 0;
+ mEntries[i].time = 0;
+ }
+ mCount = 0;
+}
+
+BOOL T2ReturnStack::Current(unsigned int &tenant, unsigned int &time) {
+ if (mCount > 0) {
+ tenant = mEntries[0].tenant;
+ time = mEntries[0].time;
+ return true;
+ }
+ return false;
+}
+
+BOOL T2ReturnStack::Push(unsigned int tenant, unsigned int time) {
+ if (mCount < 3) {
+ for (int i = mCount - 1; i >= 0; i--) {
+ mEntries[i + 1] = mEntries[i];
+ }
+ mCount++;
+ mEntries[0].tenant = tenant;
+ mEntries[0].time = time;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+BOOL T2ReturnStack::Pop(unsigned int &tenant, unsigned int &time) {
+ if (mCount > 0) {
+ tenant = mEntries[0].tenant;
+ time = mEntries[0].time;
+ for (int i = 1; i < mCount; i++) {
+ mEntries[i - 1] = mEntries[i];
+ }
+ mCount--;
+ return true;
+ } else {
+ return false;
+ }
+}
+
+BOOL T2ReturnStack::IsSetTime() const {
+ BOOL result = false;
+ if (mCount > 0 && mEntries[0].time != 0)
+ result = true;
+ return result;
+}
+
+unsigned int T2ReturnStack::GetTenant() const {
+ unsigned int result = 0;
+ if (mCount > 0)
+ result = mEntries[0].tenant;
+ return result;
+}
+
+unsigned int T2ReturnStack::GetTime() const {
+ unsigned int result = 0;
+ if (mCount > 0)
+ result = mEntries[0].time;
+ return result;
+}
+
+void T2ReturnStack::SetTime(unsigned int time) {
+ if (mCount > 0)
+ mEntries[0].time = time;
+}
+
+void T2ReturnStack::DayChanged() {
+ for (int i = 0; i < mCount; i++) {
+ if (mEntries[i].time >= 1440) {
+ mEntries[i].time -= 1440;
+ } else if (mEntries[i].time > 1438) {
+ mEntries[i].time = 0;
+ }
+ }
+}
+
+BOOL T2ReturnStack::Remove(unsigned int tenant) {
+ BOOL result = false;
+
+ for (int i = 0; i < mCount; i++) {
+ if (!result) {
+ if (mEntries[i].tenant == tenant)
+ result = true;
+ } else {
+ mEntries[i - 1] = mEntries[i];
+ }
+ }
+
+ if (result)
+ mCount--;
+
+ return result;
+}
+
+void T2ReturnStack::Peek(int index, unsigned int &tenant, unsigned int &time) {
+ tenant = mEntries[index].tenant;
+ time = mEntries[index].time;
+}
+
+void T2ReturnStack::Poke(int index, unsigned int tenant, unsigned int time) {
+ mEntries[index].tenant = tenant;
+ mEntries[index].time = time;
+}
+
+void T2ReturnStack::Read(T2Archive &stream, T2TowerDoc *towerDoc) {
+ stream >> mCount;
+ for (int i = 0; i < mCount; i++) {
+ unsigned short v;
+ stream >> v;
+ mEntries[i].tenant = v;
+ stream >> v;
+ mEntries[i].time = v;
+ }
+}
+
+void T2ReturnStack::Write(T2Archive &stream) {
+ stream << mCount;
+ for (int i = 0; i < mCount; i++) {
+ unsigned short v;
+ v = mEntries[i].tenant;
+ stream << v;
+ v = mEntries[i].time;
+ stream << v;
+ }
+}
diff --git a/src/T2DLL/T2ReturnStack.h b/src/T2DLL/T2ReturnStack.h
new file mode 100644
index 0000000..c2db87f
--- /dev/null
+++ b/src/T2DLL/T2ReturnStack.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "common.h"
+
+class T2ReturnStack {
+public:
+ T2ReturnStack();
+ virtual ~T2ReturnStack();
+ void Init();
+ BOOL Current(unsigned int &tenant, unsigned int &time);
+ BOOL Push(unsigned int tenant, unsigned int time);
+ BOOL Pop(unsigned int &tenant, unsigned int &time);
+ BOOL IsSetTime() const;
+ unsigned int GetTenant() const;
+ unsigned int GetTime() const;
+ void SetTime(unsigned int time);
+ void DayChanged();
+ BOOL Remove(unsigned int tenant);
+ void Peek(int index, unsigned int &tenant, unsigned int &time);
+ void Poke(int index, unsigned int tenant, unsigned int time);
+ void Read(T2Archive &stream, T2TowerDoc *towerDoc);
+ void Write(T2Archive &stream);
+
+ // TODO: confirm me
+ BOOL IsSet() const { return mCount > 0; }
+
+ struct Entry {
+ unsigned int tenant, time;
+ };
+ Entry mEntries[3];
+ int mCount;
+};
diff --git a/src/T2DLL/T2RouteCEArray.cpp b/src/T2DLL/T2RouteCEArray.cpp
new file mode 100644
index 0000000..7a7585b
--- /dev/null
+++ b/src/T2DLL/T2RouteCEArray.cpp
@@ -0,0 +1,44 @@
+#include "T2RouteCEArray.h"
+
+T2RouteCEArray::T2RouteCEArray() {
+}
+
+/*virtual*/ T2RouteCEArray::~T2RouteCEArray() {
+}
+
+void T2RouteCEArray::Insert(unsigned int a, unsigned int b) {
+ if (a != 0) {
+ int index = FetchIndexOf(&a);
+ if (index != 0)
+ InsertItemsAt(1, index + 1, &b);
+ else
+ InsertItemsAt(1, 1, &b);
+ } else {
+ InsertItemsAt(1, 1, &b);
+ }
+}
+
+unsigned int T2RouteCEArray::GetSameID(T2RouteCEArray* other) {
+ unsigned int result = 0;
+
+ LArrayIterator outer(*this);
+ unsigned int outerItem;
+
+ while (outer.Next(&outerItem)) {
+ LArrayIterator inner(*other);
+ unsigned int innerItem;
+
+ while (inner.Next(&innerItem)) {
+ if (outerItem == innerItem) {
+ result = outerItem;
+ break;
+ }
+ }
+ }
+
+ return result;
+}
+
+int T2RouteCEArray::HasCrossEquip() const {
+ return GetCount() > 0;
+}
diff --git a/src/T2DLL/T2RouteCEArray.h b/src/T2DLL/T2RouteCEArray.h
new file mode 100644
index 0000000..f29482c
--- /dev/null
+++ b/src/T2DLL/T2RouteCEArray.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+#include "T2CrossEquipArray.h"
+
+class T2RouteCEArray : public T2CrossEquipArray {
+public:
+ T2RouteCEArray();
+ virtual ~T2RouteCEArray();
+ void Insert(unsigned int, unsigned int);
+ unsigned int GetSameID(T2RouteCEArray*);
+ int HasCrossEquip() const;
+
+ virtual DWORD GetCEClassID() { return 'RCEA'; }
+};
diff --git a/src/T2DLL/T2RouteNavigator.cpp b/src/T2DLL/T2RouteNavigator.cpp
new file mode 100644
index 0000000..8d2e5a9
--- /dev/null
+++ b/src/T2DLL/T2RouteNavigator.cpp
@@ -0,0 +1,40 @@
+#include "T2RouteNavigator.h"
+
+T2RouteNavigator::T2RouteNavigator(T2FloorInfo*) {
+}
+
+/*virtual*/ T2RouteNavigator::~T2RouteNavigator() {
+}
+
+void T2RouteNavigator::FloorAdded(T2Tenant*, int) {
+}
+
+void T2RouteNavigator::FloorRemoved(T2Tenant*, int) {
+}
+
+void T2RouteNavigator::MoverAdded(T2Mover*, int) {
+}
+
+void T2RouteNavigator::MoverRemoved(T2Mover*, int) {
+}
+
+void T2RouteNavigator::MoverModified(T2Mover*, int) {
+}
+
+void T2RouteNavigator::Update() {
+}
+
+int T2RouteNavigator::CheckRoute(POINT, POINT, unsigned int, int) const {
+}
+
+int T2RouteNavigator::IsConnectRouteFromLobby(POINT) const {
+}
+
+int T2RouteNavigator::GetNextRoute(POINT, POINT&, int) const {
+}
+
+T2Tenant* T2RouteNavigator::SelectNearTenant(POINT, unsigned int) const {
+}
+
+int T2RouteNavigator::GetNextRouteUsingEStair(POINT, POINT&) const {
+}
diff --git a/src/T2DLL/T2RouteNavigator.h b/src/T2DLL/T2RouteNavigator.h
new file mode 100644
index 0000000..eebe34d
--- /dev/null
+++ b/src/T2DLL/T2RouteNavigator.h
@@ -0,0 +1,25 @@
+#pragma once
+#include "common.h"
+
+class T2RouteNavigator {
+public:
+ T2RouteNavigator(T2FloorInfo*);
+ virtual ~T2RouteNavigator();
+ void FloorAdded(T2Tenant*, int);
+ void FloorRemoved(T2Tenant*, int);
+ void MoverAdded(T2Mover*, int);
+ void MoverRemoved(T2Mover*, int);
+ void MoverModified(T2Mover*, int);
+ void Update();
+ int CheckRoute(POINT, POINT, unsigned int, int) const;
+ int IsConnectRouteFromLobby(POINT) const;
+ int GetNextRoute(POINT, POINT&, int) const;
+ T2Tenant* SelectNearTenant(POINT, unsigned int) const;
+protected:
+ int GetNextRouteUsingEStair(POINT, POINT&) const;
+
+public:
+ T2RouteNavigator(const T2RouteNavigator&) {}
+ T2RouteNavigator& operator=(const T2RouteNavigator&) {}
+ T2FloorPtrList* GetFloorPtrList() const {}
+};
diff --git a/src/T2DLL/T2RoutingTable.cpp b/src/T2DLL/T2RoutingTable.cpp
new file mode 100644
index 0000000..8380825
--- /dev/null
+++ b/src/T2DLL/T2RoutingTable.cpp
@@ -0,0 +1,82 @@
+#include "T2RoutingTable.h"
+
+T2RoutingTable::T2RoutingTable(T2FloorInfo*, T2FloorPtrList*, int) {
+}
+
+/*virtual*/ T2RoutingTable::~T2RoutingTable() {
+}
+
+void T2RoutingTable::FloorAdded() {
+}
+
+void T2RoutingTable::FloorRemoved(int) {
+}
+
+int T2RoutingTable::IsRelatedMover(T2Mover*) const {
+}
+
+void T2RoutingTable::MoverAdded(T2Mover*, int) {
+}
+
+void T2RoutingTable::MoverRemoved(T2Mover*, int) {
+}
+
+void T2RoutingTable::MoverModified(T2Mover*, int) {
+}
+
+void T2RoutingTable::AddItem(T2Mover*) {
+}
+
+void T2RoutingTable::RemoveItem(T2Mover*) {
+}
+
+T2MoverRoutingTable* T2RoutingTable::GetItem(T2Mover*) const {
+}
+
+int T2RoutingTable::GetElem(T2Mover*, int, T2RoutingTableElem&) const {
+}
+
+int T2RoutingTable::GetIndex(T2Mover*) const {
+}
+
+void T2RoutingTable::Update() {
+}
+
+void T2RoutingTable::FullUpdate() {
+}
+
+void T2RoutingTable::ClearData() {
+}
+
+int T2RoutingTable::CheckRoute(POINT, POINT, unsigned int) const {
+}
+
+int T2RoutingTable::IsConnectRouteFromLobby(POINT) const {
+}
+
+int T2RoutingTable::GetNextRoute(POINT, POINT&) const {
+}
+
+T2Tenant* T2RoutingTable::SelectNearTenant(POINT, unsigned int) const {
+}
+
+T2Tenant* T2RoutingTable::SelectNearTenant(T2Tenant*, int, unsigned int) const {
+}
+
+T2RoutingTableElem::T2RoutingTableElem() {
+}
+
+T2RoutingTableElem::~T2RoutingTableElem() {
+}
+
+int T2RoutingTableElem::IsStopFloor() const {
+}
+
+void T2RoutingTableElem::SetTable(unsigned int, int) {
+}
+
+int T2RoutingTableElem::IsSetTable(unsigned int, unsigned int, int, int) {
+}
+
+int T2RoutingTableElem::HasNextRoute(unsigned int) const {
+}
diff --git a/src/T2DLL/T2RoutingTable.h b/src/T2DLL/T2RoutingTable.h
new file mode 100644
index 0000000..a5596da
--- /dev/null
+++ b/src/T2DLL/T2RoutingTable.h
@@ -0,0 +1,54 @@
+#pragma once
+#include "common.h"
+
+class T2RoutingTable {
+public:
+ T2RoutingTable(T2FloorInfo*, T2FloorPtrList*, int);
+ virtual ~T2RoutingTable();
+ void FloorAdded();
+ void FloorRemoved(int);
+protected:
+ int IsRelatedMover(T2Mover*) const;
+public:
+ void MoverAdded(T2Mover*, int);
+ void MoverRemoved(T2Mover*, int);
+ void MoverModified(T2Mover*, int);
+protected:
+ void AddItem(T2Mover*);
+ void RemoveItem(T2Mover*);
+ T2MoverRoutingTable* GetItem(T2Mover*) const;
+ int GetElem(T2Mover*, int, T2RoutingTableElem&) const;
+ int GetIndex(T2Mover*) const;
+ void Update();
+public:
+ void FullUpdate();
+protected:
+ void ClearData();
+public:
+ int CheckRoute(POINT, POINT, unsigned int) const;
+ int IsConnectRouteFromLobby(POINT) const;
+ int GetNextRoute(POINT, POINT&) const;
+ T2Tenant* SelectNearTenant(POINT, unsigned int) const;
+protected:
+ T2Tenant* SelectNearTenant(T2Tenant*, int, unsigned int) const;
+
+public:
+ T2RoutingTable(const T2RoutingTable&) {}
+ T2RoutingTable& operator=(const T2RoutingTable&) {}
+};
+class T2RoutingTableElem {
+public:
+ T2RoutingTableElem();
+ ~T2RoutingTableElem();
+ int IsStopFloor() const;
+ void SetTable(unsigned int, int);
+ int IsSetTable(unsigned int, unsigned int, int, int);
+ int HasNextRoute(unsigned int) const;
+
+ T2RoutingTableElem& operator=(const T2RoutingTableElem&) {}
+ unsigned int GetNextFloorID() const {}
+ unsigned int GetScore() const {}
+ int GetTime() const {}
+ int GetFinalHPos() const {}
+ int HasRoute() const {}
+};
diff --git a/src/T2DLL/T2SantaClaus.cpp b/src/T2DLL/T2SantaClaus.cpp
new file mode 100644
index 0000000..df86e35
--- /dev/null
+++ b/src/T2DLL/T2SantaClaus.cpp
@@ -0,0 +1,25 @@
+#include "T2SantaClaus.h"
+
+T2SantaClaus::T2SantaClaus(T2TowerEvent*, CResFile*, int) {
+}
+
+/*virtual*/ T2SantaClaus::~T2SantaClaus() {
+}
+
+/*virtual*/ int T2SantaClaus::Start(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2SantaClaus::IsBeginTime(unsigned int) {
+}
+
+/*virtual*/ int T2SantaClaus::Exec(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2SantaClaus::StopEvent(T2TowerDoc*) {
+}
+
+void T2SantaClaus::Show() {
+}
+
+void T2SantaClaus::Hide() {
+}
diff --git a/src/T2DLL/T2SantaClaus.h b/src/T2DLL/T2SantaClaus.h
new file mode 100644
index 0000000..4e83282
--- /dev/null
+++ b/src/T2DLL/T2SantaClaus.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+
+class T2SantaClaus {
+public:
+ T2SantaClaus(T2TowerEvent*, CResFile*, int);
+ virtual ~T2SantaClaus();
+ virtual int Start(T2TowerDoc*);
+ virtual int IsBeginTime(unsigned int);
+ virtual int Exec(T2TowerDoc*);
+ virtual void StopEvent(T2TowerDoc*);
+private:
+ void Show();
+ void Hide();
+
+public:
+ virtual unsigned long GetID() {}
+ T2SantaClaus(const T2SantaClaus&) {}
+ T2SantaClaus& operator=(const T2SantaClaus&) {}
+};
diff --git a/src/T2DLL/T2SearchDialog.cpp b/src/T2DLL/T2SearchDialog.cpp
new file mode 100644
index 0000000..2c37751
--- /dev/null
+++ b/src/T2DLL/T2SearchDialog.cpp
@@ -0,0 +1,10 @@
+#include "T2SearchDialog.h"
+
+T2SearchDialog::T2SearchDialog(T2TowerDoc*) {
+}
+
+/*virtual*/ T2SearchDialog::~T2SearchDialog() {
+}
+
+/*virtual*/ int T2SearchDialog::OnT2DialogCommand(unsigned int, long) {
+}
diff --git a/src/T2DLL/T2SearchDialog.h b/src/T2DLL/T2SearchDialog.h
new file mode 100644
index 0000000..eaa3b4c
--- /dev/null
+++ b/src/T2DLL/T2SearchDialog.h
@@ -0,0 +1,9 @@
+#pragma once
+#include "common.h"
+
+class T2SearchDialog {
+public:
+ T2SearchDialog(T2TowerDoc*);
+ virtual ~T2SearchDialog();
+ virtual int OnT2DialogCommand(unsigned int, long);
+};
diff --git a/src/T2DLL/T2SettingDialog.cpp b/src/T2DLL/T2SettingDialog.cpp
new file mode 100644
index 0000000..ab32382
--- /dev/null
+++ b/src/T2DLL/T2SettingDialog.cpp
@@ -0,0 +1,10 @@
+#include "T2SettingDialog.h"
+
+T2SettingDialog::T2SettingDialog(T2TowerDoc*) {
+}
+
+/*virtual*/ T2SettingDialog::~T2SettingDialog() {
+}
+
+/*virtual*/ int T2SettingDialog::OnT2DialogCommand(unsigned int, long) {
+}
diff --git a/src/T2DLL/T2SettingDialog.h b/src/T2DLL/T2SettingDialog.h
new file mode 100644
index 0000000..1e5af78
--- /dev/null
+++ b/src/T2DLL/T2SettingDialog.h
@@ -0,0 +1,9 @@
+#pragma once
+#include "common.h"
+
+class T2SettingDialog {
+public:
+ T2SettingDialog(T2TowerDoc*);
+ virtual ~T2SettingDialog();
+ virtual int OnT2DialogCommand(unsigned int, long);
+};
diff --git a/src/T2DLL/T2Settlement.cpp b/src/T2DLL/T2Settlement.cpp
new file mode 100644
index 0000000..5b3058b
--- /dev/null
+++ b/src/T2DLL/T2Settlement.cpp
@@ -0,0 +1,58 @@
+#include "T2Settlement.h"
+
+T2Settlement::T2Settlement(T2TowerDoc*, int) {
+}
+
+T2Settlement::T2Settlement(T2TowerDoc*, T2Archive&) {
+}
+
+T2Settlement::~T2Settlement() {
+}
+
+T2Archive& T2Settlement::Write(T2Archive&) const {
+}
+
+void T2Settlement::DoPay(int, short) {
+}
+
+void T2Settlement::DoPayTool(int, short, T2ToolDef*) {
+}
+
+void T2Settlement::EmitPayToolMessage(T2TowerDoc*, T2ToolDef*, const CString&, int, int) {
+}
+
+T2DateTime* T2Settlement::GetTimeLimitOfMessage(T2TowerDoc*, T2ToolDef*, int) {
+}
+
+void T2Settlement::SetTimeLimitOfMessage(T2TowerDoc*, T2ToolDef*, int, T2DateTime*) {
+}
+
+T2DateTime* T2Settlement::FindCategoryTimeLimit(T2TowerDoc*, T2ToolDef*) {
+}
+
+void T2Settlement::LinkCategoryTimeLimit(T2TowerDoc*, T2ToolDef*, T2DateTime*) {
+}
+
+/*static*/ T2DateTime* T2Settlement::CalcTimeLimitOfMessage(T2DateTime*, int) {
+}
+
+int T2Settlement::GetCurrentFunds() const {
+}
+
+int T2Settlement::GetPreviousFunds() const {
+}
+
+int T2Settlement::GetTotalSettlement(short) const {
+}
+
+int T2Settlement::GetToolSettlement(T2ToolDef*) const {
+}
+
+int T2Settlement::GetCategorySettlement(int) const {
+}
+
+void T2Settlement::Initialize(T2TowerDoc*, int) {
+}
+
+void T2Settlement::Update() {
+}
diff --git a/src/T2DLL/T2Settlement.h b/src/T2DLL/T2Settlement.h
new file mode 100644
index 0000000..dc59339
--- /dev/null
+++ b/src/T2DLL/T2Settlement.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "common.h"
+
+class T2Settlement {
+public:
+ T2Settlement(T2TowerDoc*, int);
+ T2Settlement(T2TowerDoc*, T2Archive&);
+ ~T2Settlement();
+ T2Archive& Write(T2Archive&) const;
+ void DoPay(int, short);
+ void DoPayTool(int, short, T2ToolDef*);
+ void EmitPayToolMessage(T2TowerDoc*, T2ToolDef*, const CString&, int, int);
+protected:
+ T2DateTime* GetTimeLimitOfMessage(T2TowerDoc*, T2ToolDef*, int);
+ void SetTimeLimitOfMessage(T2TowerDoc*, T2ToolDef*, int, T2DateTime*);
+ T2DateTime* FindCategoryTimeLimit(T2TowerDoc*, T2ToolDef*);
+ void LinkCategoryTimeLimit(T2TowerDoc*, T2ToolDef*, T2DateTime*);
+ static T2DateTime* CalcTimeLimitOfMessage(T2DateTime*, int);
+public:
+ int GetCurrentFunds() const;
+ int GetPreviousFunds() const;
+ int GetTotalSettlement(short) const;
+ int GetToolSettlement(T2ToolDef*) const;
+ int GetCategorySettlement(int) const;
+protected:
+ void Initialize(T2TowerDoc*, int);
+public:
+ void Update();
+
+ T2Settlement& operator=(const T2Settlement&) {}
+};
diff --git a/src/T2DLL/T2SilhouetteDef.cpp b/src/T2DLL/T2SilhouetteDef.cpp
new file mode 100644
index 0000000..526a450
--- /dev/null
+++ b/src/T2DLL/T2SilhouetteDef.cpp
@@ -0,0 +1,10 @@
+#include "T2SilhouetteDef.h"
+
+T2SilhouetteDef::T2SilhouetteDef(unsigned long, T2PluginSpecifier&, CResFile*) {
+}
+
+/*virtual*/ T2SilhouetteDef::~T2SilhouetteDef() {
+}
+
+/*virtual*/ void T2SilhouetteDef::GetName(CString&) {
+}
diff --git a/src/T2DLL/T2SilhouetteDef.h b/src/T2DLL/T2SilhouetteDef.h
new file mode 100644
index 0000000..1122af5
--- /dev/null
+++ b/src/T2DLL/T2SilhouetteDef.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2SilhouetteDef {
+public:
+ T2SilhouetteDef(unsigned long, T2PluginSpecifier&, CResFile*);
+ virtual ~T2SilhouetteDef();
+ virtual void GetName(CString&);
+
+ virtual int GetSortKey() {}
+ int GetSilhouetteType() {}
+ int GetSilhouette(int, int) {}
+ T2SilhouetteDef& operator=(T2SilhouetteDef&) {}
+ int GetWidth() const {}
+ int GetRouteType() const {}
+};
diff --git a/src/T2DLL/T2SilhouettePane.cpp b/src/T2DLL/T2SilhouettePane.cpp
new file mode 100644
index 0000000..e38e5ef
--- /dev/null
+++ b/src/T2DLL/T2SilhouettePane.cpp
@@ -0,0 +1,25 @@
+#include "T2SilhouettePane.h"
+
+int T2SilhouettePane::GetSilhouetteType() const {
+}
+
+void T2SilhouettePane::SetCustomColor(const int&) {
+}
+
+T2SilhouettePane::T2SilhouettePane(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2SilhouettePane::~T2SilhouettePane() {
+}
+
+/*virtual*/ void T2SilhouettePane::DrawSelf(CDC*) {
+}
+
+/*virtual*/ int T2SilhouettePane::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ int T2SilhouettePane::OnCreate(CREATESTRUCTA*) {
+}
+
+void T2SilhouettePane::SetPeople(T2People*) {
+}
diff --git a/src/T2DLL/T2SilhouettePane.h b/src/T2DLL/T2SilhouettePane.h
new file mode 100644
index 0000000..4e2ab4a
--- /dev/null
+++ b/src/T2DLL/T2SilhouettePane.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2SilhouettePane {
+public:
+ int GetSilhouetteType() const;
+ void SetCustomColor(const int&);
+ T2SilhouettePane(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2SilhouettePane();
+protected:
+ virtual void DrawSelf(CDC*);
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual int OnCreate(CREATESTRUCTA*);
+public:
+ void SetPeople(T2People*);
+};
diff --git a/src/T2DLL/T2SoundPlayer.cpp b/src/T2DLL/T2SoundPlayer.cpp
new file mode 100644
index 0000000..7abc2a6
--- /dev/null
+++ b/src/T2DLL/T2SoundPlayer.cpp
@@ -0,0 +1,76 @@
+#include "T2SoundPlayer.h"
+
+/*static*/ const AFX_MSGMAP* __stdcall T2SoundPlayer::_GetBaseMessageMap() {
+}
+
+/*virtual*/ const AFX_MSGMAP* T2SoundPlayer::GetMessageMap() const {
+}
+
+T2SoundPlayer::T2SoundPlayer(CWnd*, IDirectSound*) {
+}
+
+/*virtual*/ T2SoundPlayer::~T2SoundPlayer() {
+}
+
+void T2SoundPlayer::AddSound(const CString&, SOUNDPRIORITY, const CString&) {
+}
+
+void T2SoundPlayer::AddSound(const CString&, SOUNDPRIORITY, unsigned int, HINSTANCE) {
+}
+
+int T2SoundPlayer::LoadSound(T2SoundObjItem*, const CString&, CWave&, int) {
+}
+
+void T2SoundPlayer::DeleteSound(const CString&) {
+}
+
+void T2SoundPlayer::DeleteSoundAll() {
+}
+
+void T2SoundPlayer::Play(const CString&, unsigned int, unsigned int, POINT*, PLAYMODE, int) {
+}
+
+void T2SoundPlayer::Stop(const CString&) {
+}
+
+void T2SoundPlayer::StopAll() {
+}
+
+void T2SoundPlayer::SetVolume(const CString&, int) {
+}
+
+void T2SoundPlayer::SetSoundOn(int) {
+}
+
+void T2SoundPlayer::FadeOut() {
+}
+
+void T2SoundPlayer::FadeIn() {
+}
+
+void T2SoundPlayer::PlayCDTrack(int, int) {
+}
+
+void T2SoundPlayer::StopCD() {
+}
+
+long T2SoundPlayer::OnMCINotify(unsigned int, long) {
+}
+
+/*static*/ const AFX_MSGMAP T2SoundPlayer::messageMap {
+}
+
+/*static*/ const AFX_MSGMAP_ENTRY* const T2SoundPlayer::_messageEntries {
+}
+
+T2SoundObjItem::T2SoundObjItem() {
+}
+
+T2SoundObjItem::~T2SoundObjItem() {
+}
+
+T2SoundObjItemList::T2SoundObjItemList() {
+}
+
+/*virtual*/ T2SoundObjItemList::~T2SoundObjItemList() {
+}
diff --git a/src/T2DLL/T2SoundPlayer.h b/src/T2DLL/T2SoundPlayer.h
new file mode 100644
index 0000000..8d3d7c6
--- /dev/null
+++ b/src/T2DLL/T2SoundPlayer.h
@@ -0,0 +1,57 @@
+#pragma once
+#include "common.h"
+
+enum PLAYMODE {
+ PlayMode_0
+};
+
+enum SOUNDPRIORITY {
+ SoundPriority_0
+};
+
+class T2SoundPlayer {
+//protected:
+// static const AFX_MSGMAP* __stdcall _GetBaseMessageMap();
+// virtual const AFX_MSGMAP* GetMessageMap() const;
+public:
+ T2SoundPlayer(CWnd*, IDirectSound*);
+ virtual ~T2SoundPlayer();
+ void AddSound(const CString&, SOUNDPRIORITY, const CString&);
+ void AddSound(const CString&, SOUNDPRIORITY, unsigned int, HINSTANCE);
+private:
+ int LoadSound(T2SoundObjItem*, const CString&, CWave&, int);
+public:
+ void DeleteSound(const CString&);
+ void DeleteSoundAll();
+ void Play(const CString&, unsigned int, unsigned int, POINT*, PLAYMODE, int);
+ void Stop(const CString&);
+ void StopAll();
+ void SetVolume(const CString&, int);
+ void SetSoundOn(int);
+ void FadeOut();
+ void FadeIn();
+ void PlayCDTrack(int, int);
+ void StopCD();
+protected:
+ long OnMCINotify(unsigned int, long);
+// static const AFX_MSGMAP messageMap;
+//private:
+// static const AFX_MSGMAP_ENTRY* const _messageEntries;
+
+public:
+ unsigned int GetSEMask() const { return 0; }
+ void SetSEMask(unsigned int) {}
+ int IsSoundOn() const { return 0; }
+};
+
+class T2SoundObjItem {
+public:
+ T2SoundObjItem();
+ ~T2SoundObjItem();
+};
+
+class T2SoundObjItemList {
+public:
+ T2SoundObjItemList();
+ virtual ~T2SoundObjItemList();
+};
diff --git a/src/T2DLL/T2Sprite.cpp b/src/T2DLL/T2Sprite.cpp
new file mode 100644
index 0000000..6f04e24
--- /dev/null
+++ b/src/T2DLL/T2Sprite.cpp
@@ -0,0 +1,157 @@
+#include "T2ImageObj.h"
+#include "T2Sprite.h"
+#include "T2SpriteObj.h"
+
+T2Sprite::T2Sprite() {
+ SetRectEmpty(&mUpdateRect);
+}
+
+/*virtual*/ T2Sprite::~T2Sprite() {
+ AllClear();
+}
+
+void T2Sprite::AllClear() {
+ POSITION p = GetHeadPosition();
+ while (p) {
+ T2SpriteObj *obj = GetNext(p);
+ delete obj;
+ }
+ RemoveAll();
+}
+
+int T2Sprite::NewSprite(T2ImageObj& imageObj, const CString& name, int layer) {
+ T2SpriteObj *obj = new T2SpriteObj;
+ obj->mImageObj = &imageObj;
+ obj->mName = name;
+
+ int index;
+ for (index = 0; ; index++) {
+ if (!FindObj(index))
+ break;
+ }
+ obj->mIndex = index;
+ obj->mLayer = layer;
+
+ int objIndex = imageObj.FindObject(name, -1, 0, 0, 255);
+ imageObj.GetObjectSize(objIndex, &obj->mSize);
+ AddTail(obj);
+ return index;
+}
+
+void T2Sprite::DeleteSprite(int index) {
+ POSITION p = GetHeadPosition();
+ while (p) {
+ POSITION prev = p;
+ T2SpriteObj *obj = GetNext(p);
+ if (obj->mIndex == index) {
+ RemoveAt(prev);
+ delete obj;
+ break;
+ }
+ }
+}
+
+T2SpriteObj* T2Sprite::FindObj(int index) {
+ POSITION p = GetHeadPosition();
+ while (p) {
+ T2SpriteObj *obj = GetNext(p);
+ if (obj->mIndex == index)
+ return obj;
+ }
+
+ return NULL;
+}
+
+void T2Sprite::ShowSprite(int index, BOOL show) {
+ T2SpriteObj *obj = FindObj(index);
+ if (obj) {
+ if (show)
+ obj->mShowCount++;
+ else
+ obj->mShowCount--;
+ AddUpdateRect(obj, obj->mPosition);
+ }
+}
+
+void T2Sprite::ChangePattern(int index, int pattern) {
+ T2SpriteObj *obj = FindObj(index);
+ obj->mPattern = pattern;
+ if (obj->mShowCount > 0)
+ AddUpdateRect(obj, obj->mPosition);
+}
+
+void T2Sprite::MoveSprite(int index, POINT pt) {
+ T2SpriteObj *obj = FindObj(index);
+ if (obj) {
+ if (obj->mShowCount > 0)
+ AddUpdateRect(obj, obj->mPosition);
+ obj->mPosition = pt;
+ if (obj->mShowCount > 0)
+ AddUpdateRect(obj, obj->mPosition);
+ }
+}
+
+void T2Sprite::UpdateSprite(int index) {
+ T2SpriteObj *obj = FindObj(index);
+ AddUpdateRect(obj, obj->mPosition);
+}
+
+void T2Sprite::GetSpriteRect(int index, RECT& outRect) {
+ T2SpriteObj *obj = FindObj(index);
+ outRect.left = obj->mPosition.x;
+ outRect.top = obj->mPosition.y;
+ outRect.right = obj->mPosition.x + obj->mSize.cx;
+ outRect.bottom = obj->mPosition.y + obj->mSize.cy;
+}
+
+void T2Sprite::GetUpdateRect(RECT* outRect, int factor) {
+ *outRect = mUpdateRect;
+
+ int divisor = 1 << factor;
+ outRect->top = (outRect->top >= 0) ? (outRect->top / divisor) : ((outRect->top - (divisor - 1)) / divisor);
+ outRect->left = (outRect->left >= 0) ? (outRect->left / divisor) : ((outRect->left - (divisor - 1)) / divisor);
+ outRect->bottom = (outRect->bottom >= 0) ? (outRect->bottom / divisor) : ((outRect->bottom - (divisor - 1)) / divisor);
+ outRect->right = (outRect->right >= 0) ? (outRect->right / divisor) : ((outRect->right - (divisor - 1)) / divisor);
+
+ SetRectEmpty(&mUpdateRect);
+}
+
+void T2Sprite::DrawLayer(T2BitImage* dest, int layer, int factor) {
+ POSITION p = GetHeadPosition();
+ while (p) {
+ T2SpriteObj *obj = GetNext(p);
+ if (obj->mLayer == layer)
+ DrawSprite(dest, obj, factor);
+ }
+}
+
+void T2Sprite::DrawSprite(T2BitImage* dest, T2SpriteObj* obj, int factor) {
+ if (obj->mShowCount > 0) {
+ RECT rect;
+ SetRect(
+ &rect,
+ obj->mPosition.x,
+ obj->mPosition.y,
+ obj->mPosition.x + obj->mSize.cx,
+ obj->mPosition.y + obj->mSize.cy
+ );
+
+ rect.top = rect.top / (1 << factor);
+ rect.left = rect.left / (1 << factor);
+ rect.bottom = rect.bottom / (1 << factor);
+ rect.right = rect.right / (1 << factor);
+
+ int objectID = obj->mImageObj->FindObject(obj->mName, obj->mPattern, 0, 0, 255);
+ if (objectID < 0)
+ return;
+
+ obj->mImageObj->DrawObject(dest, objectID, rect, factor, -1);
+ }
+}
+
+void T2Sprite::AddUpdateRect(T2SpriteObj* obj, POINT pt) {
+ RECT rect;
+
+ SetRect(&rect, pt.x, pt.y, pt.x + obj->mSize.cx, pt.y + obj->mSize.cy);
+ UnionRect(&mUpdateRect, &mUpdateRect, &rect);
+}
diff --git a/src/T2DLL/T2Sprite.h b/src/T2DLL/T2Sprite.h
new file mode 100644
index 0000000..13f6372
--- /dev/null
+++ b/src/T2DLL/T2Sprite.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2Sprite : private CList<T2SpriteObj *, T2SpriteObj *> {
+public:
+ T2Sprite();
+ virtual ~T2Sprite();
+
+ void AllClear();
+ int NewSprite(T2ImageObj& imageObj, const CString& name, int layer);
+ void DeleteSprite(int index);
+ void ShowSprite(int index, BOOL show);
+ void ChangePattern(int index, int pattern);
+ void MoveSprite(int index, POINT pt);
+ void UpdateSprite(int index);
+ void GetSpriteRect(int index, RECT& outRect);
+ void GetUpdateRect(RECT* outRect, int factor);
+ void DrawLayer(T2BitImage* dest, int layer, int factor);
+ void DrawSprite(T2BitImage* dest, T2SpriteObj* obj, int factor);
+
+private:
+ T2SpriteObj* FindObj(int index);
+ void AddUpdateRect(T2SpriteObj* obj, POINT pt);
+
+ RECT mUpdateRect;
+};
diff --git a/src/T2DLL/T2SpriteObj.cpp b/src/T2DLL/T2SpriteObj.cpp
new file mode 100644
index 0000000..3254758
--- /dev/null
+++ b/src/T2DLL/T2SpriteObj.cpp
@@ -0,0 +1,11 @@
+#include "T2SpriteObj.h"
+
+T2SpriteObj::T2SpriteObj() {
+ mShowCount = 0;
+ mPosition.x = 0;
+ mPosition.y = 0;
+ mPattern = 0;
+}
+
+T2SpriteObj::~T2SpriteObj() {
+}
diff --git a/src/T2DLL/T2SpriteObj.h b/src/T2DLL/T2SpriteObj.h
new file mode 100644
index 0000000..a32c648
--- /dev/null
+++ b/src/T2DLL/T2SpriteObj.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2SpriteObj {
+public:
+ T2SpriteObj();
+ ~T2SpriteObj();
+
+ T2ImageObj *mImageObj;
+ CString mName;
+ int mIndex;
+ POINT mPosition;
+ int mShowCount;
+ SIZE mSize;
+ int mPattern;
+ int mLayer;
+};
diff --git a/src/T2DLL/T2StairModule.cpp b/src/T2DLL/T2StairModule.cpp
new file mode 100644
index 0000000..3a63e43
--- /dev/null
+++ b/src/T2DLL/T2StairModule.cpp
@@ -0,0 +1,19 @@
+#include "T2StairModule.h"
+
+T2StairModule::T2StairModule() {
+}
+
+/*virtual*/ T2StairModule::~T2StairModule() {
+}
+
+void T2StairModule::MoverIDChanged(unsigned int) {
+}
+
+/*virtual*/ void T2StairModule::RemoveContents(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2StairModule::LoadSelf(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2StairModule::SaveSelf(T2Archive&) {
+}
diff --git a/src/T2DLL/T2StairModule.h b/src/T2DLL/T2StairModule.h
new file mode 100644
index 0000000..ae2cac9
--- /dev/null
+++ b/src/T2DLL/T2StairModule.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+
+class T2StairModule {
+public:
+ T2StairModule();
+ virtual ~T2StairModule();
+ void MoverIDChanged(unsigned int);
+ virtual void RemoveContents(T2TowerDoc*);
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+
+public:
+ void SetModuleRect(const RECT&) {}
+ void GetModuleRect(RECT&) {}
+ int GetExtraSize() {}
+ T2StairModule(const T2StairModule&) {}
+ T2StairModule& operator=(const T2StairModule&) {}
+};
diff --git a/src/T2DLL/T2StairModuleList.cpp b/src/T2DLL/T2StairModuleList.cpp
new file mode 100644
index 0000000..4f99087
--- /dev/null
+++ b/src/T2DLL/T2StairModuleList.cpp
@@ -0,0 +1,28 @@
+#include "T2StairModuleList.h"
+
+T2StairModuleList::T2StairModuleList() {
+}
+
+/*virtual*/ T2StairModuleList::~T2StairModuleList() {
+}
+
+void T2StairModuleList::AddModule(int, const RECT&) {
+}
+
+void T2StairModuleList::AddModule(T2TowerDoc*, const RECT&, int) {
+}
+
+int T2StairModuleList::GetIndex(int, ERequestUpDown) const {
+}
+
+void T2StairModuleList::Union(T2MoverModuleList*, unsigned int) {
+}
+
+/*virtual*/ T2MoverModule* T2StairModuleList::ConstructModule() {
+}
+
+/*virtual*/ void T2StairModuleList::Read(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ int T2StairModuleList::GetModuleCount() const {
+}
diff --git a/src/T2DLL/T2StairModuleList.h b/src/T2DLL/T2StairModuleList.h
new file mode 100644
index 0000000..b93b9a5
--- /dev/null
+++ b/src/T2DLL/T2StairModuleList.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "common.h"
+
+class T2StairModuleList {
+public:
+ T2StairModuleList();
+ virtual ~T2StairModuleList();
+ void AddModule(int, const RECT&);
+ void AddModule(T2TowerDoc*, const RECT&, int);
+private:
+ int GetIndex(int, ERequestUpDown) const;
+public:
+ void Union(T2MoverModuleList*, unsigned int);
+ virtual T2MoverModule* ConstructModule();
+ virtual void Read(T2Archive&, T2TowerDoc*);
+ virtual int GetModuleCount() const;
+
+protected:
+ virtual unsigned long GetMMClassID() {}
+public:
+ T2StairModuleList(const T2StairModuleList&) {}
+ T2StairModuleList& operator=(const T2StairModuleList&) {}
+};
diff --git a/src/T2DLL/T2StewardDialog.cpp b/src/T2DLL/T2StewardDialog.cpp
new file mode 100644
index 0000000..74c6b0d
--- /dev/null
+++ b/src/T2DLL/T2StewardDialog.cpp
@@ -0,0 +1,13 @@
+#include "T2StewardDialog.h"
+
+T2StewardDialog::T2StewardDialog(T2TowerDoc*, HINSTANCE, CString&, int) {
+}
+
+/*virtual*/ int T2StewardDialog::OnT2DialogCommand(unsigned int, long) {
+}
+
+/*static*/ void T2StewardDialog::MessageBoxA(const char*, const char*) {
+}
+
+/*static*/ int T2StewardDialog::MessageBoxYN(const char*, const char*) {
+}
diff --git a/src/T2DLL/T2StewardDialog.h b/src/T2DLL/T2StewardDialog.h
new file mode 100644
index 0000000..b10d4a7
--- /dev/null
+++ b/src/T2DLL/T2StewardDialog.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class T2StewardDialog {
+public:
+ T2StewardDialog(T2TowerDoc*, HINSTANCE, CString&, int);
+ virtual int OnT2DialogCommand(unsigned int, long);
+ static void MessageBoxA(const char*, const char*);
+ static int MessageBoxYN(const char*, const char*);
+
+ virtual ~T2StewardDialog() {}
+};
diff --git a/src/T2DLL/T2StopInfoArray.cpp b/src/T2DLL/T2StopInfoArray.cpp
new file mode 100644
index 0000000..689e167
--- /dev/null
+++ b/src/T2DLL/T2StopInfoArray.cpp
@@ -0,0 +1,52 @@
+#include "T2StopInfoArray.h"
+
+T2StopInfoArray::T2StopInfoArray() {
+}
+
+/*virtual*/ T2StopInfoArray::~T2StopInfoArray() {
+}
+
+void T2StopInfoArray::Init(int) {
+}
+
+void T2StopInfoArray::AllClear() {
+}
+
+void T2StopInfoArray::Expand(EEquipPos, int) {
+}
+
+int T2StopInfoArray::IsStopPos(int, ERequestUpDown) {
+}
+
+int T2StopInfoArray::IsOnStopPos(int, ERequestUpDown) {
+}
+
+int T2StopInfoArray::IsOffStopPos(int, ERequestUpDown) {
+}
+
+void T2StopInfoArray::SetOnStop(int, ERequestUpDown) {
+}
+
+void T2StopInfoArray::SetOffStop(int, ERequestUpDown) {
+}
+
+void T2StopInfoArray::ClearOnStop(int, ERequestUpDown) {
+}
+
+void T2StopInfoArray::ClearOffStop(int, ERequestUpDown) {
+}
+
+char T2StopInfoArray::GetStopAt(int, ERequestUpDown) {
+}
+
+void T2StopInfoArray::SetStopAt(int, ERequestUpDown, char) {
+}
+
+int T2StopInfoArray::GetIndex(int, ERequestUpDown) const {
+}
+
+/*static*/ T2StopInfoArray* T2StopInfoArray::ReadStopInfoArray(T2Archive&) {
+}
+
+/*static*/ void T2StopInfoArray::WriteStopInfoArray(T2StopInfoArray*, T2Archive&) {
+}
diff --git a/src/T2DLL/T2StopInfoArray.h b/src/T2DLL/T2StopInfoArray.h
new file mode 100644
index 0000000..d42ef9e
--- /dev/null
+++ b/src/T2DLL/T2StopInfoArray.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "common.h"
+
+class T2StopInfoArray {
+public:
+ T2StopInfoArray();
+ virtual ~T2StopInfoArray();
+ void Init(int);
+ void AllClear();
+ void Expand(EEquipPos, int);
+ int IsStopPos(int, ERequestUpDown);
+ int IsOnStopPos(int, ERequestUpDown);
+ int IsOffStopPos(int, ERequestUpDown);
+ void SetOnStop(int, ERequestUpDown);
+ void SetOffStop(int, ERequestUpDown);
+ void ClearOnStop(int, ERequestUpDown);
+ void ClearOffStop(int, ERequestUpDown);
+ char GetStopAt(int, ERequestUpDown);
+ void SetStopAt(int, ERequestUpDown, char);
+ int GetIndex(int, ERequestUpDown) const;
+ static T2StopInfoArray* ReadStopInfoArray(T2Archive&);
+ static void WriteStopInfoArray(T2StopInfoArray*, T2Archive&);
+
+ T2StopInfoArray(const T2StopInfoArray&) {}
+ T2StopInfoArray& operator=(const T2StopInfoArray&) {}
+};
diff --git a/src/T2DLL/T2SubPlugin.cpp b/src/T2DLL/T2SubPlugin.cpp
new file mode 100644
index 0000000..fbdbe01
--- /dev/null
+++ b/src/T2DLL/T2SubPlugin.cpp
@@ -0,0 +1,68 @@
+#include "CResFile.h"
+#include "T2BitImage.h"
+#include "T2ImageObj.h"
+#include "T2SubPlugin.h"
+
+T2SubPlugin::T2SubPlugin(DWORD type, T2PluginSpecifier& specifier)
+ : CResourcePlugin(type, specifier)
+{
+ mDupCustomerTableDefRes = false;
+ mTieup = 0;
+ mTitle[0] = 0;
+ mTieup = NULL;
+ mOpenTime = 0;
+ mCloseTime = 0;
+ mBitImage = NULL;
+ mImageObj = NULL;
+}
+
+/*virtual*/ T2SubPlugin::~T2SubPlugin() {
+ if (mTieup)
+ delete mTieup;
+ if (mBitImage)
+ delete mBitImage;
+ if (mImageObj)
+ delete mImageObj;
+}
+
+int T2SubPlugin::IsTieupFinish() {
+ int result = false;
+
+ if (mTieup) {
+ CTime now = CTime::GetTickCount();
+ if (*mTieup < now)
+ result = true;
+ }
+
+ return result;
+}
+
+/*virtual*/ void T2SubPlugin::GetTitle(CString& outStr) {
+ outStr = mTitle;
+}
+
+/*virtual*/ void T2SubPlugin::LoadRsrcFromStream(CResFile& resFile) {
+ resFile >> mTitle;
+
+ unsigned int t;
+ resFile >> t;
+ if (t != 0) {
+ int year = (t >> 28) & 0xF;
+ year *= 10;
+ year += (t >> 24) & 0xF;
+ year *= 10;
+ year += (t >> 20) & 0xF;
+ year *= 10;
+ year += (t >> 16) & 0xF;
+
+ int month = (t >> 12) & 0xF;
+ month *= 10;
+ month += (t >> 8) & 0xF;
+
+ int day = (t >> 4) & 0xF;
+ day *= 10;
+ day += (t & 0xF) + 1;
+
+ mTieup = new CTime(year, month, day, 0, 0, 0);
+ }
+}
diff --git a/src/T2DLL/T2SubPlugin.h b/src/T2DLL/T2SubPlugin.h
new file mode 100644
index 0000000..9b6a809
--- /dev/null
+++ b/src/T2DLL/T2SubPlugin.h
@@ -0,0 +1,36 @@
+#pragma once
+#include "common.h"
+#include "CResourcePlugin.h"
+
+class T2SubPlugin : public CResourcePlugin {
+public:
+ T2SubPlugin(DWORD type, T2PluginSpecifier& specifier);
+ virtual ~T2SubPlugin();
+ virtual unsigned long GetPluginStyle() { return 'SPlg'; }
+ virtual void GetTitle(CString& outStr);
+ virtual int GetBindTime() { return 1; }
+ virtual void GlobalData(T2GlobalData*) {}
+ virtual unsigned long LoadSelf() { return 0; }
+
+ int IsTieupFinish();
+ int IsTieup() { return mTieup != NULL; }
+
+ unsigned int GetOpenTime() const { return mOpenTime; }
+ void SetOpenTime(unsigned int t) { mOpenTime = t; }
+ unsigned int GetCloseTime() const { return mCloseTime; }
+ void SetCloseTime(unsigned int t) { mCloseTime = t; }
+ int DupCustomerTableDefRes() { return mDupCustomerTableDefRes; }
+ T2ImageObj* GetImageObj() { return mImageObj; }
+
+protected:
+ virtual void LoadRsrcFromStream(CResFile& resFile);
+
+ int m6C; // unknown
+ char mTitle[64];
+ CTime *mTieup;
+ int mDupCustomerTableDefRes;
+ unsigned int mOpenTime;
+ unsigned int mCloseTime;
+ T2BitImage *mBitImage;
+ T2ImageObj *mImageObj;
+};
diff --git a/src/T2DLL/T2TempPluginComparator.cpp b/src/T2DLL/T2TempPluginComparator.cpp
new file mode 100644
index 0000000..e3ff485
--- /dev/null
+++ b/src/T2DLL/T2TempPluginComparator.cpp
@@ -0,0 +1,13 @@
+#include "T2TempPluginComparator.h"
+
+/*virtual*/ int T2TempPluginComparator::Compare(const void*, const void*, unsigned int, unsigned int) const {
+}
+
+/*virtual*/ int T2TempPluginComparator::IsEqualTo(const void*, const void*, unsigned int, unsigned int) const {
+}
+
+/*static*/ T2TempPluginComparator* T2TempPluginComparator::GetComparator() {
+}
+
+/*static*/ T2TempPluginComparator* T2TempPluginComparator::sT2TempPluginComparator {
+}
diff --git a/src/T2DLL/T2TempPluginComparator.h b/src/T2DLL/T2TempPluginComparator.h
new file mode 100644
index 0000000..028c6dd
--- /dev/null
+++ b/src/T2DLL/T2TempPluginComparator.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2TempPluginComparator {
+public:
+ virtual int Compare(const void*, const void*, unsigned int, unsigned int) const;
+ virtual int IsEqualTo(const void*, const void*, unsigned int, unsigned int) const;
+ static T2TempPluginComparator* GetComparator();
+protected:
+ static T2TempPluginComparator* sT2TempPluginComparator;
+
+public:
+ T2TempPluginComparator() {}
+ virtual ~T2TempPluginComparator() {}
+ T2TempPluginComparator(const T2TempPluginComparator&) {}
+ T2TempPluginComparator& operator=(const T2TempPluginComparator&) {}
+};
diff --git a/src/T2DLL/T2TemplatePlugin.cpp b/src/T2DLL/T2TemplatePlugin.cpp
new file mode 100644
index 0000000..4810b87
--- /dev/null
+++ b/src/T2DLL/T2TemplatePlugin.cpp
@@ -0,0 +1,17 @@
+#include "T2TemplatePlugin.h"
+
+T2TemplatePlugin::T2TemplatePlugin(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile, CProgramPlugin* plugin)
+ : CDefRsrcPlugin(type, specifier, resFile)
+{
+ mPlugin = plugin;
+}
+
+/*virtual*/ T2TemplatePlugin::~T2TemplatePlugin() {
+}
+
+/*virtual*/ int T2TemplatePlugin::InitObject(T2Object*) {
+ return true;
+}
+
+/*virtual*/ void T2TemplatePlugin::LoadSound(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2TemplatePlugin.h b/src/T2DLL/T2TemplatePlugin.h
new file mode 100644
index 0000000..5ea32e8
--- /dev/null
+++ b/src/T2DLL/T2TemplatePlugin.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+#include "CDefRsrcPlugin.h"
+
+class T2TemplatePlugin : public CDefRsrcPlugin {
+public:
+ T2TemplatePlugin(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile, CProgramPlugin* plugin);
+ virtual ~T2TemplatePlugin();
+ virtual int GetSortKey() { return 0; }
+ virtual int InitObject(T2Object*);
+ virtual void LoadSound(T2TowerDoc*);
+
+ CProgramPlugin* GetPlugin() { return mPlugin; }
+
+protected:
+ CProgramPlugin *mPlugin;
+};
diff --git a/src/T2DLL/T2TemplatePluginDB.cpp b/src/T2DLL/T2TemplatePluginDB.cpp
new file mode 100644
index 0000000..4a62bc5
--- /dev/null
+++ b/src/T2DLL/T2TemplatePluginDB.cpp
@@ -0,0 +1,19 @@
+#include "T2TemplatePluginDB.h"
+
+T2TemplatePluginDB::T2TemplatePluginDB() {
+}
+
+/*virtual*/ T2TemplatePluginDB::~T2TemplatePluginDB() {
+}
+
+void T2TemplatePluginDB::Regist(T2TemplatePlugin*) {
+}
+
+void T2TemplatePluginDB::Add(T2TemplatePluginList*) {
+}
+
+T2TemplatePluginList* T2TemplatePluginDB::GetTemplatePluginList(unsigned long) {
+}
+
+T2TenantDef* T2TemplatePluginDB::FindFloor() {
+}
diff --git a/src/T2DLL/T2TemplatePluginDB.h b/src/T2DLL/T2TemplatePluginDB.h
new file mode 100644
index 0000000..ae350ff
--- /dev/null
+++ b/src/T2DLL/T2TemplatePluginDB.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2TemplatePluginDB {
+public:
+ T2TemplatePluginDB();
+ virtual ~T2TemplatePluginDB();
+ void Regist(T2TemplatePlugin*);
+ void Add(T2TemplatePluginList*);
+ T2TemplatePluginList* GetTemplatePluginList(unsigned long);
+ T2TenantDef* FindFloor();
+
+ T2TemplatePluginDB(const T2TemplatePluginDB&) {}
+ T2TemplatePluginDB& operator=(const T2TemplatePluginDB&) {}
+};
diff --git a/src/T2DLL/T2TemplatePluginList.cpp b/src/T2DLL/T2TemplatePluginList.cpp
new file mode 100644
index 0000000..c3063a2
--- /dev/null
+++ b/src/T2DLL/T2TemplatePluginList.cpp
@@ -0,0 +1,46 @@
+#include "T2TemplatePluginList.h"
+
+T2TemplatePluginList::T2TemplatePluginList(unsigned long) {
+}
+
+/*virtual*/ T2TemplatePluginList::~T2TemplatePluginList() {
+}
+
+void T2TemplatePluginList::AllClear() {
+}
+
+void T2TemplatePluginList::Regist(T2TemplatePlugin*) {
+}
+
+void T2TemplatePluginList::Add(T2TemplatePlugin*) {
+}
+
+unsigned int T2TemplatePluginList::GetItemCount() {
+}
+
+T2TemplatePlugin* T2TemplatePluginList::GetItemAt(int) {
+}
+
+T2TenantDef* T2TemplatePluginList::FindFloor() {
+}
+
+T2TenantDef* T2TemplatePluginList::FindTenantDef(int) {
+}
+
+T2MoverDef* T2TemplatePluginList::FindMoverDef(int) {
+}
+
+T2OuterObjDef* T2TemplatePluginList::FindOutObjDef(int) {
+}
+
+T2PeopleDef* T2TemplatePluginList::FindPeopleDef(int) {
+}
+
+T2SilhouetteDef* T2TemplatePluginList::FindSilhouette(int) {
+}
+
+int T2TemplatePluginList::CalcCategoryCount() {
+}
+
+void T2TemplatePluginList::DispatchIdle(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2TemplatePluginList.h b/src/T2DLL/T2TemplatePluginList.h
new file mode 100644
index 0000000..c22c68b
--- /dev/null
+++ b/src/T2DLL/T2TemplatePluginList.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "common.h"
+
+class T2TemplatePluginList {
+public:
+ T2TemplatePluginList(unsigned long);
+ virtual ~T2TemplatePluginList();
+ void AllClear();
+ void Regist(T2TemplatePlugin*);
+ void Add(T2TemplatePlugin*);
+ unsigned int GetItemCount();
+ T2TemplatePlugin* GetItemAt(int);
+ T2TenantDef* FindFloor();
+ T2TenantDef* FindTenantDef(int);
+ T2MoverDef* FindMoverDef(int);
+ T2OuterObjDef* FindOutObjDef(int);
+ T2PeopleDef* FindPeopleDef(int);
+ T2SilhouetteDef* FindSilhouette(int);
+ int CalcCategoryCount();
+ void DispatchIdle(T2TowerDoc*);
+
+ unsigned long GetPluginType() { return 0; }
+};
diff --git a/src/T2DLL/T2Tenant.cpp b/src/T2DLL/T2Tenant.cpp
new file mode 100644
index 0000000..5d36e88
--- /dev/null
+++ b/src/T2DLL/T2Tenant.cpp
@@ -0,0 +1,316 @@
+#include "T2Tenant.h"
+
+T2Tenant::T2Tenant() {
+}
+
+/*virtual*/ T2Tenant::~T2Tenant() {
+}
+
+unsigned int T2Tenant::GetFloorID(int) {
+}
+
+void T2Tenant::SetFloorID(T2FloorInfo*) {
+}
+
+/*virtual*/ PROCCODE T2Tenant::DoDestruct(T2TowerDoc*, POINT, RECT&) {
+}
+
+void T2Tenant::AddPopulation(T2People*) {
+}
+
+void T2Tenant::SubPopulation(T2People*) {
+}
+
+/*virtual*/ int T2Tenant::Enter(CLink*) {
+}
+
+/*virtual*/ int T2Tenant::Leave(CLink*) {
+}
+
+void T2Tenant::EnterTenant(T2TowerDoc*, T2People*) {
+}
+
+void T2Tenant::LeaveTenant(T2TowerDoc*, T2People*) {
+}
+
+/*virtual*/ void T2Tenant::Draw(T2TowerDoc*, const RECT&) {
+}
+
+/*virtual*/ void T2Tenant::DrawSelf(T2TowerDoc*, const RECT&) {
+}
+
+/*virtual*/ unsigned int T2Tenant::Idle(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Tenant::AddCEMoverID(const T2FloorInfo*, POINT, unsigned int) {
+}
+
+int T2Tenant::InitTenant(T2TenantDef*, const RECT&, unsigned int) {
+}
+
+/*virtual*/ void T2Tenant::LoadSelf(T2Archive&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Tenant::SaveSelf(T2Archive&) {
+}
+
+/*virtual*/ unsigned int T2Tenant::GetEntranceFloorID() {
+}
+
+POINT T2Tenant::GetEntrancePt() const {
+}
+
+/*virtual*/ unsigned int T2Tenant::GetExitFloorID() {
+}
+
+POINT T2Tenant::GetExitPt() {
+}
+
+T2People* T2Tenant::GetFirstCustomer() const {
+}
+
+int T2Tenant::GetBelongCapacity() {
+}
+
+int T2Tenant::IsTherePeople(T2People*) {
+}
+
+void T2Tenant::StartBuild() {
+}
+
+void T2Tenant::UpdatePatternIndex() {
+}
+
+void T2Tenant::UpdatePatternIndex(int) {
+}
+
+int T2Tenant::GetNumOfPattern() const {
+}
+
+int T2Tenant::CollectCustomerFromPool(T2TowerDoc*, T2TenantMemberTableDef*, unsigned int, T2Tenant*) {
+}
+
+int T2Tenant::CollectCustomerFromTenant(T2TowerDoc*, T2TenantMemberTableDef*, unsigned int) {
+}
+
+int T2Tenant::CollectCustomerFromFloor(T2TowerDoc*, T2TenantMemberTableDef*, unsigned int) {
+}
+
+void T2Tenant::CollectCustomer(T2TowerDoc*, T2Tenant*) {
+}
+
+void T2Tenant::CollectCustomer(T2TowerDoc*, int) {
+}
+
+int T2Tenant::CollectEmployee(T2TowerDoc*) {
+}
+
+void T2Tenant::RegistBelongPeople(T2People*) {
+}
+
+int T2Tenant::CalcInMoney() const {
+}
+
+void T2Tenant::EnterCustomer(T2People*, int) {
+}
+
+int T2Tenant::IsBelongPeople(T2People*) const {
+}
+
+void T2Tenant::PushOutPeople(T2TowerDoc*, T2People*) {
+}
+
+void T2Tenant::PushOutAll(T2TowerDoc*) {
+}
+
+void T2Tenant::PushOutAllCustomer(T2TowerDoc*) {
+}
+
+int T2Tenant::GetPriceIndex() const {
+}
+
+void T2Tenant::DuplicateBelongPeople(T2TowerDoc*) {
+}
+
+void T2Tenant::RemoveBelongPeople(T2TowerDoc*) {
+}
+
+void T2Tenant::RemovePeople(T2TowerDoc*) {
+}
+
+void T2Tenant::ClearBelongPeople() {
+}
+
+void T2Tenant::ClearBelongPeople(T2People*) {
+}
+
+void T2Tenant::CallBelongPeople(unsigned int) {
+}
+
+T2People* T2Tenant::GetBelongPeople(int) {
+}
+
+T2People* T2Tenant::GetBelongPeopleIn(int) {
+}
+
+void T2Tenant::SetKind() {
+}
+
+int T2Tenant::GetNumOfKind() const {
+}
+
+/*virtual*/ void T2Tenant::SetUsed(int) {
+}
+
+unsigned int T2Tenant::GetRegistID() const {
+}
+
+int T2Tenant::GetEmployeeSearchScore() const {
+}
+
+int T2Tenant::GetCustomerSearchScore() const {
+}
+
+int T2Tenant::IsMoverAvailable() const {
+}
+
+void T2Tenant::RemoveBelongList() {
+}
+
+int T2Tenant::GetQTMovieName(CString) {
+}
+
+void T2Tenant::Destruct(T2TowerDoc*, CRect&) {
+}
+
+void T2Tenant::SetBindTime(T2People*, unsigned int) {
+}
+
+int T2Tenant::SetEstimate(int) {
+}
+
+int T2Tenant::SetPeopleAnime() {
+}
+
+void T2Tenant::SetPeopleAnime(T2People*, int) {
+}
+
+void T2Tenant::PushOutCustomer(T2TowerDoc*, int) {
+}
+
+int T2Tenant::GetBelongPeopleIndex(T2People*, int&) const {
+}
+
+int T2Tenant::SetPeopleToSleep() {
+}
+
+void T2Tenant::SetAllPeopleToSleep() {
+}
+
+void T2Tenant::UnionFloorPeople(T2Tenant*) {
+}
+
+int T2Tenant::IsWithinSearchRange(T2TowerDoc*, T2Tenant*) const {
+}
+
+void T2Tenant::SetMoviePlugin(T2SubPlugin*) {
+}
+
+void T2Tenant::SetHallEventPlugin(T2HallEventPlugin*) {
+}
+
+int T2Tenant::GetFloorNumber(T2FloorInfo*) const {
+}
+
+int T2Tenant::GetRoomNumber(T2FloorInfo*) const {
+}
+
+void T2Tenant::GetRoomName(T2TowerDoc*, CString&) const {
+}
+
+/*virtual*/ void T2Tenant::PlaySoundA(T2TowerDoc*, int, unsigned int, unsigned int) const {
+}
+
+int T2Tenant::IsEmptyParking() const {
+}
+
+T2People* T2Tenant::FindPeople(POINT) const {
+}
+
+int T2Tenant::InitBelongList() {
+}
+
+void T2Tenant::DrawViewModeColor(T2TowerDoc*) const {
+}
+
+void T2Tenant::DrawTrafficColor(T2TowerDoc*, const CRect&) const {
+}
+
+/*static*/ void T2Tenant::DrawColorMesh(T2TowerDoc*, const CRect&, int) {
+}
+
+void T2Tenant::IncPeopleEstimate(int) {
+}
+
+int T2Tenant::CalcEstimateColor() const {
+}
+
+int T2Tenant::CollectEmployeeFromPool(T2TowerDoc*, T2TenantMemberTableDef*) {
+}
+
+int T2Tenant::IsRegist() const {
+}
+
+unsigned int T2Tenant::CheckRouteFromPool(T2TowerDoc*, unsigned int) const {
+}
+
+T2TenantMemberTableDef* T2Tenant::GetCustomerTableDef(int) const {
+}
+
+int T2Tenant::UpdateResidencialEstimate(T2TowerDoc*) {
+}
+
+void T2Tenant::BreakoutEmergency(T2TowerDoc*) {
+}
+
+void T2Tenant::BurntDown(T2TowerDoc*) {
+}
+
+void T2Tenant::RecoverRelatedTenantList(T2RegistedTenantDB*) {
+}
+
+int T2Tenant::GetTotalBelong() const {
+}
+
+int T2Tenant::CanReplaceWorker() const {
+}
+
+int T2Tenant::ReplaceWorker(T2TowerDoc*, T2People*) {
+}
+
+void T2Tenant::CallEmployee(unsigned int) {
+}
+
+int T2Tenant::DecideResidencialEstimation(T2TowerDoc*) {
+}
+
+int T2Tenant::UpdateCommercialEstimate() {
+}
+
+int T2Tenant::CalcProfitEstimate() const {
+}
+
+void T2Tenant::GetMerchandise(int&, int*&) {
+}
+
+T2TenantMemberTableDef* T2Tenant::GetMerchandiseTMT() {
+}
+
+void T2Tenant::SetMerchandise(int, int*) {
+}
+
+void T2Tenant::SetRelatedTenant(T2TowerDoc*, unsigned int) {
+}
+
+/*virtual*/ void T2Tenant::BuildStart(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2Tenant.h b/src/T2DLL/T2Tenant.h
new file mode 100644
index 0000000..fd2a6fa
--- /dev/null
+++ b/src/T2DLL/T2Tenant.h
@@ -0,0 +1,188 @@
+#pragma once
+#include "common.h"
+
+class T2Tenant {
+public:
+ T2Tenant();
+ virtual ~T2Tenant();
+ unsigned int GetFloorID(int);
+ void SetFloorID(T2FloorInfo*);
+ virtual PROCCODE DoDestruct(T2TowerDoc*, POINT, RECT&);
+protected:
+ void AddPopulation(T2People*);
+ void SubPopulation(T2People*);
+public:
+ virtual int Enter(CLink*);
+ virtual int Leave(CLink*);
+ void EnterTenant(T2TowerDoc*, T2People*);
+ void LeaveTenant(T2TowerDoc*, T2People*);
+ virtual void Draw(T2TowerDoc*, const RECT&);
+protected:
+ virtual void DrawSelf(T2TowerDoc*, const RECT&);
+public:
+ virtual unsigned int Idle(T2TowerDoc*);
+ virtual void AddCEMoverID(const T2FloorInfo*, POINT, unsigned int);
+ int InitTenant(T2TenantDef*, const RECT&, unsigned int);
+protected:
+ virtual void LoadSelf(T2Archive&, T2TowerDoc*);
+ virtual void SaveSelf(T2Archive&);
+public:
+ virtual unsigned int GetEntranceFloorID();
+ POINT GetEntrancePt() const;
+ virtual unsigned int GetExitFloorID();
+ POINT GetExitPt();
+ T2People* GetFirstCustomer() const;
+ int GetBelongCapacity();
+ int IsTherePeople(T2People*);
+ void StartBuild();
+ void UpdatePatternIndex();
+ void UpdatePatternIndex(int);
+ int GetNumOfPattern() const;
+protected:
+ int CollectCustomerFromPool(T2TowerDoc*, T2TenantMemberTableDef*, unsigned int, T2Tenant*);
+ int CollectCustomerFromTenant(T2TowerDoc*, T2TenantMemberTableDef*, unsigned int);
+ int CollectCustomerFromFloor(T2TowerDoc*, T2TenantMemberTableDef*, unsigned int);
+public:
+ void CollectCustomer(T2TowerDoc*, T2Tenant*);
+ void CollectCustomer(T2TowerDoc*, int);
+ int CollectEmployee(T2TowerDoc*);
+ void RegistBelongPeople(T2People*);
+ int CalcInMoney() const;
+ void EnterCustomer(T2People*, int);
+ int IsBelongPeople(T2People*) const;
+ void PushOutPeople(T2TowerDoc*, T2People*);
+ void PushOutAll(T2TowerDoc*);
+ void PushOutAllCustomer(T2TowerDoc*);
+ int GetPriceIndex() const;
+protected:
+ void DuplicateBelongPeople(T2TowerDoc*);
+ void RemoveBelongPeople(T2TowerDoc*);
+public:
+ void RemovePeople(T2TowerDoc*);
+ void ClearBelongPeople();
+ void ClearBelongPeople(T2People*);
+ void CallBelongPeople(unsigned int);
+ T2People* GetBelongPeople(int);
+ T2People* GetBelongPeopleIn(int);
+ void SetKind();
+protected:
+ int GetNumOfKind() const;
+public:
+ virtual void SetUsed(int);
+ unsigned int GetRegistID() const;
+ int GetEmployeeSearchScore() const;
+ int GetCustomerSearchScore() const;
+ int IsMoverAvailable() const;
+ void RemoveBelongList();
+ int GetQTMovieName(CString);
+ void Destruct(T2TowerDoc*, CRect&);
+ void SetBindTime(T2People*, unsigned int);
+ int SetEstimate(int);
+ int SetPeopleAnime();
+ void SetPeopleAnime(T2People*, int);
+ void PushOutCustomer(T2TowerDoc*, int);
+ int GetBelongPeopleIndex(T2People*, int&) const;
+ int SetPeopleToSleep();
+ void SetAllPeopleToSleep();
+ void UnionFloorPeople(T2Tenant*);
+ int IsWithinSearchRange(T2TowerDoc*, T2Tenant*) const;
+ void SetMoviePlugin(T2SubPlugin*);
+ void SetHallEventPlugin(T2HallEventPlugin*);
+ int GetFloorNumber(T2FloorInfo*) const;
+ int GetRoomNumber(T2FloorInfo*) const;
+ void GetRoomName(T2TowerDoc*, CString&) const;
+ virtual void PlaySoundA(T2TowerDoc*, int, unsigned int, unsigned int) const;
+ int IsEmptyParking() const;
+ T2People* FindPeople(POINT) const;
+protected:
+ int InitBelongList();
+ void DrawViewModeColor(T2TowerDoc*) const;
+ void DrawTrafficColor(T2TowerDoc*, const CRect&) const;
+ static void DrawColorMesh(T2TowerDoc*, const CRect&, int);
+public:
+ void IncPeopleEstimate(int);
+ int CalcEstimateColor() const;
+protected:
+ int CollectEmployeeFromPool(T2TowerDoc*, T2TenantMemberTableDef*);
+public:
+ int IsRegist() const;
+protected:
+ unsigned int CheckRouteFromPool(T2TowerDoc*, unsigned int) const;
+public:
+ T2TenantMemberTableDef* GetCustomerTableDef(int) const;
+ int UpdateResidencialEstimate(T2TowerDoc*);
+ void BreakoutEmergency(T2TowerDoc*);
+ void BurntDown(T2TowerDoc*);
+ void RecoverRelatedTenantList(T2RegistedTenantDB*);
+ int GetTotalBelong() const;
+ int CanReplaceWorker() const;
+ int ReplaceWorker(T2TowerDoc*, T2People*);
+ void CallEmployee(unsigned int);
+ int DecideResidencialEstimation(T2TowerDoc*);
+ int UpdateCommercialEstimate();
+ int CalcProfitEstimate() const;
+ void GetMerchandise(int&, int*&);
+ T2TenantMemberTableDef* GetMerchandiseTMT();
+ void SetMerchandise(int, int*);
+ void SetRelatedTenant(T2TowerDoc*, unsigned int);
+ virtual void BuildStart(T2TowerDoc*);
+
+ unsigned int GetResideDay() const {}
+ int GetEstimate() const {}
+ void SetRelatedTenantID(unsigned int) {}
+ unsigned int GetRelatedTenantID() const {}
+ int IsSetRelatedTenantID() const {}
+ int IsFloor() const {}
+ int IsPoolTenant() const {}
+ int IsHome() const {}
+ int IsConcat() const {}
+ int IsPeopleAnime() const {}
+ int IsNeedToilet() const {}
+ int IsNeedDraw() {}
+ int IsTherePeople() const {}
+ int IsThereCustomer() const {}
+ T2People* GetFirstPeople() const {}
+ int IsOpen() const {}
+ int WillBeFull() const {}
+ int CalcRestCapacity() const {}
+ void SetMark(int) {}
+ int GetMark() const {}
+ int GetBelongCount() const {}
+ void ClearWorkCount() {}
+ int GetTotalCustomer() const {}
+ void ClearTotalCustomer() {}
+ void IncTotalCustomer() {}
+ T2PeoplePtrList* GetBelongList() const {}
+ void SetRelatedTenantList(T2EquipPtrList*) {}
+ T2EquipPtrList* GetRelatedTenantList() const {}
+ virtual int IsBuildFinish() {}
+ int IsFire() {}
+ int IsFireproof() const {}
+ unsigned int GetTenantNumber() const {}
+ void SetTenantNumber(unsigned int) {}
+protected:
+ int GetConsumptionPower() const {}
+public:
+ T2Tenant(const T2Tenant&) {}
+ T2Tenant& operator=(const T2Tenant&) {}
+ virtual void ClearDrawMode() {}
+ int IsBind() const {}
+ void Bind() {}
+ void Unbind() {}
+ unsigned int GetOpenTime() const {}
+ unsigned int GetCloseTime() const {}
+ int GetBindTime() const {}
+ T2TenantMemberTableDef* GetEmployeeTableDef() const {}
+ int IsFull() const {}
+ int GetCustomerCount() const {}
+ int GetKindIndex() const {}
+ void SetKindIndex(int) {}
+ void IncWorkCount() {}
+ void DecWorkCount() {}
+ int GetWorkCount() const {}
+ void ClearReserveCount() {}
+ void IncReserveCount(unsigned int) {}
+ void DecReserveCount() {}
+ int GetReserveCount() const {}
+ void CancelReserve() {}
+};
diff --git a/src/T2DLL/T2TenantArray.cpp b/src/T2DLL/T2TenantArray.cpp
new file mode 100644
index 0000000..e7dfb45
--- /dev/null
+++ b/src/T2DLL/T2TenantArray.cpp
@@ -0,0 +1,34 @@
+#include "T2TenantArray.h"
+
+T2TenantArray::T2TenantArray(unsigned int) {
+}
+
+/*virtual*/ T2TenantArray::~T2TenantArray() {
+}
+
+T2Tenant* T2TenantArray::FindUnusedTenant() {
+}
+
+/*virtual*/ void T2TenantArray::DispatchIdle(T2TowerDoc*, int) {
+}
+
+int T2TenantArray::CalcMentenanceCost(T2TowerDoc*) const {
+}
+
+void T2TenantArray::TenantRemoved(unsigned int) {
+}
+
+T2Tenant* T2TenantArray::GetTenantByPID(unsigned long) {
+}
+
+void T2TenantArray::BreakoutEmergency(T2TowerDoc*) {
+}
+
+void T2TenantArray::RecoverRelatedTenantList(T2RegistedTenantDB*) {
+}
+
+void T2TenantArray::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2TenantArray::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2TenantArray.h b/src/T2DLL/T2TenantArray.h
new file mode 100644
index 0000000..a443c9f
--- /dev/null
+++ b/src/T2DLL/T2TenantArray.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "common.h"
+
+class T2TenantArray {
+public:
+ T2TenantArray(unsigned int);
+ virtual ~T2TenantArray();
+ T2Tenant* FindUnusedTenant();
+ virtual void DispatchIdle(T2TowerDoc*, int);
+ int CalcMentenanceCost(T2TowerDoc*) const;
+ void TenantRemoved(unsigned int);
+ T2Tenant* GetTenantByPID(unsigned long);
+ void BreakoutEmergency(T2TowerDoc*);
+ void RecoverRelatedTenantList(T2RegistedTenantDB*);
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+
+ T2Tenant* GetIndexTenant(int) {}
+ T2TenantArray(const T2TenantArray&) {}
+ T2TenantArray& operator=(const T2TenantArray&) {}
+ void `default constructor closure'() {}
+};
diff --git a/src/T2DLL/T2TenantArrayList.cpp b/src/T2DLL/T2TenantArrayList.cpp
new file mode 100644
index 0000000..6383c6d
--- /dev/null
+++ b/src/T2DLL/T2TenantArrayList.cpp
@@ -0,0 +1,52 @@
+#include "T2TenantArrayList.h"
+
+T2TenantArrayList::T2TenantArrayList() {
+}
+
+/*virtual*/ T2TenantArrayList::~T2TenantArrayList() {
+}
+
+void T2TenantArrayList::Add(T2TenantArray*) {
+}
+
+unsigned int T2TenantArrayList::GetItemCount() {
+}
+
+T2TenantArray* T2TenantArrayList::GetItemAt(int) {
+}
+
+T2Tenant* T2TenantArrayList::GetTenantByID(unsigned int) {
+}
+
+T2Tenant* T2TenantArrayList::GetTenantByPID(unsigned long) {
+}
+
+T2Tenant* T2TenantArrayList::FindUnusedTenant() {
+}
+
+void T2TenantArrayList::DispatchIdle(T2TowerDoc*) {
+}
+
+void T2TenantArrayList::TenantRemoved(unsigned int) {
+}
+
+void T2TenantArrayList::BreakoutEmergency(T2TowerDoc*) {
+}
+
+int T2TenantArrayList::CalcMentenanceCost(T2TowerDoc*) const {
+}
+
+LArray* T2TenantArrayList::MakeTenantList(int) {
+}
+
+LArray* T2TenantArrayList::MakeTenantList(int, (__cdecl*)(class, const T2Tenant*, )) {
+}
+
+void T2TenantArrayList::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2TenantArrayList::Write(T2Archive&) {
+}
+
+void T2TenantArrayList::RecoverRelatedTenantList(T2RegistedTenantDB*) {
+}
diff --git a/src/T2DLL/T2TenantArrayList.h b/src/T2DLL/T2TenantArrayList.h
new file mode 100644
index 0000000..5405649
--- /dev/null
+++ b/src/T2DLL/T2TenantArrayList.h
@@ -0,0 +1,26 @@
+#pragma once
+#include "common.h"
+
+class T2TenantArrayList {
+public:
+ T2TenantArrayList();
+ virtual ~T2TenantArrayList();
+ void Add(T2TenantArray*);
+ unsigned int GetItemCount();
+ T2TenantArray* GetItemAt(int);
+ T2Tenant* GetTenantByID(unsigned int);
+ T2Tenant* GetTenantByPID(unsigned long);
+ T2Tenant* FindUnusedTenant();
+ void DispatchIdle(T2TowerDoc*);
+ void TenantRemoved(unsigned int);
+ void BreakoutEmergency(T2TowerDoc*);
+ int CalcMentenanceCost(T2TowerDoc*) const;
+ LArray* MakeTenantList(int);
+ LArray* MakeTenantList(int, (__cdecl*)(class, const T2Tenant*, ));
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+ void RecoverRelatedTenantList(T2RegistedTenantDB*);
+
+ T2TenantArrayList(const T2TenantArrayList&) {}
+ T2TenantArrayList& operator=(const T2TenantArrayList&) {}
+};
diff --git a/src/T2DLL/T2TenantCEArray.cpp b/src/T2DLL/T2TenantCEArray.cpp
new file mode 100644
index 0000000..3a67dc2
--- /dev/null
+++ b/src/T2DLL/T2TenantCEArray.cpp
@@ -0,0 +1,17 @@
+#include "T2TenantCEArray.h"
+
+T2TenantCEArray::T2TenantCEArray() {
+}
+
+/*virtual*/ T2TenantCEArray::~T2TenantCEArray() {
+}
+
+unsigned int T2TenantCEArray::GetFloorID(int index) {
+ unsigned int floorID;
+ FetchItemAt(index, &floorID);
+ return floorID;
+}
+
+void T2TenantCEArray::SetFloorID(unsigned int floorID) {
+ Add(floorID);
+}
diff --git a/src/T2DLL/T2TenantCEArray.h b/src/T2DLL/T2TenantCEArray.h
new file mode 100644
index 0000000..71a00a7
--- /dev/null
+++ b/src/T2DLL/T2TenantCEArray.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "common.h"
+#include "T2CrossEquipArray.h"
+
+class T2TenantCEArray : public T2CrossEquipArray {
+public:
+ T2TenantCEArray();
+ virtual ~T2TenantCEArray();
+ unsigned int GetFloorID(int);
+ void SetFloorID(unsigned int);
+
+ virtual DWORD GetCEClassID() { return 'TCEA'; }
+};
diff --git a/src/T2DLL/T2TenantDef.cpp b/src/T2DLL/T2TenantDef.cpp
new file mode 100644
index 0000000..1f3514e
--- /dev/null
+++ b/src/T2DLL/T2TenantDef.cpp
@@ -0,0 +1,67 @@
+#include "T2TenantDef.h"
+
+T2TenantDef::T2TenantDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldDef*, T2TenantPlugin*) {
+}
+
+/*virtual*/ T2TenantDef::~T2TenantDef() {
+}
+
+/*virtual*/ void T2TenantDef::GetName(CString&) {
+}
+
+/*virtual*/ int T2TenantDef::InitObject(T2Object*) {
+}
+
+/*virtual*/ void T2TenantDef::DrawProc(T2HaveOutViewObject*, const RECT&, T2TowerDoc*) const {
+}
+
+/*virtual*/ int T2TenantDef::DrawData(int) {
+}
+
+/*virtual*/ void T2TenantDef::DrawPeople(T2TowerDoc*, T2Equip*) {
+}
+
+/*virtual*/ int T2TenantDef::DrawAttribute(int) {
+}
+
+/*virtual*/ unsigned int T2TenantDef::IdleProc(T2HaveOutViewObject*, T2TowerDoc*) {
+}
+
+/*virtual*/ int T2TenantDef::ChangeStatusOnIdle(T2TowerDoc*, T2Tenant*, int) {
+}
+
+/*virtual*/ AREACHECKCODE T2TenantDef::AreaCheck(T2TowerDoc*, RECT&, unsigned int, int) {
+}
+
+/*virtual*/ int T2TenantDef::CalcPayment(T2TowerDoc*, RECT&, unsigned int) {
+}
+
+/*virtual*/ void T2TenantDef::EnterTenant(T2TowerDoc*, T2Tenant*, T2People*) {
+}
+
+/*virtual*/ void T2TenantDef::LeaveTenant(T2TowerDoc*, T2Tenant*, T2People*) {
+}
+
+/*virtual*/ void T2TenantDef::BuildStartProc(T2TowerDoc*, T2Tenant*) {
+}
+
+/*virtual*/ void T2TenantDef::DoPeopleAnimation(T2TowerDoc*, T2Tenant*) {
+}
+
+/*virtual*/ int T2TenantDef::GetQTMovieName(T2Tenant*, CString&) {
+}
+
+void T2TenantDef::SetCustomerTable(T2SubPlugin*) {
+}
+
+void T2TenantDef::MakeCustomerTableDef(int, const char*) {
+}
+
+float T2TenantDef::CalcNumOfCustomerUnit() {
+}
+
+/*virtual*/ int T2TenantDef::EmergencyProc(T2TowerDoc*, T2Equip*) {
+}
+
+/*virtual*/ int T2TenantDef::CalcMentenanceCostProc(const T2HaveOutViewObject*) const {
+}
diff --git a/src/T2DLL/T2TenantDef.h b/src/T2DLL/T2TenantDef.h
new file mode 100644
index 0000000..0657566
--- /dev/null
+++ b/src/T2DLL/T2TenantDef.h
@@ -0,0 +1,51 @@
+#pragma once
+#include "common.h"
+
+class T2TenantDef {
+public:
+ T2TenantDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldDef*, T2TenantPlugin*);
+ virtual ~T2TenantDef();
+ virtual void GetName(CString&);
+ virtual int InitObject(T2Object*);
+ virtual void DrawProc(T2HaveOutViewObject*, const RECT&, T2TowerDoc*) const;
+ virtual int DrawData(int);
+ virtual void DrawPeople(T2TowerDoc*, T2Equip*);
+ virtual int DrawAttribute(int);
+ virtual unsigned int IdleProc(T2HaveOutViewObject*, T2TowerDoc*);
+ virtual int ChangeStatusOnIdle(T2TowerDoc*, T2Tenant*, int);
+ virtual AREACHECKCODE AreaCheck(T2TowerDoc*, RECT&, unsigned int, int);
+ virtual int CalcPayment(T2TowerDoc*, RECT&, unsigned int);
+ virtual void EnterTenant(T2TowerDoc*, T2Tenant*, T2People*);
+ virtual void LeaveTenant(T2TowerDoc*, T2Tenant*, T2People*);
+ virtual void BuildStartProc(T2TowerDoc*, T2Tenant*);
+ virtual void DoPeopleAnimation(T2TowerDoc*, T2Tenant*);
+ virtual int GetQTMovieName(T2Tenant*, CString&);
+ void SetCustomerTable(T2SubPlugin*);
+ void MakeCustomerTableDef(int, const char*);
+protected:
+ float CalcNumOfCustomerUnit();
+public:
+ virtual int EmergencyProc(T2TowerDoc*, T2Equip*);
+ virtual int CalcMentenanceCostProc(const T2HaveOutViewObject*) const;
+
+ virtual int IsTenant() {}
+ int IsFloor() {}
+ int IsValiableLength() {}
+ int IsHome() {}
+ int IsConcat() {}
+ int IsPeopleAnime() {}
+ int GetEntranceV() {}
+ int GetEntranceH() {}
+ int GetExitV() {}
+ int GetExitH() {}
+ int GetNumOfPattern() const {}
+ int GetNumOfKind() {}
+ int GetBelongCapacity() const {}
+ unsigned int GetRegistID() const {}
+ unsigned int GetDownFlag() const {}
+ int GetSenseOfNoise() const {}
+ T2PeopleAnimeDef* GetPeopleAnimeDef() const {}
+ T2TenantMemberTableDef* GetEmployeeTableDef() const {}
+ T2TenantMemberTableDef* GetCustomerTableDef() const {}
+ T2TenantDef& operator=(T2TenantDef&) {}
+};
diff --git a/src/T2DLL/T2TenantInfoDialog.cpp b/src/T2DLL/T2TenantInfoDialog.cpp
new file mode 100644
index 0000000..149de6c
--- /dev/null
+++ b/src/T2DLL/T2TenantInfoDialog.cpp
@@ -0,0 +1,7 @@
+#include "T2TenantInfoDialog.h"
+
+T2TenantInfoDialog::T2TenantInfoDialog(T2Tenant*) {
+}
+
+/*virtual*/ T2TenantInfoDialog::~T2TenantInfoDialog() {
+}
diff --git a/src/T2DLL/T2TenantInfoDialog.h b/src/T2DLL/T2TenantInfoDialog.h
new file mode 100644
index 0000000..aa68b8b
--- /dev/null
+++ b/src/T2DLL/T2TenantInfoDialog.h
@@ -0,0 +1,11 @@
+#pragma once
+#include "common.h"
+
+class T2TenantInfoDialog {
+public:
+ T2TenantInfoDialog(T2Tenant*);
+ virtual ~T2TenantInfoDialog();
+
+ T2Tenant* GetTenant() const {}
+ T2TenantDef* GetTenantDef() const {}
+};
diff --git a/src/T2DLL/T2TenantMemberDef.cpp b/src/T2DLL/T2TenantMemberDef.cpp
new file mode 100644
index 0000000..f06f530
--- /dev/null
+++ b/src/T2DLL/T2TenantMemberDef.cpp
@@ -0,0 +1,21 @@
+#include "CResFile.h"
+#include "T2TenantMemberDef.h"
+
+T2TenantMemberDef::T2TenantMemberDef() {
+}
+
+/*virtual*/ T2TenantMemberDef::~T2TenantMemberDef() {
+}
+
+void T2TenantMemberDef::Initialize(CResFile* resFile, float mult) {
+ *resFile >> mName;
+ *resFile >> mDemandType;
+ *resFile >> mStartSilhouetteType;
+ *resFile >> mEndSilhouetteType;
+ *resFile >> mOptionType;
+ *resFile >> mPercent;
+ *resFile >> mNumOfPeople;
+
+ if (mult > 0.0f && mPercent > 0)
+ mRate = (mPercent * mult) / 100.0f;
+}
diff --git a/src/T2DLL/T2TenantMemberDef.h b/src/T2DLL/T2TenantMemberDef.h
new file mode 100644
index 0000000..215e0f4
--- /dev/null
+++ b/src/T2DLL/T2TenantMemberDef.h
@@ -0,0 +1,31 @@
+#pragma once
+#include "common.h"
+
+class T2TenantMemberDef {
+public:
+ T2TenantMemberDef();
+ virtual ~T2TenantMemberDef();
+ void Initialize(CResFile*, float);
+
+ int GetDemandType() const { return mDemandType; }
+ int GetStartSilhouetteType() const { return mStartSilhouetteType; }
+ int GetEndSilhouetteType() const { return mEndSilhouetteType; }
+ int GetOptionType() const { return mOptionType; }
+ unsigned int GetNumOfPeople() const { return mNumOfPeople; }
+ void SetNumOfPeople(unsigned int v) { mNumOfPeople = v; }
+ float GetRate() const { return mRate; }
+ void SetRate(float v) { mRate = v; }
+ void GetName(CString& outStr) const { outStr = mName; }
+ unsigned int GetPercent() const { return mPercent; }
+ void SetPercent(unsigned int v) { mPercent = v; }
+
+protected:
+ char mName[16];
+ int mDemandType;
+ int mStartSilhouetteType;
+ int mEndSilhouetteType;
+ int mOptionType;
+ unsigned int mPercent;
+ unsigned int mNumOfPeople;
+ float mRate;
+};
diff --git a/src/T2DLL/T2TenantMemberTableDef.cpp b/src/T2DLL/T2TenantMemberTableDef.cpp
new file mode 100644
index 0000000..37a06a1
--- /dev/null
+++ b/src/T2DLL/T2TenantMemberTableDef.cpp
@@ -0,0 +1,46 @@
+#include "T2TenantMemberTableDef.h"
+
+T2TenantMemberTableDef::T2TenantMemberTableDef(HINSTANCE, CResFile*, float) {
+}
+
+T2TenantMemberTableDef::T2TenantMemberTableDef(const char*, CResFile*, float) {
+}
+
+/*virtual*/ T2TenantMemberTableDef::~T2TenantMemberTableDef() {
+}
+
+void T2TenantMemberTableDef::Initialize() {
+}
+
+int T2TenantMemberTableDef::GetEconoType() const {
+}
+
+int T2TenantMemberTableDef::IsCheckOnlyFirstEconoType() const {
+}
+
+T2TenantMemberDef* T2TenantMemberTableDef::GetElem(int) const {
+}
+
+int T2TenantMemberTableDef::GetScore(T2PlaceParamDef::EPlace) const {
+}
+
+int T2TenantMemberTableDef::IsCollectFromFloor() const {
+}
+
+int T2TenantMemberTableDef::IsCollectFromPool(T2TowerDoc*) const {
+}
+
+int T2TenantMemberTableDef::IsCollectFromTenant() const {
+}
+
+T2DayParamDef* T2TenantMemberTableDef::MakeDayParamDef(HINSTANCE, int) {
+}
+
+T2DayParamDef* T2TenantMemberTableDef::MakeDayParamDef(const char*, int) {
+}
+
+T2PlaceParamDef* T2TenantMemberTableDef::MakePlaceParamDef(HINSTANCE, int) {
+}
+
+T2PlaceParamDef* T2TenantMemberTableDef::MakePlaceParamDef(const char*, int) {
+}
diff --git a/src/T2DLL/T2TenantMemberTableDef.h b/src/T2DLL/T2TenantMemberTableDef.h
new file mode 100644
index 0000000..e189d59
--- /dev/null
+++ b/src/T2DLL/T2TenantMemberTableDef.h
@@ -0,0 +1,30 @@
+#pragma once
+#include "common.h"
+
+class T2TenantMemberTableDef {
+public:
+ T2TenantMemberTableDef(HINSTANCE, CResFile*, float);
+ T2TenantMemberTableDef(const char*, CResFile*, float);
+ virtual ~T2TenantMemberTableDef();
+private:
+ void Initialize();
+public:
+ int GetEconoType() const;
+ int IsCheckOnlyFirstEconoType() const;
+ T2TenantMemberDef* GetElem(int) const;
+ int GetScore(T2PlaceParamDef::EPlace) const;
+ int IsCollectFromFloor() const;
+ int IsCollectFromPool(T2TowerDoc*) const;
+ int IsCollectFromTenant() const;
+protected:
+ T2DayParamDef* MakeDayParamDef(HINSTANCE, int);
+ T2DayParamDef* MakeDayParamDef(const char*, int);
+ T2PlaceParamDef* MakePlaceParamDef(HINSTANCE, int);
+ T2PlaceParamDef* MakePlaceParamDef(const char*, int);
+
+public:
+ T2TenantMemberTableDef(const T2TenantMemberTableDef&) {}
+ T2TenantMemberTableDef& operator=(const T2TenantMemberTableDef&) {}
+ int GetNumOfElem() const {}
+ unsigned int GetSpecialFlag() const {}
+};
diff --git a/src/T2DLL/T2TenantPlugin.cpp b/src/T2DLL/T2TenantPlugin.cpp
new file mode 100644
index 0000000..428b111
--- /dev/null
+++ b/src/T2DLL/T2TenantPlugin.cpp
@@ -0,0 +1,19 @@
+#include "T2TenantPlugin.h"
+
+T2TenantPlugin::T2TenantPlugin(unsigned long, T2PluginSpecifier&) {
+}
+
+/*virtual*/ T2TenantPlugin::~T2TenantPlugin() {
+}
+
+int T2TenantPlugin::TestLoadAllDefRsrcPlugin() {
+}
+
+int T2TenantPlugin::LoadAllTemplatePlugin(T2WorldDef*, T2TemplatePluginDB*) {
+}
+
+unsigned long T2TenantPlugin::GetShopPluginType() {
+}
+
+void T2TenantPlugin::LoadT2TenantDef(T2WorldDef*) {
+}
diff --git a/src/T2DLL/T2TenantPlugin.h b/src/T2DLL/T2TenantPlugin.h
new file mode 100644
index 0000000..0519a81
--- /dev/null
+++ b/src/T2DLL/T2TenantPlugin.h
@@ -0,0 +1,16 @@
+#pragma once
+#include "common.h"
+
+class T2TenantPlugin {
+public:
+ T2TenantPlugin(unsigned long, T2PluginSpecifier&);
+ virtual ~T2TenantPlugin();
+ int TestLoadAllDefRsrcPlugin();
+ int LoadAllTemplatePlugin(T2WorldDef*, T2TemplatePluginDB*);
+ unsigned long GetShopPluginType();
+private:
+ void LoadT2TenantDef(T2WorldDef*);
+
+public:
+ T2TenantPlugin& operator=(T2TenantPlugin&) {}
+};
diff --git a/src/T2DLL/T2Terrorist.cpp b/src/T2DLL/T2Terrorist.cpp
new file mode 100644
index 0000000..6d3e7ac
--- /dev/null
+++ b/src/T2DLL/T2Terrorist.cpp
@@ -0,0 +1,28 @@
+#include "T2Terrorist.h"
+
+T2Terrorist::T2Terrorist(T2TowerEvent*, CResFile*, int) {
+}
+
+/*virtual*/ T2Terrorist::~T2Terrorist() {
+}
+
+/*virtual*/ int T2Terrorist::Start(T2TowerDoc*) {
+}
+
+void T2Terrorist::SetupSound() {
+}
+
+void T2Terrorist::DisposeSound() {
+}
+
+/*virtual*/ int T2Terrorist::Exec(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Terrorist::StopEvent(T2TowerDoc*) {
+}
+
+/*virtual*/ unsigned int T2Terrorist::DialogHook(T2EventDialog*, unsigned int, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Terrorist::SetupDialog(T2Dialog*) {
+}
diff --git a/src/T2DLL/T2Terrorist.h b/src/T2DLL/T2Terrorist.h
new file mode 100644
index 0000000..1549258
--- /dev/null
+++ b/src/T2DLL/T2Terrorist.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+
+class T2Terrorist {
+public:
+ T2Terrorist(T2TowerEvent*, CResFile*, int);
+ virtual ~T2Terrorist();
+ virtual int Start(T2TowerDoc*);
+protected:
+ void SetupSound();
+ void DisposeSound();
+public:
+ virtual int Exec(T2TowerDoc*);
+ virtual void StopEvent(T2TowerDoc*);
+ virtual unsigned int DialogHook(T2EventDialog*, unsigned int, T2TowerDoc*);
+protected:
+ virtual void SetupDialog(T2Dialog*);
+
+public:
+ virtual unsigned long GetID() {}
+ int IsBombHideRoom(unsigned int) {}
+ T2Terrorist(const T2Terrorist&) {}
+ T2Terrorist& operator=(const T2Terrorist&) {}
+};
diff --git a/src/T2DLL/T2ToolDef.cpp b/src/T2DLL/T2ToolDef.cpp
new file mode 100644
index 0000000..c57672f
--- /dev/null
+++ b/src/T2DLL/T2ToolDef.cpp
@@ -0,0 +1,166 @@
+#include "CFilePluginList.h"
+#include "CResFile.h"
+#include "CResourcePlugin.h"
+#include "T2AdvertisePlugin.h"
+#include "T2BitImage.h"
+#include "T2HaveOutViewObject.h"
+#include "T2ImageObj.h"
+#include "T2ToolDef.h"
+#include "T2ToolPlugin.h"
+#include "UT2Coordinate.h"
+
+T2ToolDef::T2ToolDef(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile, T2WorldDef* worldDef, T2ToolPlugin* plugin)
+ : T2TemplatePlugin(type, specifier, resFile, plugin)
+{
+ mToolIcon = new T2BitImage(mModuleHandle, 100, 1);
+ // TODO: this needs to come from T2WorldDef
+ mImageObj->AddObject(mModuleHandle, 100, mToolIcon);
+
+ mEC = new T2BitImage(mModuleHandle, 1000, 1);
+ mImageObj->AddObject(mModuleHandle, 1000, mEC);
+
+ m114 = NULL;
+ m118 = 0;
+
+ mSettlement = 0;
+ mCurBuildCount = 0;
+ mMaxBuildCount = 0;
+ mSubPluginList = NULL;
+
+ unsigned long tmp;
+
+ *resFile >> mToolType;
+ *resFile >> mWidth;
+ *resFile >> mHeight;
+ *resFile >> mLevel;
+ *resFile >> mAttribute;
+ *resFile >> mCategoryCommentString;
+ *resFile >> mCategoryName;
+ *resFile >> mCategoryNo;
+ *resFile >> mToolNo;
+ *resFile >> tmp; // mAfterCategoryNo
+ *resFile >> tmp; // mAfterToolNo
+ *resFile >> mSubPluginType;
+ *resFile >> tmp; // mCategoryIcon res ID
+ *resFile >> tmp; // mCategoryHelpResID
+ *resFile >> mValiationCount;
+
+ for (int i = 0; i < mValiationCount; i++) {
+ mPriceString[i] = new CString;
+ *resFile >> *mPriceString[i];
+ mOutMoneyString[i] = new CString;
+ *resFile >> *mOutMoneyString[i];
+ mCommentString[i] = new CString;
+ *resFile >> *mCommentString[i];
+ mToolName[i] = new CString;
+ *resFile >> *mToolName[i];
+ mName[i] = new CString;
+ *resFile >> *mName[i];
+
+ *resFile >> mPrice[i];
+ *resFile >> mOutMoney[i];
+ *resFile >> tmp; // id2
+ *resFile >> tmp; // offscreen res ID
+ *resFile >> tmp; // tool help res ID
+ *resFile >> mConsumptionPower[i];
+ }
+}
+
+/*virtual*/ T2ToolDef::~T2ToolDef() {
+ for (int i = 0; i < mValiationCount; i++) {
+ delete mPriceString[i];
+ delete mOutMoneyString[i];
+ delete mCommentString[i];
+ delete mToolName[i];
+ delete mName[i];
+ }
+
+ if (mToolIcon)
+ delete mToolIcon;
+ if (mEC)
+ delete mEC;
+ if (m114)
+ delete m114; // what type is this?
+ if (mSubPluginList)
+ delete mSubPluginList;
+}
+
+/*virtual*/ int T2ToolDef::GetSortKey() {
+ int key = mCategoryNo << 16;
+ key += mToolNo;
+ return key;
+}
+
+/*virtual*/ CURSORTYPE T2ToolDef::QueryCursor(T2TowerDoc*, POINT inPt, CString& outStr, RECT& outRect, POINT& outPt, int factor, unsigned int, int) {
+ outStr = "Csr";
+
+ inPt.x -= ((mWidth * UT2Coordinate::UnitHSize(factor)) / 2 - UT2Coordinate::UnitHSize(factor) / 2);
+ inPt.y -= ((mHeight * UT2Coordinate::UnitVSize(factor)) / 2 - UT2Coordinate::UnitVSize(factor) / 2);
+
+ UT2Coordinate::QDToUnit(inPt, factor);
+
+ SetRect(&outRect, inPt.x, inPt.y, inPt.x + mWidth, inPt.y + mHeight);
+ outPt.x = outRect.left;
+ outPt.y = outRect.top;
+ UT2Coordinate::UnitToQD(outRect, factor, 0);
+
+ return CursorType_0;
+}
+
+CString T2ToolDef::CalcSoundID(int id) const {
+ CString s;
+ s.Format("%d:%d", mToolType, id);
+ return s;
+}
+
+void T2ToolDef::GetName(CString& outStr, int id) {
+ outStr = *mName[id];
+}
+
+/*virtual*/ int T2ToolDef::CalcMentenanceCostProc(const T2HaveOutViewObject* obj) const {
+ int cost = 0;
+ T2ToolDef *objToolDef = obj->GetToolDef();
+ if (objToolDef->IsSetAttribute(0x100))
+ cost = GetOutMoney(obj->GetValiation());
+ return cost;
+}
+
+int T2ToolDef::GetOutMoney(unsigned int id) const {
+ int money = 0;
+ if (id < 4)
+ money = mOutMoney[id];
+ return money;
+}
+
+void T2ToolDef::SetOutMoney(unsigned int id, int money) {
+ if (id < 4)
+ mOutMoney[id] = money;
+}
+
+/*virtual*/ void T2ToolDef::Add(CResourcePlugin* plugin) {
+ DWORD type = GetSubPluginType();
+
+ if (plugin->GetType() == type) {
+ if (!mSubPluginList)
+ mSubPluginList = new CFilePluginList(type);
+
+ if (mSubPluginList)
+ mSubPluginList->Add(plugin);
+ }
+}
+
+/*virtual*/ void T2ToolDef::Add(T2AdvertisePlugin* plugin) {
+ DWORD type = GetSubPluginType();
+
+ if (plugin->GetSubType() == type) {
+ if (!mSubPluginList)
+ mSubPluginList = new CFilePluginList(type);
+
+ if (mSubPluginList)
+ mSubPluginList->Add(plugin);
+ }
+}
+
+/*virtual*/ PROCCODE T2ToolDef::DoDestructProc(T2TowerDoc*, T2HaveOutViewObject*, POINT, RECT&) {
+ return ProcCode_0;
+}
diff --git a/src/T2DLL/T2ToolDef.h b/src/T2DLL/T2ToolDef.h
new file mode 100644
index 0000000..f5cb467
--- /dev/null
+++ b/src/T2DLL/T2ToolDef.h
@@ -0,0 +1,96 @@
+#pragma once
+#include "common.h"
+#include "T2TemplatePlugin.h"
+
+class T2ToolDef : public T2TemplatePlugin {
+public:
+ T2ToolDef(DWORD type, T2PluginSpecifier& specifier, CResFile* resFile, T2WorldDef* worldDef, T2ToolPlugin* plugin);
+ virtual ~T2ToolDef();
+ virtual int GetSortKey();
+ virtual int IsMover() { return 0; }
+ virtual int IsTenant() { return 0; }
+ virtual int IsOutObj() { return 0; }
+ virtual int CalcPayment(T2TowerDoc*, RECT&, unsigned int id) {
+ return mPrice[id];
+ }
+ virtual int RequierToolIcon(T2ToolWindow*) {
+ return 0;
+ }
+ virtual CURSORTYPE QueryCursor(T2TowerDoc*, POINT, CString&, RECT&, POINT&, int, unsigned int, int);
+ virtual unsigned int IdleProc(T2HaveOutViewObject*, T2TowerDoc*) {
+ return 0;
+ }
+ virtual void DefIdleProc(T2TowerDoc*) {}
+ virtual void DrawProc(T2HaveOutViewObject*, const RECT&, T2TowerDoc*) const {}
+ virtual PROCCODE DoDestructProc(T2TowerDoc*, T2HaveOutViewObject*, POINT, RECT&);
+ virtual void DestructFinish(T2TowerDoc*, T2HaveOutViewObject*) {}
+ virtual int CalcMentenanceCostProc(const T2HaveOutViewObject*) const;
+ virtual void LoadExtraData(T2Archive&, T2TowerDoc*, T2HaveOutViewObject*) {}
+ virtual void SaveExtraData(T2Archive&, T2HaveOutViewObject*) {}
+ virtual void Add(T2AdvertisePlugin* plugin);
+ virtual void Add(CResourcePlugin* plugin);
+ virtual PROCCODE DrawHitMask(T2TowerDoc*, T2HaveOutViewObject*) {
+ return ProcCode_0;
+ }
+ virtual unsigned long OptionProc(unsigned long, void*) {
+ return 0;
+ }
+
+ CString CalcSoundID(int) const;
+ void GetName(CString& outStr, int id);
+ int GetOutMoney(unsigned int id) const;
+ void SetOutMoney(unsigned int id, int money);
+
+ int GetToolNo() const { return mToolNo; }
+ int GetCategory() const { return mCategoryNo; }
+ int GetToolType() const { return mToolType; }
+ int IsSetAttribute(unsigned int a) const { return (mAttribute & a) != 0; }
+ DWORD GetSubPluginType() const { return mSubPluginType; }
+ unsigned int GetAttribute() const { return mAttribute; }
+ T2BitImage* GetToolIcon() const { return mToolIcon; }
+ void GetToolName(CString& outStr, int id) const {
+ outStr = *mNames[id];
+ }
+ void GetCategoryName(CString outStr) const {
+ // BUG: outStr should be &
+ outStr = mCategoryName;
+ }
+ int GetConsumptionPower(unsigned int id) {
+ return mConsumptionPower[id];
+ }
+ int GetCurBuildCount() const { return mCurBuildCount; }
+ int GetMaxBuildCount() const { return mMaxBuildCount; }
+ int GetSettlement() const { return mSettlement; }
+ void DoStartUse() { mCurBuildCount++; }
+ void DoEndUse() { mCurBuildCount--; }
+ CFilePluginList* GetSubPluginList() { return mSubPluginList; }
+
+protected:
+ int mToolType;
+ int mWidth;
+ int mHeight;
+ int mLevel;
+ unsigned int mAttribute;
+ int mCategoryNo;
+ CString mCategoryName;
+ CString mCategoryCommentString;
+ int mToolNo;
+ int mValiationCount;
+ CString *mPriceString[4];
+ CString *mOutMoneyString[4];
+ CString *mCommentString[4];
+ int mOutMoney[4];
+ CString *mToolName[4];
+ CString *mName[4];
+ int mPrice[4];
+ T2BitImage *mToolIcon;
+ T2BitImage *mEC;
+ int mConsumptionPower[4];
+ int mCurBuildCount;
+ int mMaxBuildCount;
+ DWORD mSubPluginType;
+ CFilePluginList *mSubPluginList;
+ int mSettlement;
+ void *m114; // TODO what am i?
+ int m118;
+};
diff --git a/src/T2DLL/T2ToolDefList.cpp b/src/T2DLL/T2ToolDefList.cpp
new file mode 100644
index 0000000..ef41d49
--- /dev/null
+++ b/src/T2DLL/T2ToolDefList.cpp
@@ -0,0 +1,79 @@
+#include "T2ToolDefList.h"
+
+T2ToolDefDB::T2ToolDefDB(const T2ToolDefDB&) {
+}
+
+T2ToolDefDB& T2ToolDefDB::operator=(const T2ToolDefDB&) {
+}
+
+T2ToolDefDB::T2ToolDefDB() {
+}
+
+/*virtual*/ T2ToolDefDB::~T2ToolDefDB() {
+}
+
+void T2ToolDefDB::AllClear() {
+}
+
+void T2ToolDefDB::Regist(T2ToolDef*) {
+}
+
+void T2ToolDefDB::Add(T2ToolDefList*) {
+}
+
+T2ToolDefList* T2ToolDefDB::GetToolDefList(int) {
+}
+
+T2TenantDef* T2ToolDefDB::FindFloor() {
+}
+
+int T2ToolDefList::GetCategory() {
+}
+
+int T2ToolDefList::GetCurrentItem() {
+}
+
+void T2ToolDefList::SetCurrentItem(int) {
+}
+
+int T2ToolDefList::GetCurrentVariant() {
+}
+
+void T2ToolDefList::SetCurrentVariant(int) {
+}
+
+T2ToolDefList::T2ToolDefList(const T2ToolDefList&) {
+}
+
+T2ToolDefList& T2ToolDefList::operator=(const T2ToolDefList&) {
+}
+
+T2ToolDefList::T2ToolDefList(int) {
+}
+
+/*virtual*/ T2ToolDefList::~T2ToolDefList() {
+}
+
+void T2ToolDefList::AllClear() {
+}
+
+void T2ToolDefList::Regist(T2ToolDef*) {
+}
+
+void T2ToolDefList::Add(T2ToolDef*) {
+}
+
+unsigned int T2ToolDefList::GetItemCount() {
+}
+
+T2ToolDef* T2ToolDefList::GetItemAt(int) {
+}
+
+T2TenantDef* T2ToolDefList::FindFloor() {
+}
+
+T2TenantDef* T2ToolDefList::FindTenantDef(int) {
+}
+
+T2MoverDef* T2ToolDefList::FindMoverDef(int) {
+}
diff --git a/src/T2DLL/T2ToolDefList.h b/src/T2DLL/T2ToolDefList.h
new file mode 100644
index 0000000..ab9d885
--- /dev/null
+++ b/src/T2DLL/T2ToolDefList.h
@@ -0,0 +1,35 @@
+#pragma once
+#include "common.h"
+
+class T2ToolDefDB {
+public:
+ T2ToolDefDB(const T2ToolDefDB&);
+ T2ToolDefDB& operator=(const T2ToolDefDB&);
+ T2ToolDefDB();
+ virtual ~T2ToolDefDB();
+ void AllClear();
+ void Regist(T2ToolDef*);
+ void Add(T2ToolDefList*);
+ T2ToolDefList* GetToolDefList(int);
+ T2TenantDef* FindFloor();
+};
+class T2ToolDefList {
+public:
+ int GetCategory();
+ int GetCurrentItem();
+ void SetCurrentItem(int);
+ int GetCurrentVariant();
+ void SetCurrentVariant(int);
+ T2ToolDefList(const T2ToolDefList&);
+ T2ToolDefList& operator=(const T2ToolDefList&);
+ T2ToolDefList(int);
+ virtual ~T2ToolDefList();
+ void AllClear();
+ void Regist(T2ToolDef*);
+ void Add(T2ToolDef*);
+ unsigned int GetItemCount();
+ T2ToolDef* GetItemAt(int);
+ T2TenantDef* FindFloor();
+ T2TenantDef* FindTenantDef(int);
+ T2MoverDef* FindMoverDef(int);
+};
diff --git a/src/T2DLL/T2ToolHelpWnd.cpp b/src/T2DLL/T2ToolHelpWnd.cpp
new file mode 100644
index 0000000..f839139
--- /dev/null
+++ b/src/T2DLL/T2ToolHelpWnd.cpp
@@ -0,0 +1,43 @@
+#include "T2ToolHelpWnd.h"
+
+/*static*/ CObject* __stdcall T2ToolHelpWnd::CreateObject() {
+}
+
+/*static*/ CRuntimeClass* __stdcall T2ToolHelpWnd::_GetBaseClass() {
+}
+
+/*virtual*/ CRuntimeClass* T2ToolHelpWnd::GetRuntimeClass() const {
+}
+
+T2ToolHelpWnd::T2ToolHelpWnd() {
+}
+
+/*virtual*/ T2ToolHelpWnd::~T2ToolHelpWnd() {
+}
+
+/*static*/ const AFX_MSGMAP* __stdcall T2ToolHelpWnd::_GetBaseMessageMap() {
+}
+
+/*virtual*/ const AFX_MSGMAP* T2ToolHelpWnd::GetMessageMap() const {
+}
+
+void T2ToolHelpWnd::OpenToolHelp(POINT&, int, const char*, const char*, T2ToolDef*, int) {
+}
+
+void T2ToolHelpWnd::CloseToolHelp() {
+}
+
+int T2ToolHelpWnd::OnEraseBkgnd(CDC*) {
+}
+
+void T2ToolHelpWnd::OnDestroy() {
+}
+
+/*static*/ const CRuntimeClass T2ToolHelpWnd::classT2ToolHelpWnd {
+}
+
+/*static*/ const AFX_MSGMAP T2ToolHelpWnd::messageMap {
+}
+
+/*static*/ const AFX_MSGMAP_ENTRY* const T2ToolHelpWnd::_messageEntries {
+}
diff --git a/src/T2DLL/T2ToolHelpWnd.h b/src/T2DLL/T2ToolHelpWnd.h
new file mode 100644
index 0000000..13e95fa
--- /dev/null
+++ b/src/T2DLL/T2ToolHelpWnd.h
@@ -0,0 +1,28 @@
+#pragma once
+#include "common.h"
+
+class T2ToolHelpWnd {
+public:
+ static CObject* __stdcall CreateObject();
+protected:
+ static CRuntimeClass* __stdcall _GetBaseClass();
+public:
+ virtual CRuntimeClass* GetRuntimeClass() const;
+ T2ToolHelpWnd();
+ virtual ~T2ToolHelpWnd();
+protected:
+ static const AFX_MSGMAP* __stdcall _GetBaseMessageMap();
+ virtual const AFX_MSGMAP* GetMessageMap() const;
+public:
+ void OpenToolHelp(POINT&, int, const char*, const char*, T2ToolDef*, int);
+ void CloseToolHelp();
+protected:
+ int OnEraseBkgnd(CDC*);
+ void OnDestroy();
+public:
+ static const CRuntimeClass classT2ToolHelpWnd;
+protected:
+ static const AFX_MSGMAP messageMap;
+private:
+ static const AFX_MSGMAP_ENTRY* const _messageEntries;
+};
diff --git a/src/T2DLL/T2ToolPlugin.cpp b/src/T2DLL/T2ToolPlugin.cpp
new file mode 100644
index 0000000..db3d4e8
--- /dev/null
+++ b/src/T2DLL/T2ToolPlugin.cpp
@@ -0,0 +1,9 @@
+#include "T2ToolPlugin.h"
+
+T2ToolPlugin::T2ToolPlugin(DWORD type, T2PluginSpecifier& specifier)
+ : CProgramPlugin(type, specifier)
+{
+}
+
+/*virtual*/ T2ToolPlugin::~T2ToolPlugin() {
+}
diff --git a/src/T2DLL/T2ToolPlugin.h b/src/T2DLL/T2ToolPlugin.h
new file mode 100644
index 0000000..7689081
--- /dev/null
+++ b/src/T2DLL/T2ToolPlugin.h
@@ -0,0 +1,9 @@
+#pragma once
+#include "common.h"
+#include "CProgramPlugin.h"
+
+class T2ToolPlugin : public CProgramPlugin {
+public:
+ T2ToolPlugin(DWORD type, T2PluginSpecifier& specifier);
+ virtual ~T2ToolPlugin();
+};
diff --git a/src/T2DLL/T2ToolWindow.cpp b/src/T2DLL/T2ToolWindow.cpp
new file mode 100644
index 0000000..3601077
--- /dev/null
+++ b/src/T2DLL/T2ToolWindow.cpp
@@ -0,0 +1,190 @@
+#include "T2ToolWindow.h"
+
+/*static*/ CObject* __stdcall T2ToolWindow::CreateObject() {
+}
+
+/*static*/ CRuntimeClass* __stdcall T2ToolWindow::_GetBaseClass() {
+}
+
+/*virtual*/ CRuntimeClass* T2ToolWindow::GetRuntimeClass() const {
+}
+
+T2ToolWindow::T2ToolWindow() {
+}
+
+/*virtual*/ T2ToolWindow::~T2ToolWindow() {
+}
+
+/*virtual*/ void T2ToolWindow::SetDocument(T2TowerDoc*) {
+}
+
+/*static*/ const AFX_MSGMAP* __stdcall T2ToolWindow::_GetBaseMessageMap() {
+}
+
+/*virtual*/ const AFX_MSGMAP* T2ToolWindow::GetMessageMap() const {
+}
+
+int T2ToolWindow::OnQueryNewPalette() {
+}
+
+int T2ToolWindow::OnCreate(CREATESTRUCTA*) {
+}
+
+/*virtual*/ int T2ToolWindow::GetSel() {
+}
+
+/*virtual*/ void T2ToolWindow::SetSel(int) {
+}
+
+/*virtual*/ CString* T2ToolWindow::GetIconName(int) {
+}
+
+/*virtual*/ T2TemplatePlugin* T2ToolWindow::GetIconPlugin(int) {
+}
+
+/*virtual*/ unsigned long T2ToolWindow::GetIconOption(int) {
+}
+
+/*virtual*/ unsigned int T2ToolWindow::GetIconValiation(int) {
+}
+
+/*virtual*/ void T2ToolWindow::AddIcon(const char*, char*, unsigned int, unsigned long, T2ToolDef*, int, unsigned short, T2ToolCallback*) {
+}
+
+/*virtual*/ void T2ToolWindow::AddIcon(const char*, unsigned short, char*, T2ToolCallback*) {
+}
+
+/*virtual*/ void T2ToolWindow::RemoveIcon(const char*, unsigned int) {
+}
+
+/*virtual*/ void T2ToolWindow::RemoveAll() {
+}
+
+/*virtual*/ int T2ToolWindow::GetID(const char*, unsigned int) {
+}
+
+/*virtual*/ T2ToolIconItem* T2ToolWindow::GetItem(const char*, unsigned int) {
+}
+
+/*virtual*/ T2ToolIconItem* T2ToolWindow::GetItem(int) {
+}
+
+/*virtual*/ void T2ToolWindow::Refresh() {
+}
+
+/*virtual*/ int T2ToolWindow::RefreshItem(T2ToolIconItem*) {
+}
+
+/*virtual*/ T2TemplatePlugin* T2ToolWindow::SearchPlugin(T2TemplatePluginList*, CString&) {
+}
+
+/*virtual*/ POSITION T2ToolWindow::SearchID(int) {
+}
+
+/*virtual*/ int T2ToolWindow::AssignNewID() {
+}
+
+/*virtual*/ void T2ToolWindow::RemoveItem(POSITION) {
+}
+
+/*virtual*/ void T2ToolWindow::SelChange(int) {
+}
+
+/*virtual*/ int T2ToolWindow::EnableIcon(const char*, unsigned int, int) {
+}
+
+/*virtual*/ void T2ToolWindow::EnableIcon(int) {
+}
+
+/*virtual*/ T2ToolIconItem* T2ToolWindow::EnableIcon(unsigned short) {
+}
+
+/*virtual*/ void T2ToolWindow::RedrawButton() {
+}
+
+/*virtual*/ void T2ToolWindow::Updated() {
+}
+
+/*virtual*/ void T2ToolWindow::ListUpdated() {
+}
+
+void T2ToolWindow::StartTimer(unsigned int) {
+}
+
+void T2ToolWindow::StopTimer() {
+}
+
+int T2ToolWindow::OnEraseBkgnd(CDC*) {
+}
+
+void T2ToolWindow::OnLButtonDown(unsigned int, CPoint) {
+}
+
+void T2ToolWindow::OnLButtonUp(unsigned int, CPoint) {
+}
+
+void T2ToolWindow::OnMouseMove(unsigned int, CPoint) {
+}
+
+void T2ToolWindow::OnLButtonDblClk(unsigned int, CPoint) {
+}
+
+void T2ToolWindow::OnTimer(unsigned int) {
+}
+
+void T2ToolWindow::OnSize(unsigned int, int, int) {
+}
+
+void T2ToolWindow::OnDestroy() {
+}
+
+/*virtual*/ int T2ToolWindow::OnCreateProc(CREATESTRUCTA*) {
+}
+
+/*virtual*/ int T2ToolWindow::OnEraseBkgndProc(CDC*) {
+}
+
+/*virtual*/ void T2ToolWindow::OnLButtonDownProc(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2ToolWindow::OnLButtonUpProc(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2ToolWindow::OnMouseMoveProc(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2ToolWindow::OnLButtonDblClkProc(unsigned int, CPoint) {
+}
+
+/*virtual*/ void T2ToolWindow::OnTimerProc(unsigned int) {
+}
+
+/*virtual*/ void T2ToolWindow::OnSizeProc(unsigned int, int, int) {
+}
+
+void T2ToolWindow::OnClose() {
+}
+
+/*virtual*/ int T2ToolWindow::OnNotify(unsigned int, long, long*) {
+}
+
+/*static*/ const CRuntimeClass T2ToolWindow::classT2ToolWindow {
+}
+
+/*static*/ const AFX_MSGMAP T2ToolWindow::messageMap {
+}
+
+/*static*/ const AFX_MSGMAP_ENTRY* const T2ToolWindow::_messageEntries {
+}
+
+T2ToolIconItem::T2ToolIconItem() {
+}
+
+/*virtual*/ T2ToolIconItem::~T2ToolIconItem() {
+}
+
+T2ToolIconList::T2ToolIconList() {
+}
+
+/*virtual*/ T2ToolIconList::~T2ToolIconList() {
+}
diff --git a/src/T2DLL/T2ToolWindow.h b/src/T2DLL/T2ToolWindow.h
new file mode 100644
index 0000000..85c9bc8
--- /dev/null
+++ b/src/T2DLL/T2ToolWindow.h
@@ -0,0 +1,92 @@
+#pragma once
+#include "common.h"
+
+class T2ToolWindow {
+public:
+ static CObject* __stdcall CreateObject();
+protected:
+ static CRuntimeClass* __stdcall _GetBaseClass();
+public:
+ virtual CRuntimeClass* GetRuntimeClass() const;
+ T2ToolWindow();
+ virtual ~T2ToolWindow();
+ virtual void SetDocument(T2TowerDoc*);
+protected:
+ static const AFX_MSGMAP* __stdcall _GetBaseMessageMap();
+ virtual const AFX_MSGMAP* GetMessageMap() const;
+ int OnQueryNewPalette();
+ int OnCreate(CREATESTRUCTA*);
+public:
+ virtual int GetSel();
+ virtual void SetSel(int);
+ virtual CString* GetIconName(int);
+ virtual T2TemplatePlugin* GetIconPlugin(int);
+ virtual unsigned long GetIconOption(int);
+ virtual unsigned int GetIconValiation(int);
+ virtual void AddIcon(const char*, char*, unsigned int, unsigned long, T2ToolDef*, int, unsigned short, T2ToolCallback*);
+ virtual void AddIcon(const char*, unsigned short, char*, T2ToolCallback*);
+ virtual void RemoveIcon(const char*, unsigned int);
+ virtual void RemoveAll();
+ virtual int GetID(const char*, unsigned int);
+ virtual T2ToolIconItem* GetItem(const char*, unsigned int);
+ virtual T2ToolIconItem* GetItem(int);
+ virtual void Refresh();
+protected:
+ virtual int RefreshItem(T2ToolIconItem*);
+ virtual T2TemplatePlugin* SearchPlugin(T2TemplatePluginList*, CString&);
+ virtual POSITION SearchID(int);
+ virtual int AssignNewID();
+ virtual void RemoveItem(POSITION);
+ virtual void SelChange(int);
+public:
+ virtual int EnableIcon(const char*, unsigned int, int);
+ virtual void EnableIcon(int);
+ virtual T2ToolIconItem* EnableIcon(unsigned short);
+protected:
+ virtual void RedrawButton();
+ virtual void Updated();
+ virtual void ListUpdated();
+public:
+ void StartTimer(unsigned int);
+ void StopTimer();
+protected:
+ int OnEraseBkgnd(CDC*);
+ void OnLButtonDown(unsigned int, CPoint);
+ void OnLButtonUp(unsigned int, CPoint);
+ void OnMouseMove(unsigned int, CPoint);
+ void OnLButtonDblClk(unsigned int, CPoint);
+ void OnTimer(unsigned int);
+ void OnSize(unsigned int, int, int);
+ void OnDestroy();
+public:
+ virtual int OnCreateProc(CREATESTRUCTA*);
+ virtual int OnEraseBkgndProc(CDC*);
+ virtual void OnLButtonDownProc(unsigned int, CPoint);
+ virtual void OnLButtonUpProc(unsigned int, CPoint);
+ virtual void OnMouseMoveProc(unsigned int, CPoint);
+ virtual void OnLButtonDblClkProc(unsigned int, CPoint);
+ virtual void OnTimerProc(unsigned int);
+ virtual void OnSizeProc(unsigned int, int, int);
+protected:
+ void OnClose();
+ virtual int OnNotify(unsigned int, long, long*);
+public:
+ static const CRuntimeClass classT2ToolWindow;
+protected:
+ static const AFX_MSGMAP messageMap;
+private:
+ static const AFX_MSGMAP_ENTRY* const _messageEntries;
+};
+class T2ToolIconItem {
+public:
+ T2ToolIconItem();
+ virtual ~T2ToolIconItem();
+
+ T2ToolIconItem(const T2ToolIconItem&) {}
+ T2ToolIconItem& operator=(const T2ToolIconItem&) {}
+};
+class T2ToolIconList {
+public:
+ T2ToolIconList();
+ virtual ~T2ToolIconList();
+};
diff --git a/src/T2DLL/T2TowerEvent.cpp b/src/T2DLL/T2TowerEvent.cpp
new file mode 100644
index 0000000..57882f2
--- /dev/null
+++ b/src/T2DLL/T2TowerEvent.cpp
@@ -0,0 +1,79 @@
+#include "T2TowerEvent.h"
+
+T2TowerEvent::T2TowerEvent(T2WorldDef*) {
+}
+
+T2TowerEvent::~T2TowerEvent() {
+}
+
+void T2TowerEvent::InitTowerEvent(T2TowerDoc*) {
+}
+
+T2FireBurning* T2TowerEvent::GetFireBurning() {
+}
+
+T2MetroRailway* T2TowerEvent::GetMetroRailway() {
+}
+
+T2BlackOut* T2TowerEvent::GetBlackOut() {
+}
+
+T2TowerVision* T2TowerEvent::GetTowerVision() {
+}
+
+T2Transport* T2TowerEvent::GetCruise() {
+}
+
+int T2TowerEvent::IsBlackOut() {
+}
+
+void T2TowerEvent::SetLatestBuild(T2Equip*, T2ToolDef*, int) {
+}
+
+T2Equip* T2TowerEvent::GetLatestBuild() {
+}
+
+void T2TowerEvent::AppendStandby(T2EventItem*) {
+}
+
+void T2TowerEvent::InsertExecute(T2EventItem*) {
+}
+
+void T2TowerEvent::MakeTowerVisionEvent(T2OutObj*) {
+}
+
+void T2TowerEvent::KillTowerVisionEvent() {
+}
+
+T2EventItem* T2TowerEvent::MakeXEvent(unsigned long) {
+}
+
+void T2TowerEvent::KillXEvent(unsigned long) {
+}
+
+T2EventItem* T2TowerEvent::GetEvent(unsigned long) {
+}
+
+unsigned int T2TowerEvent::GetXEvent(unsigned long) {
+}
+
+void T2TowerEvent::StopEvent() {
+}
+
+int T2TowerEvent::Idle(T2TowerDoc*) {
+}
+
+void T2TowerEvent::StoreWaitSequence(T2EventItem*) {
+}
+
+void T2TowerEvent::Write(T2Archive&) {
+}
+
+void T2TowerEvent::Read(T2Archive&) {
+}
+
+void T2TowerEvent::DrawRubble(T2TowerDoc*, T2Tenant*) {
+}
+
+void T2TowerEvent::ViewModeChanged(T2TowerDoc*, VIEWMODE) {
+}
diff --git a/src/T2DLL/T2TowerEvent.h b/src/T2DLL/T2TowerEvent.h
new file mode 100644
index 0000000..f31c0a8
--- /dev/null
+++ b/src/T2DLL/T2TowerEvent.h
@@ -0,0 +1,35 @@
+#pragma once
+#include "common.h"
+
+class T2TowerEvent {
+public:
+ T2TowerEvent(T2WorldDef*);
+ ~T2TowerEvent();
+ void InitTowerEvent(T2TowerDoc*);
+ T2FireBurning* GetFireBurning();
+ T2MetroRailway* GetMetroRailway();
+ T2BlackOut* GetBlackOut();
+ T2TowerVision* GetTowerVision();
+ T2Transport* GetCruise();
+ int IsBlackOut();
+ void SetLatestBuild(T2Equip*, T2ToolDef*, int);
+ T2Equip* GetLatestBuild();
+ void AppendStandby(T2EventItem*);
+ void InsertExecute(T2EventItem*);
+ void MakeTowerVisionEvent(T2OutObj*);
+ void KillTowerVisionEvent();
+ T2EventItem* MakeXEvent(unsigned long);
+ void KillXEvent(unsigned long);
+ T2EventItem* GetEvent(unsigned long);
+ unsigned int GetXEvent(unsigned long);
+ void StopEvent();
+ int Idle(T2TowerDoc*);
+ void StoreWaitSequence(T2EventItem*);
+ void Write(T2Archive&);
+ void Read(T2Archive&);
+ void DrawRubble(T2TowerDoc*, T2Tenant*);
+ void ViewModeChanged(T2TowerDoc*, VIEWMODE);
+
+ T2TowerEvent(const T2TowerEvent&) {}
+ T2TowerEvent& operator=(const T2TowerEvent&) {}
+};
diff --git a/src/T2DLL/T2TowerMessage.cpp b/src/T2DLL/T2TowerMessage.cpp
new file mode 100644
index 0000000..32b7815
--- /dev/null
+++ b/src/T2DLL/T2TowerMessage.cpp
@@ -0,0 +1,61 @@
+#include "T2TowerMessage.h"
+
+T2TowerMessage::T2TowerMessage(HINSTANCE, T2TowerDoc*) {
+}
+
+/*virtual*/ T2TowerMessage::~T2TowerMessage() {
+}
+
+void T2TowerMessage::InfoBarMessage(const CString&, int, const char*) {
+}
+
+void T2TowerMessage::SetInfoBarMsg(InfoBarMsgItem*) {
+}
+
+void T2TowerMessage::EquipBalloonMessage(const CString&, T2Equip*) {
+}
+
+void T2TowerMessage::PeopleBalloonMessage(const CString&, T2People*) {
+}
+
+void T2TowerMessage::EquipBalloonMessage(const CString&, POINT) {
+}
+
+void T2TowerMessage::BuildErr(const CString&) {
+}
+
+void T2TowerMessage::BuildErr(unsigned int, T2EquipDef*) {
+}
+
+int T2TowerMessage::GetBuildErrString(unsigned int, CString&) {
+}
+
+void T2TowerMessage::ObjectBalloonMessage(const CString&, const RECT&) {
+}
+
+void T2TowerMessage::InfoDialogMessage(const CString&, int, int) {
+}
+
+void T2TowerMessage::AleatMessage(const CString&, int) {
+}
+
+void T2TowerMessage::SpendTime() {
+}
+
+void T2TowerMessage::SpendTime2() {
+}
+
+/*virtual*/ void T2TowerMessage::ExecuteSelf(unsigned int, void*) {
+}
+
+CWnd* T2TowerMessage::FindFloatingWindow(int) {
+}
+
+void T2TowerMessage::CancelInfoBarMessage(const CString&) {
+}
+
+void T2TowerMessage::PassiveInfoBarMessage(const char*, int, const char*) {
+}
+
+void T2TowerMessage::SetCaptureRect(RECT) {
+}
diff --git a/src/T2DLL/T2TowerMessage.h b/src/T2DLL/T2TowerMessage.h
new file mode 100644
index 0000000..5dca2c6
--- /dev/null
+++ b/src/T2DLL/T2TowerMessage.h
@@ -0,0 +1,33 @@
+#pragma once
+#include "common.h"
+
+class T2TowerMessage {
+public:
+ T2TowerMessage(HINSTANCE, T2TowerDoc*);
+ virtual ~T2TowerMessage();
+ void InfoBarMessage(const CString&, int, const char*);
+private:
+ void SetInfoBarMsg(InfoBarMsgItem*);
+public:
+ void EquipBalloonMessage(const CString&, T2Equip*);
+ void PeopleBalloonMessage(const CString&, T2People*);
+ void EquipBalloonMessage(const CString&, POINT);
+ void BuildErr(const CString&);
+ void BuildErr(unsigned int, T2EquipDef*);
+ int GetBuildErrString(unsigned int, CString&);
+ void ObjectBalloonMessage(const CString&, const RECT&);
+ void InfoDialogMessage(const CString&, int, int);
+ void AleatMessage(const CString&, int);
+ void SpendTime();
+ void SpendTime2();
+ virtual void ExecuteSelf(unsigned int, void*);
+private:
+ CWnd* FindFloatingWindow(int);
+public:
+ void CancelInfoBarMessage(const CString&);
+ void PassiveInfoBarMessage(const char*, int, const char*);
+ void SetCaptureRect(RECT);
+
+ T2TowerMessage(const T2TowerMessage&) {}
+ T2TowerMessage& operator=(const T2TowerMessage&) {}
+};
diff --git a/src/T2DLL/T2TowerVision.cpp b/src/T2DLL/T2TowerVision.cpp
new file mode 100644
index 0000000..4838242
--- /dev/null
+++ b/src/T2DLL/T2TowerVision.cpp
@@ -0,0 +1,16 @@
+#include "T2TowerVision.h"
+
+T2TowerVision::T2TowerVision(T2TowerEvent*, int, int, int, int, int, int, T2OutObj*) {
+}
+
+/*virtual*/ T2TowerVision::~T2TowerVision() {
+}
+
+/*virtual*/ int T2TowerVision::Exec(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2TowerVision::StopEvent(T2TowerDoc*) {
+}
+
+int T2TowerVision::PrepareMovie(T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2TowerVision.h b/src/T2DLL/T2TowerVision.h
new file mode 100644
index 0000000..c07bc74
--- /dev/null
+++ b/src/T2DLL/T2TowerVision.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class T2TowerVision {
+public:
+ T2TowerVision(T2TowerEvent*, int, int, int, int, int, int, T2OutObj*);
+ virtual ~T2TowerVision();
+ virtual int Exec(T2TowerDoc*);
+ virtual void StopEvent(T2TowerDoc*);
+ int PrepareMovie(T2TowerDoc*);
+
+ virtual unsigned long GetID() {}
+ T2TowerVision(const T2TowerVision&) {}
+ T2TowerVision& operator=(const T2TowerVision&) {}
+};
diff --git a/src/T2DLL/T2TrafficInfo.cpp b/src/T2DLL/T2TrafficInfo.cpp
new file mode 100644
index 0000000..6390c51
--- /dev/null
+++ b/src/T2DLL/T2TrafficInfo.cpp
@@ -0,0 +1,34 @@
+#include "T2TrafficInfo.h"
+
+T2TrafficInfo::T2TrafficInfo(RECT, unsigned int, unsigned int, unsigned int, unsigned int) {
+}
+
+/*virtual*/ T2TrafficInfo::~T2TrafficInfo() {
+}
+
+void T2TrafficInfo::Pass(POINT, POINT, short) {
+}
+
+void T2TrafficInfo::HourChanged(T2TowerDoc*) {
+}
+
+unsigned int T2TrafficInfo::CalcRange(unsigned int) const {
+}
+
+void T2TrafficInfo::CalcUnitArea(unsigned int, RECT&) const {
+}
+
+short T2TrafficInfo::GetRange(POINT) const {
+}
+
+T2TrafficUnit* T2TrafficInfo::GetUnit(POINT) const {
+}
+
+int T2TrafficInfo::CalcUnitIndex(POINT) const {
+}
+
+void T2TrafficInfo::Read(T2Archive&) {
+}
+
+void T2TrafficInfo::Write(T2Archive&) const {
+}
diff --git a/src/T2DLL/T2TrafficInfo.h b/src/T2DLL/T2TrafficInfo.h
new file mode 100644
index 0000000..751f56d
--- /dev/null
+++ b/src/T2DLL/T2TrafficInfo.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "common.h"
+
+class T2TrafficInfo {
+public:
+ T2TrafficInfo(RECT, unsigned int, unsigned int, unsigned int, unsigned int);
+ virtual ~T2TrafficInfo();
+ void Pass(POINT, POINT, short);
+ void HourChanged(T2TowerDoc*);
+protected:
+ unsigned int CalcRange(unsigned int) const;
+ void CalcUnitArea(unsigned int, RECT&) const;
+public:
+ short GetRange(POINT) const;
+protected:
+ T2TrafficUnit* GetUnit(POINT) const;
+ int CalcUnitIndex(POINT) const;
+public:
+ void Read(T2Archive&);
+ void Write(T2Archive&) const;
+
+ T2TrafficInfo(const T2TrafficInfo&) {}
+ T2TrafficInfo& operator=(const T2TrafficInfo&) {}
+};
diff --git a/src/T2DLL/T2Transport.cpp b/src/T2DLL/T2Transport.cpp
new file mode 100644
index 0000000..176c1d7
--- /dev/null
+++ b/src/T2DLL/T2Transport.cpp
@@ -0,0 +1,70 @@
+#include "T2Transport.h"
+
+T2Transport::T2Transport() {
+}
+
+/*virtual*/ T2Transport::~T2Transport() {
+}
+
+void T2Transport::Initialize() {
+}
+
+void T2Transport::Init(T2Transport*, CResFile*) {
+}
+
+void T2Transport::Init(T2Transport*, int) {
+}
+
+void T2Transport::AddTransport(T2Transport*) {
+}
+
+int T2Transport::GetNofTimeTable() {
+}
+
+void T2Transport::SetStation(unsigned int) {
+}
+
+void T2Transport::UpGrade(int) {
+}
+
+int T2Transport::GetTrainType(int) const {
+}
+
+unsigned int T2Transport::GetArriveTime(int) const {
+}
+
+T2Transport* T2Transport::GetStoppage() const {
+}
+
+int T2Transport::WasStoppage() const {
+}
+
+int T2Transport::ChkStoppage() const {
+}
+
+T2Transport* T2Transport::GetIndObject(int) const {
+}
+
+T2Transport* T2Transport::GetAvailable(T2DateTime*) const {
+}
+
+int T2Transport::IsAvailable(T2DateTime*) {
+}
+
+int T2Transport::Enter(CLink*) {
+}
+
+int T2Transport::Leave(CLink*) {
+}
+
+CLink* T2Transport::LeaveFirst() {
+}
+
+/*virtual*/ int T2Transport::Stop(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2Transport::Read(T2Archive&) {
+}
+
+/*virtual*/ void T2Transport::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2Transport.h b/src/T2DLL/T2Transport.h
new file mode 100644
index 0000000..4fc0443
--- /dev/null
+++ b/src/T2DLL/T2Transport.h
@@ -0,0 +1,39 @@
+#pragma once
+#include "common.h"
+
+class T2Transport {
+public:
+ T2Transport();
+ virtual ~T2Transport();
+private:
+ void Initialize();
+public:
+ void Init(T2Transport*, CResFile*);
+ void Init(T2Transport*, int);
+ void AddTransport(T2Transport*);
+ int GetNofTimeTable();
+ void SetStation(unsigned int);
+ void UpGrade(int);
+ int GetTrainType(int) const;
+ unsigned int GetArriveTime(int) const;
+ T2Transport* GetStoppage() const;
+ int WasStoppage() const;
+protected:
+ int ChkStoppage() const;
+ T2Transport* GetIndObject(int) const;
+public:
+ T2Transport* GetAvailable(T2DateTime*) const;
+protected:
+ int IsAvailable(T2DateTime*);
+public:
+ int Enter(CLink*);
+ int Leave(CLink*);
+ CLink* LeaveFirst();
+ virtual int Stop(T2TowerDoc*);
+ virtual void Read(T2Archive&);
+ virtual void Write(T2Archive&);
+
+ int IsFull() const {}
+ T2Transport(const T2Transport&) {}
+ T2Transport& operator=(const T2Transport&) {}
+};
diff --git a/src/T2DLL/T2TreasureDialog.cpp b/src/T2DLL/T2TreasureDialog.cpp
new file mode 100644
index 0000000..19ddddc
--- /dev/null
+++ b/src/T2DLL/T2TreasureDialog.cpp
@@ -0,0 +1,28 @@
+#include "T2TreasureDialog.h"
+
+T2TreasureDialog::T2TreasureDialog() {
+}
+
+/*virtual*/ T2TreasureDialog::~T2TreasureDialog() {
+}
+
+/*virtual*/ void T2TreasureDialog::OnT2Create() {
+}
+
+/*virtual*/ void T2TreasureDialog::CreateDlgItem(CTokenizer&, T2Dialog::T2DialogDef&) {
+}
+
+/*virtual*/ void T2TreasureDialog::OnT2Destroy() {
+}
+
+/*virtual*/ void T2TreasureDialog::ShowSelf() {
+}
+
+/*virtual*/ void T2TreasureDialog::HideSelf() {
+}
+
+/*static*/ void T2TreasureDialog::ShowTreasureDialog(T2TowerDoc*, T2TreasureStatus*) {
+}
+
+void T2TreasureDialog::SetTreasureInfo(T2TowerDoc*, T2TreasureStatus*) {
+}
diff --git a/src/T2DLL/T2TreasureDialog.h b/src/T2DLL/T2TreasureDialog.h
new file mode 100644
index 0000000..8156f23
--- /dev/null
+++ b/src/T2DLL/T2TreasureDialog.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class T2TreasureDialog {
+public:
+ T2TreasureDialog();
+ virtual ~T2TreasureDialog();
+protected:
+ virtual void OnT2Create();
+ virtual void CreateDlgItem(CTokenizer&, T2Dialog::T2DialogDef&);
+ virtual void OnT2Destroy();
+ virtual void ShowSelf();
+ virtual void HideSelf();
+public:
+ static void ShowTreasureDialog(T2TowerDoc*, T2TreasureStatus*);
+ void SetTreasureInfo(T2TowerDoc*, T2TreasureStatus*);
+};
diff --git a/src/T2DLL/T2TreasurePane.cpp b/src/T2DLL/T2TreasurePane.cpp
new file mode 100644
index 0000000..a6ed42c
--- /dev/null
+++ b/src/T2DLL/T2TreasurePane.cpp
@@ -0,0 +1,22 @@
+#include "T2TreasurePane.h"
+
+T2TreasurePane::T2TreasurePane(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+/*virtual*/ T2TreasurePane::~T2TreasurePane() {
+}
+
+void T2TreasurePane::SetAnimPics(T2TowerDoc*, int, int) {
+}
+
+/*virtual*/ void T2TreasurePane::DrawSelf(CDC*) {
+}
+
+/*virtual*/ void T2TreasurePane::SpendTime() {
+}
+
+/*virtual*/ int T2TreasurePane::OnT2DlgItemEraseBkgnd(CDC*) {
+}
+
+/*virtual*/ int T2TreasurePane::OnCreate(CREATESTRUCTA*) {
+}
diff --git a/src/T2DLL/T2TreasurePane.h b/src/T2DLL/T2TreasurePane.h
new file mode 100644
index 0000000..327a3e2
--- /dev/null
+++ b/src/T2DLL/T2TreasurePane.h
@@ -0,0 +1,14 @@
+#pragma once
+#include "common.h"
+
+class T2TreasurePane {
+public:
+ T2TreasurePane(T2TowerDoc*, T2ImageObj*, CPalette*);
+ virtual ~T2TreasurePane();
+ void SetAnimPics(T2TowerDoc*, int, int);
+ virtual void DrawSelf(CDC*);
+ virtual void SpendTime();
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+ virtual int OnCreate(CREATESTRUCTA*);
+};
diff --git a/src/T2DLL/T2UnitInfo.cpp b/src/T2DLL/T2UnitInfo.cpp
new file mode 100644
index 0000000..15660b5
--- /dev/null
+++ b/src/T2DLL/T2UnitInfo.cpp
@@ -0,0 +1,40 @@
+#include "T2UnitInfo.h"
+
+T2UnitInfo::T2UnitInfo() {
+}
+
+T2UnitInfo::~T2UnitInfo() {
+}
+
+int T2UnitInfo::IsBuildable() {
+}
+
+int T2UnitInfo::IsMoverID(unsigned int) {
+}
+
+int T2UnitInfo::IsRequestID(unsigned int) {
+}
+
+unsigned int T2UnitInfo::GetTenantID() {
+}
+
+unsigned int T2UnitInfo::GetMoverID() {
+}
+
+unsigned int T2UnitInfo::GetRequestID() {
+}
+
+void T2UnitInfo::FillTenantID(unsigned int) {
+}
+
+void T2UnitInfo::FillMoverID(unsigned int) {
+}
+
+void T2UnitInfo::InitMask(CResFile&) {
+}
+
+void T2UnitInfo::Read(T2Archive&, T2TowerDoc*) {
+}
+
+void T2UnitInfo::Write(T2Archive&) {
+}
diff --git a/src/T2DLL/T2UnitInfo.h b/src/T2DLL/T2UnitInfo.h
new file mode 100644
index 0000000..2c0835e
--- /dev/null
+++ b/src/T2DLL/T2UnitInfo.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class T2UnitInfo {
+public:
+ T2UnitInfo();
+ ~T2UnitInfo();
+ int IsBuildable();
+ int IsMoverID(unsigned int);
+ int IsRequestID(unsigned int);
+ unsigned int GetTenantID();
+ unsigned int GetMoverID();
+ unsigned int GetRequestID();
+ void FillTenantID(unsigned int);
+ void FillMoverID(unsigned int);
+ void InitMask(CResFile&);
+ void Read(T2Archive&, T2TowerDoc*);
+ void Write(T2Archive&);
+
+ T2UnitInfo& operator=(const T2UnitInfo&) {}
+};
diff --git a/src/T2DLL/T2VerticalTable.cpp b/src/T2DLL/T2VerticalTable.cpp
new file mode 100644
index 0000000..dcd2a6e
--- /dev/null
+++ b/src/T2DLL/T2VerticalTable.cpp
@@ -0,0 +1,10 @@
+#include "T2VerticalTable.h"
+
+T2VerticalTable::T2VerticalTable(T2TowerDoc*, T2ImageObj*, CPalette*) {
+}
+
+void T2VerticalTable::Clear() {
+}
+
+/*virtual*/ int T2VerticalTable::OnT2DlgItemEraseBkgnd(CDC*) {
+}
diff --git a/src/T2DLL/T2VerticalTable.h b/src/T2DLL/T2VerticalTable.h
new file mode 100644
index 0000000..f160e59
--- /dev/null
+++ b/src/T2DLL/T2VerticalTable.h
@@ -0,0 +1,13 @@
+#pragma once
+#include "common.h"
+
+class T2VerticalTable {
+public:
+ T2VerticalTable(T2TowerDoc*, T2ImageObj*, CPalette*);
+ void Clear();
+protected:
+ virtual int OnT2DlgItemEraseBkgnd(CDC*);
+
+public:
+ virtual ~T2VerticalTable() {}
+};
diff --git a/src/T2DLL/T2VisitVIP.cpp b/src/T2DLL/T2VisitVIP.cpp
new file mode 100644
index 0000000..9ed1e0f
--- /dev/null
+++ b/src/T2DLL/T2VisitVIP.cpp
@@ -0,0 +1,37 @@
+#include "T2VisitVIP.h"
+
+T2VisitVIP::T2VisitVIP(T2TowerEvent*, CResFile*, int) {
+}
+
+T2VisitVIP::T2VisitVIP(T2TowerEvent*, int, int, int, int, int, int) {
+}
+
+/*virtual*/ T2VisitVIP::~T2VisitVIP() {
+}
+
+/*virtual*/ int T2VisitVIP::IsBeginDay(int) {
+}
+
+/*virtual*/ int T2VisitVIP::IsBeginTime(unsigned int) {
+}
+
+/*virtual*/ int T2VisitVIP::Start(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2VisitVIP::Exec(T2TowerDoc*) {
+}
+
+void T2VisitVIP::Init(CResFile*) {
+}
+
+int T2VisitVIP::DoReception(T2TowerDoc*) {
+}
+
+int T2VisitVIP::GetDestinationTennant(unsigned long, T2Tenant*&, CFilePlugin*&, T2PluginSpecifier*&) {
+}
+
+/*virtual*/ void T2VisitVIP::Write(T2Archive&) {
+}
+
+/*virtual*/ void T2VisitVIP::Read(T2Archive&) {
+}
diff --git a/src/T2DLL/T2VisitVIP.h b/src/T2DLL/T2VisitVIP.h
new file mode 100644
index 0000000..0d97c07
--- /dev/null
+++ b/src/T2DLL/T2VisitVIP.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "common.h"
+
+class T2VisitVIP {
+public:
+ T2VisitVIP(T2TowerEvent*, CResFile*, int);
+ T2VisitVIP(T2TowerEvent*, int, int, int, int, int, int);
+ virtual ~T2VisitVIP();
+ virtual int IsBeginDay(int);
+ virtual int IsBeginTime(unsigned int);
+ virtual int Start(T2TowerDoc*);
+ virtual int Exec(T2TowerDoc*);
+ void Init(CResFile*);
+ int DoReception(T2TowerDoc*);
+ int GetDestinationTennant(unsigned long, T2Tenant*&, CFilePlugin*&, T2PluginSpecifier*&);
+ virtual void Write(T2Archive&);
+ virtual void Read(T2Archive&);
+
+ virtual unsigned long GetID() {}
+ T2VisitVIP(const T2VisitVIP&) {}
+ T2VisitVIP& operator=(const T2VisitVIP&) {}
+};
diff --git a/src/T2DLL/T2WeatherFilter.cpp b/src/T2DLL/T2WeatherFilter.cpp
new file mode 100644
index 0000000..a65d3ce
--- /dev/null
+++ b/src/T2DLL/T2WeatherFilter.cpp
@@ -0,0 +1,146 @@
+#include "T2WeatherFilter.h"
+
+T2WeatherFilter::T2WeatherFilter() {
+ mCurrentWeather = WeatherCode_0;
+ mPhase = 2;
+ SetWeather(WeatherCode_0);
+}
+
+T2WeatherFilter::~T2WeatherFilter() {
+}
+
+void T2WeatherFilter::SetWeather(WeatherCode weather) {
+ mLastChange = GetTickCount();
+ mTimeSinceLastChange = mLastChange;
+ mNextWeather = weather;
+ mLightningTime = -1;
+}
+
+void T2WeatherFilter::ColorFilter(RGBQUAD* rgb) {
+ if (mCurrentWeather == WeatherCode_1)
+ RainyFilter(mTimeSinceLastChange, rgb);
+ else if (mCurrentWeather == WeatherCode_2)
+ SnowyFilter(mTimeSinceLastChange, rgb);
+ else
+ ClearFilter(mTimeSinceLastChange, rgb);
+}
+
+void T2WeatherFilter::ClearFilter(unsigned long time, RGBQUAD* rgb) {
+}
+
+void T2WeatherFilter::RainyFilter(unsigned long time, RGBQUAD* rgb) {
+ if (mLightningTime <= time && time <= (mLightningTime + 200)) {
+ RGBQUAD c;
+ c.rgbRed = 240;
+ c.rgbGreen = 240;
+ c.rgbBlue = 128;
+ ColorBlend(40, rgb, &c);
+ } else {
+ RGBQUAD c;
+ c.rgbRed = (rgb->rgbRed * 500) / 1000;
+ c.rgbGreen = (rgb->rgbGreen * 500) / 1000;
+ c.rgbBlue = (rgb->rgbBlue * 600) / 1000;
+ ColorFade(time, rgb, &c);
+ }
+}
+
+void T2WeatherFilter::SnowyFilter(unsigned long time, RGBQUAD* rgb) {
+ RGBQUAD c;
+ c.rgbRed = ((rgb->rgbRed + ((255 - rgb->rgbRed) * 500) / 1000) * 800) / 1000;
+ c.rgbGreen = ((rgb->rgbGreen + ((255 - rgb->rgbGreen) * 500) / 1000) * 800) / 1000;
+ c.rgbBlue = ((rgb->rgbBlue + ((255 - rgb->rgbBlue) * 500) / 1000) * 800) / 1000;
+ ColorFade(time, rgb, &c);
+}
+
+void T2WeatherFilter::ColorFade(unsigned long time, RGBQUAD* a, RGBQUAD* b) {
+ if ((mPhase == 1) && (time <= 2500)) {
+ a->rgbRed = (a->rgbRed * (2500 - time) + b->rgbRed * time) / 2500;
+ a->rgbGreen = (a->rgbGreen * (2500 - time) + b->rgbGreen * time) / 2500;
+ a->rgbBlue = (a->rgbBlue * (2500 - time) + b->rgbBlue * time) / 2500;
+ } else if ((mPhase == 3) && (time <= 2500)) {
+ a->rgbRed = (b->rgbRed * (2500 - time) + a->rgbRed * time) / 2500;
+ a->rgbGreen = (b->rgbGreen * (2500 - time) + a->rgbGreen * time) / 2500;
+ a->rgbBlue = (b->rgbBlue * (2500 - time) + a->rgbBlue * time) / 2500;
+ } else {
+ *a = *b;
+ }
+}
+
+void T2WeatherFilter::SkyColorFilter(RGBQUAD* rgb) {
+ if (mCurrentWeather == WeatherCode_1)
+ RainySkyFilter(mTimeSinceLastChange, rgb);
+ else if (mCurrentWeather == WeatherCode_2)
+ SnowySkyFilter(mTimeSinceLastChange, rgb);
+ else
+ ClearSkyFilter(mTimeSinceLastChange, rgb);
+}
+
+void T2WeatherFilter::ClearSkyFilter(unsigned long time, RGBQUAD* rgb) {
+}
+
+void T2WeatherFilter::RainySkyFilter(unsigned long time, RGBQUAD* rgb) {
+ if (time >= 1800 && time <= 1900) {
+ RGBQUAD c;
+ c.rgbRed = 240;
+ c.rgbGreen = 240;
+ c.rgbBlue = 128;
+ ColorBlend(15, rgb, &c);
+
+ mLightningTime = rand() % 15000 + 8000;
+ } else if (mLightningTime <= time && time <= (mLightningTime + 200)) {
+ RGBQUAD c;
+ c.rgbRed = 240;
+ c.rgbGreen = 240;
+ c.rgbBlue = 128;
+ ColorBlend(30, rgb, &c);
+
+ mLightningTime += rand() % 15000 + 8000;
+ } else {
+ int x = ((rgb->rgbRed * 33) + (rgb->rgbGreen * 42) + (rgb->rgbBlue * 25)) / 100;
+ RGBQUAD c;
+ c.rgbRed = (x * 128) / 255;
+ c.rgbGreen = (x * 128) / 255;
+ c.rgbBlue = (x * 140) / 255;
+ ColorFade(time, rgb, &c);
+ }
+}
+
+void T2WeatherFilter::SnowySkyFilter(unsigned long time, RGBQUAD* rgb) {
+ int z = ((rgb->rgbRed * 33) + (rgb->rgbGreen * 42) + (rgb->rgbBlue * 25)) / 100;
+ int r = (((z * 180) / 255) & 255) + 80;
+ int g = (((z * 180) / 255) & 255) + 80;
+ int b = (((z * 180) / 255) & 255) + 80;
+
+ RGBQUAD c;
+ c.rgbRed = (r <= 255) ? r : 255;
+ c.rgbGreen = (g <= 255) ? g : 255;
+ c.rgbBlue = (b <= 255) ? b : 255;
+
+ ColorFade(time, rgb, &c);
+}
+
+void T2WeatherFilter::ColorBlend(int factor, RGBQUAD* a, RGBQUAD* b) {
+ a->rgbRed = (a->rgbRed * (100 - factor) + b->rgbRed * factor) / 100;
+ a->rgbGreen = (a->rgbGreen * (100 - factor) + b->rgbGreen * factor) / 100;
+ a->rgbBlue = (a->rgbBlue * (100 - factor) + b->rgbBlue * factor) / 100;
+}
+
+void T2WeatherFilter::Tick() {
+ mTimeSinceLastChange = GetTickCount() - mLastChange;
+
+ if ((mPhase == 2) && (mCurrentWeather != mNextWeather)) {
+ mPhase = 3;
+ mLastChange = GetTickCount();
+ }
+
+ if ((mPhase == 1) && ((mTimeSinceLastChange >= 2500) || (mCurrentWeather == WeatherCode_0))) {
+ mPhase = 2;
+ mLastChange = GetTickCount();
+ }
+
+ if ((mPhase == 3) && ((mTimeSinceLastChange >= 2500) || (mCurrentWeather == WeatherCode_0))) {
+ mPhase = 1;
+ mCurrentWeather = mNextWeather;
+ mLastChange = GetTickCount();
+ }
+}
diff --git a/src/T2DLL/T2WeatherFilter.h b/src/T2DLL/T2WeatherFilter.h
new file mode 100644
index 0000000..257cd2b
--- /dev/null
+++ b/src/T2DLL/T2WeatherFilter.h
@@ -0,0 +1,37 @@
+#pragma once
+#include "common.h"
+
+enum WeatherCode {
+ WeatherCode_0,
+ WeatherCode_1,
+ WeatherCode_2,
+ WeatherCode_3
+};
+
+class DLL_EXPORT T2WeatherFilter {
+public:
+ T2WeatherFilter();
+ ~T2WeatherFilter();
+
+ void SetWeather(WeatherCode weather);
+ void ColorFilter(RGBQUAD*);
+ void SkyColorFilter(RGBQUAD*);
+ void Tick();
+
+protected:
+ void ClearFilter(unsigned long, RGBQUAD*);
+ void RainyFilter(unsigned long, RGBQUAD*);
+ void SnowyFilter(unsigned long, RGBQUAD*);
+ void ColorFade(unsigned long, RGBQUAD*, RGBQUAD*);
+ void ClearSkyFilter(unsigned long, RGBQUAD*);
+ void RainySkyFilter(unsigned long, RGBQUAD*);
+ void SnowySkyFilter(unsigned long, RGBQUAD*);
+ void ColorBlend(int, RGBQUAD*, RGBQUAD*);
+
+ WeatherCode mCurrentWeather;
+ WeatherCode mNextWeather;
+ int mPhase;
+ int mLightningTime;
+ DWORD mLastChange;
+ DWORD mTimeSinceLastChange;
+};
diff --git a/src/T2DLL/T2WordDef.cpp b/src/T2DLL/T2WordDef.cpp
new file mode 100644
index 0000000..3b92484
--- /dev/null
+++ b/src/T2DLL/T2WordDef.cpp
@@ -0,0 +1,28 @@
+#include "CResFile.h"
+#include "T2WordDef.h"
+
+T2WordDef::T2WordDef() {
+}
+
+void T2WordDef::Read(CResFile& resFile) {
+ resFile >> mSexMask;
+ resFile >> mAgeMask;
+ resFile >> mFlags;
+ resFile >> mLevel;
+ resFile >> mStr;
+}
+
+/*virtual*/ T2WordDef::~T2WordDef() {
+}
+
+void T2WordDef::GetWords(unsigned int sex, unsigned int age, unsigned int flags, unsigned int level, CString& outStr) const {
+ if (
+ (mSexMask & (1 << sex)) &&
+ (mAgeMask & (1 << age)) &&
+ (mFlags == flags) &&
+ (mLevel == level)
+ )
+ {
+ outStr = mStr;
+ }
+}
diff --git a/src/T2DLL/T2WordDef.h b/src/T2DLL/T2WordDef.h
new file mode 100644
index 0000000..e3e1aa4
--- /dev/null
+++ b/src/T2DLL/T2WordDef.h
@@ -0,0 +1,17 @@
+#pragma once
+#include "common.h"
+
+class DLL_EXPORT T2WordDef {
+public:
+ T2WordDef();
+ void Read(CResFile&);
+ virtual ~T2WordDef();
+ void GetWords(unsigned int sex, unsigned int age, unsigned int flags, unsigned int level, CString& outStr) const;
+
+protected:
+ unsigned int mSexMask;
+ unsigned int mAgeMask;
+ unsigned int mFlags;
+ unsigned int mLevel;
+ char mStr[32];
+};
diff --git a/src/T2DLL/T2WordDefArray.cpp b/src/T2DLL/T2WordDefArray.cpp
new file mode 100644
index 0000000..76b3248
--- /dev/null
+++ b/src/T2DLL/T2WordDefArray.cpp
@@ -0,0 +1,49 @@
+#include "CResFile.h"
+#include "T2WordDef.h"
+#include "T2WordDefArray.h"
+#include "UT2Utils.h"
+
+T2WordDefArray::T2WordDefArray(HINSTANCE instance) {
+ mInstance = instance;
+}
+
+/*virtual*/ T2WordDefArray::~T2WordDefArray() {
+}
+
+void T2WordDefArray::GetWords(unsigned int sex, unsigned int age, unsigned int flags, unsigned int level, CString& outStr) const {
+ outStr = "";
+
+ CResFile resFile;
+ if (resFile.OpenResource(mInstance, 1, 'WoDf')) {
+ unsigned int numOfWordDef;
+ resFile >> numOfWordDef;
+
+ T2WordDef *wordDef = new T2WordDef[numOfWordDef];
+
+ for (unsigned int i = 0; i < numOfWordDef; i++)
+ wordDef[i].Read(resFile);
+
+ if (numOfWordDef > 0) {
+ unsigned char *seen = (unsigned char *) malloc(numOfWordDef);
+ memset(seen, 0, numOfWordDef);
+
+ unsigned int i = 0;
+ while ((outStr == "") && i < numOfWordDef) {
+ int rnd = UT2Utils::Randomize(numOfWordDef);
+ if (!seen[rnd]) {
+ seen[rnd] = true;
+ wordDef[rnd].GetWords(sex, age, flags, level, outStr);
+ } else {
+ for (i = 0; i < numOfWordDef; i++) {
+ if (!seen[i])
+ break;
+ }
+ }
+ }
+
+ free(seen);
+ }
+
+ delete[] wordDef;
+ }
+}
diff --git a/src/T2DLL/T2WordDefArray.h b/src/T2DLL/T2WordDefArray.h
new file mode 100644
index 0000000..e37bd5b
--- /dev/null
+++ b/src/T2DLL/T2WordDefArray.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class T2WordDefArray {
+public:
+ T2WordDefArray(HINSTANCE instance);
+ virtual ~T2WordDefArray();
+ void GetWords(unsigned int sex, unsigned int age, unsigned int flags, unsigned int level, CString& outStr) const;
+
+protected:
+ HINSTANCE mInstance;
+};
diff --git a/src/T2DLL/T2WorldDef.cpp b/src/T2DLL/T2WorldDef.cpp
new file mode 100644
index 0000000..9829b68
--- /dev/null
+++ b/src/T2DLL/T2WorldDef.cpp
@@ -0,0 +1,271 @@
+#include "T2WorldDef.h"
+
+T2WorldDef::T2WorldDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldPlugin*) {
+}
+
+T2PaletteAnimeDef* T2WorldDef::MakePaletteAnimeDef() {
+}
+
+T2PoolDef* T2WorldDef::MakePoolDef() {
+}
+
+T2SeasonParamDef* T2WorldDef::MakeSeasonParamDef() {
+}
+
+T2ColdTableDef* T2WorldDef::MakeColdTableDef() {
+}
+
+/*virtual*/ T2WorldDef::~T2WorldDef() {
+}
+
+/*virtual*/ void T2WorldDef::GetName(CString&) {
+}
+
+/*virtual*/ void T2WorldDef::DrawWorld(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawBkgnd(unsigned int, const RECT&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawBkgnd(const RECT&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawRoofAndFloor(const RECT&, T2TowerDoc*, ROOFANDFLOOR) {
+}
+
+/*virtual*/ void T2WorldDef::DrawSideObj(T2Equip*, T2TowerDoc*, SIDEOBJPATTERN) {
+}
+
+/*virtual*/ void T2WorldDef::DrawCrane(T2TowerDoc*, const RECT&) {
+}
+
+/*virtual*/ void T2WorldDef::CalcCranePos(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClearCranePos(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawBuild(T2Equip*, T2TowerDoc*) {
+}
+
+void T2WorldDef::SetupOffscreen(HINSTANCE) {
+}
+
+void T2WorldDef::DisposeOffscreen() {
+}
+
+void T2WorldDef::SetupPalette(HINSTANCE) {
+}
+
+void T2WorldDef::DisposePalette() {
+}
+
+/*virtual*/ void T2WorldDef::DoAnimate(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2WorldDef::TenantAreaCheck(T2TowerDoc*, RECT&, int) {
+}
+
+/*virtual*/ int T2WorldDef::IdleProc(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawCtrl(T2TowerDoc*, T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::ButtonDownOnCtrl(T2TowerDoc*, T2MWControl*, CPoint, CWnd*) {
+}
+
+/*virtual*/ void T2WorldDef::ButtonUpOnCtrl(T2TowerDoc*, T2MWControl*, CPoint, CWnd*) {
+}
+
+/*virtual*/ void T2WorldDef::MouseMoveOnCtrl(T2TowerDoc*, T2MWControl*, CPoint, CWnd*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickClock(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickCalendar(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickFunds(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickPopulation(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawClock(T2MWControl*, T2DateTime&) {
+}
+
+/*virtual*/ void T2WorldDef::DrawCalendar(T2MWControl*, T2DateTime&, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawFunds(T2MWControl*, int) {
+}
+
+/*virtual*/ void T2WorldDef::DrawMessage(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawPauseButton(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawPopulation(T2MWControl*, int) {
+}
+
+/*virtual*/ void T2WorldDef::ClickPauseButton(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawInViewButton(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawOutViewButton(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawMaintButton(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawEvalButton(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawPriceButton(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawTransButton(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawSlider(T2MWControl*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickInViewButton(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickOutViewButton(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickMaintButton(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickEvalButton(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickPriceButton(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ void T2WorldDef::ClickTransButton(T2MWControl*, T2TowerDoc*) {
+}
+
+/*virtual*/ int T2WorldDef::SliderPointToValue(T2MWControl*, CPoint) {
+}
+
+/*virtual*/ void T2WorldDef::DrawSimpleMWControl(T2MWControl*, const char*) {
+}
+
+/*virtual*/ void T2WorldDef::GetToolTipText(T2TowerDoc*, T2MWControl*, NMTTDISPINFOA*) {
+}
+
+/*virtual*/ void T2WorldDef::GetClockTip(T2TowerDoc*, T2MWControl*, char*) {
+}
+
+/*virtual*/ void T2WorldDef::GetCalendarTip(T2TowerDoc*, T2MWControl*, char*) {
+}
+
+/*virtual*/ void T2WorldDef::GetFundsTip(T2TowerDoc*, T2MWControl*, char*) {
+}
+
+/*virtual*/ void T2WorldDef::GetPopulationTip(T2TowerDoc*, T2MWControl*, char*) {
+}
+
+/*virtual*/ void T2WorldDef::GetPauseButtonTip(T2TowerDoc*, T2MWControl*, char*) {
+}
+
+unsigned int T2WorldDef::GetToiletDenomi(unsigned int) const {
+}
+
+unsigned int T2WorldDef::GetColdDenomi(unsigned int, unsigned int) const {
+}
+
+int T2WorldDef::IsDustOn(unsigned int) const {
+}
+
+T2TowerVision* T2WorldDef::GetTowerVision() {
+}
+
+void T2WorldDef::SetLatestBuild(T2Equip*, int) {
+}
+
+void T2WorldDef::SetLatestBuild(T2ToolDef*, int) {
+}
+
+void T2WorldDef::InitTowerEvent(T2TowerDoc*) {
+}
+
+void T2WorldDef::WriteTowerEvent(T2Archive&) {
+}
+
+void T2WorldDef::ReadTowerEvent(T2Archive&) {
+}
+
+void T2WorldDef::StopEvent() {
+}
+
+T2TowerEvent* T2WorldDef::GetTowerEvent() {
+}
+
+T2FireBurning* T2WorldDef::GetFireBurning() {
+}
+
+T2MetroRailway* T2WorldDef::GetMetroRailway() {
+}
+
+T2BlackOut* T2WorldDef::GetBlackOut() {
+}
+
+int T2WorldDef::IsBlackOut() {
+}
+
+/*virtual*/ void T2WorldDef::DrawRubble(T2TowerDoc*, T2Tenant*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawMark(T2BitImage*, const RECT&, int, unsigned int) {
+}
+
+/*virtual*/ void T2WorldDef::InitializeBkgndInfo(BkgndInfo*) {
+}
+
+/*virtual*/ void T2WorldDef::InitializeFloorInfo(T2FloorInfo*) {
+}
+
+/*virtual*/ void T2WorldDef::InitializeDocument(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2WorldDef::CheckGameLevelProc(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2WorldDef::CheckTreasure(T2TowerDoc*, T2TreasureStatus*) {
+}
+
+/*virtual*/ void T2WorldDef::GetGradeUpMessage(int, CString&) {
+}
+
+/*virtual*/ void T2WorldDef::CalcOptionObj(T2TowerDoc*, T2Equip*) {
+}
+
+/*virtual*/ void T2WorldDef::DrawOptionObj(T2TowerDoc*, const RECT&) {
+}
+
+/*virtual*/ void T2WorldDef::SetupGradeUpAnimation(T2DlgItemAnimation*, int) {
+}
+
+/*virtual*/ void T2WorldDef::WriteStatisticsProc(T2TowerDoc*, T2Archive&) {
+}
+
+/*virtual*/ void T2WorldDef::ReadStatisticsProc(T2TowerDoc*, T2Archive&) {
+}
+
+/*virtual*/ void T2WorldDef::ViewModeChanged(T2TowerDoc*, VIEWMODE) {
+}
+
+/*virtual*/ void T2WorldDef::ReplaceSkyOffscreen(int) {
+}
+
+/*virtual*/ T2EventItem* T2WorldDef::MakeXEvent(T2TowerEvent*, CResFile*, unsigned long, int) {
+}
diff --git a/src/T2DLL/T2WorldDef.h b/src/T2DLL/T2WorldDef.h
new file mode 100644
index 0000000..b80d358
--- /dev/null
+++ b/src/T2DLL/T2WorldDef.h
@@ -0,0 +1,132 @@
+#pragma once
+#include "common.h"
+#include "T2TemplatePlugin.h"
+
+class T2WorldDef : public T2TemplatePlugin {
+public:
+ T2WorldDef(unsigned long, T2PluginSpecifier&, CResFile*, T2WorldPlugin*);
+public:
+ virtual ~T2WorldDef();
+ virtual void GetName(CString&);
+ virtual int GetSortKey() { return 0; }
+ virtual int GetInitialFunds() const { return 0; }
+ virtual int IsHoliday(T2DateTime*) const { return 0; }
+ virtual int IsRainyDay(T2DateTime*) const { return 0; }
+ virtual int ExchangeMoney(int) const { return 0; }
+ virtual void DrawWorld(T2TowerDoc*);
+ virtual void DoAnimate(T2TowerDoc*);
+ virtual void DrawBkgnd(unsigned int, const RECT&, T2TowerDoc*);
+ virtual void DrawBkgnd(const RECT&, T2TowerDoc*);
+ virtual void DrawRoofAndFloor(const RECT&, T2TowerDoc*, ROOFANDFLOOR);
+ virtual void DrawBuild(T2Equip*, T2TowerDoc*);
+ virtual void DrawSideObj(T2Equip*, T2TowerDoc*, SIDEOBJPATTERN);
+ virtual void DrawOptionObj(T2TowerDoc*, const RECT&);
+ virtual void DrawRubble(T2TowerDoc*, T2Tenant*);
+ virtual void DrawMark(T2BitImage*, const RECT&, int, unsigned int);
+ virtual void DrawCrane(T2TowerDoc*, const RECT&);
+ virtual const char* GetMoneyUnit() { return 0; }
+ virtual T2EventItem* MakeXEvent(T2TowerEvent*, CResFile*, unsigned long, int);
+ virtual T2Transport* GetCruise(T2TowerEvent*) { return 0; }
+ virtual void InitializeBkgndInfo(BkgndInfo*);
+ virtual void InitializeFloorInfo(T2FloorInfo*);
+ virtual void InitializeDocument(T2TowerDoc*);
+ virtual int TenantAreaCheck(T2TowerDoc*, RECT&, int);
+ virtual void CalcOptionObj(T2TowerDoc*, T2Equip*);
+ virtual void CalcCranePos(T2TowerDoc*);
+ virtual void ClearCranePos(T2TowerDoc*);
+ virtual void DrawCtrl(T2TowerDoc*, T2MWControl*);
+ virtual void ButtonDownOnCtrl(T2TowerDoc*, T2MWControl*, CPoint, CWnd*);
+ virtual void ButtonUpOnCtrl(T2TowerDoc*, T2MWControl*, CPoint, CWnd*);
+ virtual void MouseMoveOnCtrl(T2TowerDoc*, T2MWControl*, CPoint, CWnd*);
+ virtual void GetToolTipText(T2TowerDoc*, T2MWControl*, NMTTDISPINFOA*);
+ virtual int IdleProc(T2TowerDoc*);
+ virtual int CheckGameLevelProc(T2TowerDoc*);
+ virtual void GetGradeUpMessage(int, CString&);
+ virtual void DayChanged(T2TowerDoc*) {}
+ virtual void ViewModeChanged(T2TowerDoc*, VIEWMODE);
+ virtual void ReplaceSkyOffscreen(int);
+ virtual BOOL3 ChangeFastSEProc(T2PaletteAnime*) { return BOOL3_0; }
+ virtual BOOL3 ChangeFastSEProc(T2PaletteAnime*, T2DateTime*) { return BOOL3_0; }
+ virtual BOOL3 ChangeSEProc(T2PaletteAnime*) { return BOOL3_0; }
+ virtual BOOL3 ChangeSkyColorProc(T2PaletteAnime*) { return BOOL3_0; }
+ virtual BOOL3 AdjustSkyStateProc(T2PaletteAnime*, T2DateTime*) { return BOOL3_0; }
+ virtual int UseOwnSkyPaletteFunction() { return 0; }
+ virtual void SetupGradeUpAnimation(T2DlgItemAnimation*, int);
+ virtual void WriteStatisticsProc(T2TowerDoc*, T2Archive&);
+ virtual void ReadStatisticsProc(T2TowerDoc*, T2Archive&);
+ virtual int CheckTreasure(T2TowerDoc*, T2TreasureStatus*);
+ virtual unsigned long OptionProc(unsigned long, void*) { return 0; }
+
+ unsigned int GetToiletDenomi(unsigned int) const;
+ unsigned int GetColdDenomi(unsigned int, unsigned int) const;
+ int IsDustOn(unsigned int) const;
+ T2TowerVision* GetTowerVision();
+ void SetLatestBuild(T2Equip*, int);
+ void SetLatestBuild(T2ToolDef*, int);
+ void InitTowerEvent(T2TowerDoc*);
+ void WriteTowerEvent(T2Archive&);
+ void ReadTowerEvent(T2Archive&);
+ void StopEvent();
+ T2TowerEvent* GetTowerEvent();
+ T2FireBurning* GetFireBurning();
+ T2MetroRailway* GetMetroRailway();
+ T2BlackOut* GetBlackOut();
+ int IsBlackOut();
+
+ CPalette* GetPalette() { return 0; }
+ int IsUseMatterObject() const { return 0; }
+ int GetOutViewKind() const { return 0; }
+ T2PaletteAnimeDef* GetPaletteAnimeDef() const { return 0; }
+ T2SeasonParamDef* GetSeasonParamDef() const { return 0; }
+ int GetHeight() const { return 0; }
+ int GetWidth() const { return 0; }
+ void GetBuildArea(RECT&) const {}
+ int IsStoppableFloor(int) { return 0; }
+ int GetLobbyHeight() { return 0; }
+ T2Maru_Reggae* GetReggae() { return 0; }
+ int GetCashAmount(int) const { return 0; }
+
+protected:
+ virtual void DrawClock(T2MWControl*, T2DateTime&);
+ virtual void DrawCalendar(T2MWControl*, T2DateTime&, T2TowerDoc*);
+ virtual void DrawFunds(T2MWControl*, int);
+ virtual void DrawPopulation(T2MWControl*, int);
+ virtual void DrawMessage(T2MWControl*);
+ virtual void DrawPauseButton(T2MWControl*);
+ virtual void DrawInViewButton(T2MWControl*);
+ virtual void DrawOutViewButton(T2MWControl*);
+ virtual void DrawMaintButton(T2MWControl*);
+ virtual void DrawEvalButton(T2MWControl*);
+ virtual void DrawPriceButton(T2MWControl*);
+ virtual void DrawTransButton(T2MWControl*);
+ virtual void DrawSlider(T2MWControl*);
+ virtual void ClickClock(T2MWControl*, T2TowerDoc*);
+ virtual void ClickCalendar(T2MWControl*, T2TowerDoc*);
+ virtual void ClickFunds(T2MWControl*, T2TowerDoc*);
+ virtual void ClickPopulation(T2MWControl*, T2TowerDoc*);
+ virtual void ClickPauseButton(T2MWControl*, T2TowerDoc*);
+ virtual void ClickInViewButton(T2MWControl*, T2TowerDoc*);
+ virtual void ClickOutViewButton(T2MWControl*, T2TowerDoc*);
+ virtual void ClickMaintButton(T2MWControl*, T2TowerDoc*);
+ virtual void ClickEvalButton(T2MWControl*, T2TowerDoc*);
+ virtual void ClickPriceButton(T2MWControl*, T2TowerDoc*);
+ virtual void ClickTransButton(T2MWControl*, T2TowerDoc*);
+ virtual int SliderPointToValue(T2MWControl*, CPoint);
+ virtual void GetClockTip(T2TowerDoc*, T2MWControl*, char*);
+ virtual void GetCalendarTip(T2TowerDoc*, T2MWControl*, char*);
+ virtual void GetFundsTip(T2TowerDoc*, T2MWControl*, char*);
+ virtual void GetPopulationTip(T2TowerDoc*, T2MWControl*, char*);
+ virtual void GetPauseButtonTip(T2TowerDoc*, T2MWControl*, char*);
+ virtual void DrawSimpleMWControl(T2MWControl*, const char*);
+
+ void SetupOffscreen(HINSTANCE);
+ void DisposeOffscreen();
+ void SetupPalette(HINSTANCE);
+ void DisposePalette();
+
+protected:
+ T2PaletteAnimeDef* MakePaletteAnimeDef();
+ T2PoolDef* MakePoolDef();
+ T2SeasonParamDef* MakeSeasonParamDef();
+ T2ColdTableDef* MakeColdTableDef();
+};
diff --git a/src/T2DLL/T2WorldPlugin.cpp b/src/T2DLL/T2WorldPlugin.cpp
new file mode 100644
index 0000000..d57e40c
--- /dev/null
+++ b/src/T2DLL/T2WorldPlugin.cpp
@@ -0,0 +1,52 @@
+#include "T2WorldPlugin.h"
+
+T2WorldPlugin::T2WorldPlugin(unsigned long, T2PluginSpecifier&) {
+}
+
+/*virtual*/ T2WorldPlugin::~T2WorldPlugin() {
+}
+
+/*virtual*/ int T2WorldPlugin::LoadAllTemplatePlugin(T2WorldDef*, T2TemplatePluginDB*) {
+}
+
+/*virtual*/ T2WorldDef* T2WorldPlugin::LoadT2WorldDef() {
+}
+
+/*virtual*/ void T2WorldPlugin::InitFloorInfoProc(T2WorldDef*, T2FloorInfo&) {
+}
+
+/*virtual*/ void T2WorldPlugin::InitBkgndInfoProc(T2WorldDef*, BkgndInfo*) {
+}
+
+/*virtual*/ void T2WorldPlugin::InitializeDocumentProc(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2WorldPlugin::IsHoliday(T2DateTime*) const {
+}
+
+/*virtual*/ int T2WorldPlugin::IsRainyDay(T2DateTime*) {
+}
+
+void T2WorldPlugin::_DrawClock(CWnd*, unsigned int) {
+}
+
+void T2WorldPlugin::_DrawCalendar(CWnd*, unsigned int) {
+}
+
+void T2WorldPlugin::_DrawFunds(CWnd*, int) {
+}
+
+/*virtual*/ int T2WorldPlugin::CheckGameLevel(T2WorldDef*, T2TowerDoc*) {
+}
+
+/*virtual*/ int T2WorldPlugin::XEventIsBeginTime(T2XEvent*, T2TowerDoc*, unsigned int) {
+}
+
+/*virtual*/ int T2WorldPlugin::XEventIsBeginDay(T2XEvent*, T2TowerDoc*, int) {
+}
+
+/*virtual*/ void T2WorldPlugin::XEventWrite(T2XEvent*, T2Archive&) {
+}
+
+/*virtual*/ void T2WorldPlugin::XEventRead(T2XEvent*, T2Archive&) {
+}
diff --git a/src/T2DLL/T2WorldPlugin.h b/src/T2DLL/T2WorldPlugin.h
new file mode 100644
index 0000000..5615f75
--- /dev/null
+++ b/src/T2DLL/T2WorldPlugin.h
@@ -0,0 +1,35 @@
+#pragma once
+#include "common.h"
+
+class T2WorldPlugin {
+public:
+ T2WorldPlugin(unsigned long, T2PluginSpecifier&);
+ virtual ~T2WorldPlugin();
+ virtual int LoadAllTemplatePlugin(T2WorldDef*, T2TemplatePluginDB*);
+ virtual T2WorldDef* LoadT2WorldDef();
+ virtual void InitFloorInfoProc(T2WorldDef*, T2FloorInfo&);
+ virtual void InitBkgndInfoProc(T2WorldDef*, BkgndInfo*);
+ virtual void InitializeDocumentProc(T2TowerDoc*);
+ virtual int IsHoliday(T2DateTime*) const;
+ virtual int IsRainyDay(T2DateTime*);
+protected:
+ void _DrawClock(CWnd*, unsigned int);
+ void _DrawCalendar(CWnd*, unsigned int);
+ void _DrawFunds(CWnd*, int);
+public:
+ virtual int CheckGameLevel(T2WorldDef*, T2TowerDoc*);
+ virtual int XEventIsBeginTime(T2XEvent*, T2TowerDoc*, unsigned int);
+ virtual int XEventIsBeginDay(T2XEvent*, T2TowerDoc*, int);
+ virtual void XEventWrite(T2XEvent*, T2Archive&);
+ virtual void XEventRead(T2XEvent*, T2Archive&);
+
+ int GetNumOfClockStyle() {}
+ virtual int CheckTreasure(T2TowerDoc*, T2TreasureStatus*) {}
+ virtual int XEventInit(T2XEvent*, CResFile*) {}
+ virtual int XEventDestruct(T2XEvent*) {}
+ virtual int XEventStart(T2XEvent*, T2TowerDoc*) {}
+ virtual int XEventExec(T2XEvent*, T2TowerDoc*) {}
+ virtual int XEventStop(T2XEvent*, T2TowerDoc*) {}
+ virtual int XEventDlgHook(T2XEvent*, T2TowerDoc*, T2EventDialog*, unsigned int) {}
+ T2WorldPlugin& operator=(T2WorldPlugin&) {}
+};
diff --git a/src/T2DLL/T2XEvent.cpp b/src/T2DLL/T2XEvent.cpp
new file mode 100644
index 0000000..ed84be7
--- /dev/null
+++ b/src/T2DLL/T2XEvent.cpp
@@ -0,0 +1,55 @@
+#include "T2XEvent.h"
+
+T2XEvent::T2XEvent(T2TowerEvent*, CResFile*, unsigned long, int) {
+}
+
+T2XEvent::T2XEvent(T2XEvent*, int) {
+}
+
+/*virtual*/ T2XEvent::~T2XEvent() {
+}
+
+/*virtual*/ void T2XEvent::Init(CResFile*) {
+}
+
+/*virtual*/ unsigned long T2XEvent::GetID() {
+}
+
+/*virtual*/ int T2XEvent::Start(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2XEvent::Exec(T2TowerDoc*) {
+}
+
+/*virtual*/ void T2XEvent::StopEvent(T2TowerDoc*) {
+}
+
+/*virtual*/ int T2XEvent::IsBeginTime(unsigned int) {
+}
+
+/*virtual*/ int T2XEvent::IsBeginTime(T2TowerDoc*, unsigned int) {
+}
+
+/*virtual*/ int T2XEvent::IsBeginDay(int) {
+}
+
+/*virtual*/ int T2XEvent::IsBeginDay(T2TowerDoc*, int) {
+}
+
+/*virtual*/ void T2XEvent::Write(T2Archive&) {
+}
+
+/*virtual*/ void T2XEvent::Read(T2Archive&) {
+}
+
+unsigned int T2XEvent::GetRefCon() {
+}
+
+void T2XEvent::SetRefCon(unsigned int) {
+}
+
+void T2XEvent::SetDialogItems(int, int, int* const, int, CString&) {
+}
+
+/*virtual*/ unsigned int T2XEvent::DialogHook(T2EventDialog*, unsigned int, T2TowerDoc*) {
+}
diff --git a/src/T2DLL/T2XEvent.h b/src/T2DLL/T2XEvent.h
new file mode 100644
index 0000000..f3788a1
--- /dev/null
+++ b/src/T2DLL/T2XEvent.h
@@ -0,0 +1,28 @@
+#pragma once
+#include "common.h"
+
+class T2XEvent {
+public:
+ T2XEvent(T2TowerEvent*, CResFile*, unsigned long, int);
+ T2XEvent(T2XEvent*, int);
+ virtual ~T2XEvent();
+ virtual void Init(CResFile*);
+ virtual unsigned long GetID();
+ virtual int Start(T2TowerDoc*);
+ virtual int Exec(T2TowerDoc*);
+ virtual void StopEvent(T2TowerDoc*);
+ virtual int IsBeginTime(unsigned int);
+ virtual int IsBeginTime(T2TowerDoc*, unsigned int);
+ virtual int IsBeginDay(int);
+ virtual int IsBeginDay(T2TowerDoc*, int);
+ virtual void Write(T2Archive&);
+ virtual void Read(T2Archive&);
+ unsigned int GetRefCon();
+ void SetRefCon(unsigned int);
+ void SetDialogItems(int, int, int* const, int, CString&);
+ virtual unsigned int DialogHook(T2EventDialog*, unsigned int, T2TowerDoc*);
+
+ virtual int IsXEvent() {}
+ T2XEvent(const T2XEvent&) {}
+ T2XEvent& operator=(const T2XEvent&) {}
+};
diff --git a/src/T2DLL/UPoint.cpp b/src/T2DLL/UPoint.cpp
new file mode 100644
index 0000000..0c93ea5
--- /dev/null
+++ b/src/T2DLL/UPoint.cpp
@@ -0,0 +1,7 @@
+#include "UPoint.h"
+
+/*static*/ void UPoint::MappingInRect(Point&, const RECT&) {
+}
+
+/*static*/ void UPoint::MappingInRect(POINT&, const RECT&) {
+}
diff --git a/src/T2DLL/UPoint.h b/src/T2DLL/UPoint.h
new file mode 100644
index 0000000..4ba16df
--- /dev/null
+++ b/src/T2DLL/UPoint.h
@@ -0,0 +1,10 @@
+#pragma once
+#include "common.h"
+
+class UPoint {
+public:
+ static void MappingInRect(Point&, const RECT&);
+ static void MappingInRect(POINT&, const RECT&);
+
+ UPoint& operator=(const UPoint&) {}
+};
diff --git a/src/T2DLL/URect.cpp b/src/T2DLL/URect.cpp
new file mode 100644
index 0000000..8b4aa21
--- /dev/null
+++ b/src/T2DLL/URect.cpp
@@ -0,0 +1,19 @@
+#include "URect.h"
+
+/*static*/ void URect::SetEmpty(RECT&) {
+}
+
+/*static*/ void URect::Center(const RECT&, RECT&, int) {
+}
+
+/*static*/ int URect::Width(const RECT&) {
+}
+
+/*static*/ int URect::Height(const RECT&) {
+}
+
+/*static*/ void URect::Union(const RECT&, const RECT&, RECT&) {
+}
+
+/*static*/ POINT URect::Center(const RECT&) {
+}
diff --git a/src/T2DLL/URect.h b/src/T2DLL/URect.h
new file mode 100644
index 0000000..2b9b047
--- /dev/null
+++ b/src/T2DLL/URect.h
@@ -0,0 +1,15 @@
+#pragma once
+#include "common.h"
+
+class URect {
+public:
+ static void SetEmpty(RECT&);
+ static void Center(const RECT&, RECT&, int);
+ static int Width(const RECT&);
+ static int Height(const RECT&);
+ static void Union(const RECT&, const RECT&, RECT&);
+ static POINT Center(const RECT&);
+
+ URect() {}
+ URect& operator=(const URect&) {}
+};
diff --git a/src/T2DLL/UT2BkgndInfo.cpp b/src/T2DLL/UT2BkgndInfo.cpp
new file mode 100644
index 0000000..b62afaf
--- /dev/null
+++ b/src/T2DLL/UT2BkgndInfo.cpp
@@ -0,0 +1,90 @@
+#include "UT2BkgndInfo.h"
+
+/*static*/ BkgndInfo* UT2BkgndInfo::SetupBkgndInfo(const RECT& rect, int z) {
+ BkgndInfo *bkgndInfo = NULL;
+
+ int vRange = (rect.bottom - rect.top) / 2;
+ int hRange = (rect.right - rect.left) / 8;
+ int zRange = z / 2;
+
+ if (vRange > 0 && hRange > 0) {
+ int size = sizeof(BkgndInfo) + sizeof(void *) * (vRange - 1);
+ bkgndInfo = (BkgndInfo *) malloc(size);
+ memset(bkgndInfo, 0, size);
+
+ bkgndInfo->vRange = vRange;
+ bkgndInfo->hRange = hRange;
+ bkgndInfo->zRange = zRange;
+
+ for (int i = 0; i < vRange && bkgndInfo; i++) {
+ size = sizeof(unsigned int) * hRange;
+ bkgndInfo->arrays[i] = (unsigned int *) malloc(size);
+ memset(bkgndInfo->arrays[i], 0, size);
+ if (!bkgndInfo->arrays[i])
+ DisposeBkgndInfo(bkgndInfo);
+ }
+ }
+
+ return bkgndInfo;
+}
+
+/*static*/ void UT2BkgndInfo::DisposeBkgndInfo(BkgndInfo*& info) {
+ if (info) {
+ for (int i = 0; i < info->vRange; i++) {
+ if (info->arrays[i])
+ free(info->arrays[i]);
+ }
+
+ free(info);
+ info = NULL;
+ }
+}
+
+/*static*/ unsigned int UT2BkgndInfo::GetBkgndInfo(BkgndInfo* const inBkgndInfoPtr, int inV, int inH) {
+ unsigned int result = 0;
+
+ if (!inBkgndInfoPtr)
+ return 0;
+ if (inV < 0 || inV >= inBkgndInfoPtr->vRange)
+ return 0;
+ if (inH < 0 || inH >= inBkgndInfoPtr->hRange)
+ return 0;
+
+ unsigned int value = inBkgndInfoPtr->arrays[inV][inH];
+ value &= 0xFFFF;
+ result = value;
+ return result;
+}
+
+/*static*/ void UT2BkgndInfo::UnitToBkgndRect(const RECT& inRect, RECT& outRect) {
+ outRect.top = inRect.top / 2;
+ outRect.left = inRect.left / 8;
+ outRect.bottom = inRect.bottom / 2;
+ outRect.right = inRect.right / 8;
+
+ if ((inRect.bottom % 2) != 0)
+ outRect.bottom++;
+ if ((inRect.right % 8) != 0)
+ outRect.right++;
+}
+
+/*static*/ void UT2BkgndInfo::BkgndToUnitRect(const RECT& inRect, RECT& outRect) {
+ outRect.top = inRect.top * 2;
+ outRect.left = inRect.left * 8;
+ outRect.bottom = inRect.bottom * 2;
+ outRect.right = inRect.right * 8;
+}
+
+/*static*/ void UT2BkgndInfo::GetOffBkgndRect(int offset, RECT& rect) {
+ SetRect(&rect, 0, 0, 8, 2);
+ OffsetRect(&rect, 0, offset * 2);
+}
+
+/*static*/ void UT2BkgndInfo::ReplaceID(const BkgndInfo* info, unsigned int a, int b) {
+ for (int v = 0; v < info->vRange; v++) {
+ for (int h = 0; h < info->hRange; h++) {
+ unsigned int *p = &info->arrays[v][h];
+ if ((*p & 0xFFFF) >= a)
+ *p += b;
+ }
+ }}
diff --git a/src/T2DLL/UT2BkgndInfo.h b/src/T2DLL/UT2BkgndInfo.h
new file mode 100644
index 0000000..4786100
--- /dev/null
+++ b/src/T2DLL/UT2BkgndInfo.h
@@ -0,0 +1,20 @@
+#pragma once
+#include "common.h"
+
+struct BkgndInfo {
+ int vRange;
+ int hRange;
+ int zRange;
+ unsigned int *arrays[1];
+};
+
+class DLL_EXPORT UT2BkgndInfo {
+public:
+ static BkgndInfo* SetupBkgndInfo(const RECT&, int);
+ static void DisposeBkgndInfo(BkgndInfo*&);
+ static unsigned int GetBkgndInfo(BkgndInfo* const, int, int);
+ static void UnitToBkgndRect(const RECT&, RECT&);
+ static void BkgndToUnitRect(const RECT&, RECT&);
+ static void GetOffBkgndRect(int, RECT&);
+ static void ReplaceID(const BkgndInfo*, unsigned int, int);
+};
diff --git a/src/T2DLL/UT2Coordinate.cpp b/src/T2DLL/UT2Coordinate.cpp
new file mode 100644
index 0000000..4c1323e
--- /dev/null
+++ b/src/T2DLL/UT2Coordinate.cpp
@@ -0,0 +1,94 @@
+#include "UT2Coordinate.h"
+
+/*static*/ void UT2Coordinate::UnitToQD(int&, int&, int) {
+}
+
+/*static*/ void UT2Coordinate::UnitToQD(POINT&, int, int) {
+}
+
+/*static*/ void UT2Coordinate::UnitToQD(RECT&, int, int) {
+}
+
+/*static*/ void UT2Coordinate::UnitToQD(const RECT&, RECT&, int, int) {
+}
+
+/*static*/ void UT2Coordinate::UnitToQDRoof(const RECT&, RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::UnitToQDFloor(const RECT&, RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::UnitToOffRect(const RECT&, RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToUnit(int&, int&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToUnit(POINT&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToUnit(SDimension16&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToUnit(RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToUnit(const RECT&, RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::NoRoofQDToUnit(const RECT&, RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::BkgndToQD(int&, int&, int) {
+}
+
+/*static*/ void UT2Coordinate::BkgndToQD(POINT&, int) {
+}
+
+/*static*/ void UT2Coordinate::BkgndToQD(RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::BkgndToQD(const RECT&, RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToBkgnd(int&, int&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToBkgnd(POINT&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToBkgnd(SDimension16&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToBkgnd(RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::QDToBkgnd(const RECT&, RECT&, int) {
+}
+
+/*static*/ void UT2Coordinate::UnitToBkgnd(const RECT&, RECT&) {
+}
+
+/*static*/ void UT2Coordinate::BkgndToUnit(const RECT&, RECT&) {
+}
+
+/*static*/ void UT2Coordinate::MakeRect(RECT&, const POINT&, const SDimension16&) {
+}
+
+/*static*/ void UT2Coordinate::MakeRect(RECT&, const POINT&, int, int) {
+}
+
+/*static*/ void UT2Coordinate::MakeRect(RECT&, int, int) {
+}
+
+/*static*/ void UT2Coordinate::MakeCenterRect(RECT&, const POINT&, int, int) {
+}
+
+/*static*/ void UT2Coordinate::AddRect(RECT&, const RECT&) {
+}
+
+/*static*/ void UT2Coordinate::SubRect(RECT&, const RECT&) {
+}
+
+/*static*/ void UT2Coordinate::ZoomOut(RECT&, int) {
+}
diff --git a/src/T2DLL/UT2Coordinate.h b/src/T2DLL/UT2Coordinate.h
new file mode 100644
index 0000000..a9e3586
--- /dev/null
+++ b/src/T2DLL/UT2Coordinate.h
@@ -0,0 +1,47 @@
+#pragma once
+#include "common.h"
+
+class UT2Coordinate {
+public:
+ static void UnitToQD(int&, int&, int);
+ static void UnitToQD(POINT&, int, int);
+ static void UnitToQD(RECT&, int, int);
+ static void UnitToQD(const RECT&, RECT&, int, int);
+ static void UnitToQDRoof(const RECT&, RECT&, int);
+ static void UnitToQDFloor(const RECT&, RECT&, int);
+ static void UnitToOffRect(const RECT&, RECT&, int);
+ static void QDToUnit(int&, int&, int);
+ static void QDToUnit(POINT&, int);
+ static void QDToUnit(SDimension16&, int);
+ static void QDToUnit(RECT&, int);
+ static void QDToUnit(const RECT&, RECT&, int);
+ static void NoRoofQDToUnit(const RECT&, RECT&, int);
+ static void BkgndToQD(int&, int&, int);
+ static void BkgndToQD(POINT&, int);
+ static void BkgndToQD(RECT&, int);
+ static void BkgndToQD(const RECT&, RECT&, int);
+ static void QDToBkgnd(int&, int&, int);
+ static void QDToBkgnd(POINT&, int);
+ static void QDToBkgnd(SDimension16&, int);
+ static void QDToBkgnd(RECT&, int);
+ static void QDToBkgnd(const RECT&, RECT&, int);
+ static void UnitToBkgnd(const RECT&, RECT&);
+ static void BkgndToUnit(const RECT&, RECT&);
+ static void MakeRect(RECT&, const POINT&, const SDimension16&);
+ static void MakeRect(RECT&, const POINT&, int, int);
+ static void MakeRect(RECT&, int, int);
+ static void MakeCenterRect(RECT&, const POINT&, int, int);
+ static void AddRect(RECT&, const RECT&);
+ static void SubRect(RECT&, const RECT&);
+ static void ZoomOut(RECT&, int);
+
+ // fixme
+ static int UnitVSize(int) { return 0; }
+ static int UnitHSize(int) { return 0; }
+ static int BkgndVSize(int) { return 0; }
+ static int BkgndHSize(int) { return 0; }
+ static int CalcRoofThick(int) { return 0; }
+ static int CalcFloorThick(int) { return 0; }
+ static void QDToOff(POINT&, int) {}
+ static int RectWidth(const RECT&) { return 0; }
+};
diff --git a/src/T2DLL/UT2Utils.cpp b/src/T2DLL/UT2Utils.cpp
new file mode 100644
index 0000000..281ec30
--- /dev/null
+++ b/src/T2DLL/UT2Utils.cpp
@@ -0,0 +1,13 @@
+#include "UT2Utils.h"
+
+/*static*/ unsigned int UT2Utils::Float2Int(float) {
+}
+
+/*static*/ void UT2Utils::GetRoomNumberString(int, CString&) {
+}
+
+/*static*/ void UT2Utils::GetHourMinute(int, int&, int&) {
+}
+
+/*static*/ void UT2Utils::GetMonetaryString(int, CString&) {
+}
diff --git a/src/T2DLL/UT2Utils.h b/src/T2DLL/UT2Utils.h
new file mode 100644
index 0000000..df542ac
--- /dev/null
+++ b/src/T2DLL/UT2Utils.h
@@ -0,0 +1,12 @@
+#pragma once
+#include "common.h"
+
+class UT2Utils {
+public:
+ static unsigned int Float2Int(float);
+ static void GetRoomNumberString(int, CString&);
+ static void GetHourMinute(int, int&, int&);
+ static void GetMonetaryString(int, CString&);
+
+ static int Randomize(int) { return 1; }
+};
diff --git a/src/T2DLL/Wave.cpp b/src/T2DLL/Wave.cpp
new file mode 100644
index 0000000..021583b
--- /dev/null
+++ b/src/T2DLL/Wave.cpp
@@ -0,0 +1,34 @@
+#include "Wave.h"
+
+CWave::CWave() {
+}
+
+CWave::CWave(const CString&) {
+}
+
+CWave::CWave(unsigned int, HINSTANCE) {
+}
+
+/*virtual*/ CWave::~CWave() {
+}
+
+int CWave::Create(const CString&) {
+}
+
+int CWave::Create(unsigned int, HINSTANCE) {
+}
+
+int CWave::Play(int, int) const {
+}
+
+int CWave::GetFormat(WAVEFORMATEX&) const {
+}
+
+unsigned long CWave::GetDataLen() const {
+}
+
+unsigned long CWave::GetData(unsigned char*&, unsigned long) const {
+}
+
+int CWave::Free() {
+}
diff --git a/src/T2DLL/Wave.h b/src/T2DLL/Wave.h
new file mode 100644
index 0000000..18ae45e
--- /dev/null
+++ b/src/T2DLL/Wave.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "common.h"
+
+class CWave {
+public:
+ CWave();
+ CWave(const CString&);
+ CWave(unsigned int, HINSTANCE);
+ virtual ~CWave();
+ int Create(const CString&);
+ int Create(unsigned int, HINSTANCE);
+ int Play(int, int) const;
+ int GetFormat(WAVEFORMATEX&) const;
+ unsigned long GetDataLen() const;
+ unsigned long GetData(unsigned char*&, unsigned long) const;
+protected:
+ int Free();
+
+public:
+ int IsValid() const {}
+};
diff --git a/src/T2TowerDoc.h b/src/T2TowerDoc.h
new file mode 100644
index 0000000..db42bc4
--- /dev/null
+++ b/src/T2TowerDoc.h
@@ -0,0 +1,175 @@
+#pragma once
+#include "common.h"
+
+// TODO: this lad also inherits T2MsgWindowCallback, T2ToolCallback
+
+class T2TowerDoc : public CDocument {
+public:
+ virtual int IsDustOn() const;
+ virtual void LoadsWorldPlugin();
+ // C0
+ virtual void towerDoc_vfC0();
+ virtual void towerDoc_vfC4();
+ virtual void towerDoc_vfC8();
+ virtual void towerDoc_vfCC();
+ // D0
+ virtual void towerDoc_vfD0();
+ virtual void towerDoc_vfD4();
+ virtual void towerDoc_vfD8();
+ virtual void towerDoc_vfDC();
+ // E0
+ virtual void towerDoc_vfE0();
+ virtual void towerDoc_vfE4();
+ virtual void towerDoc_vfE8();
+ virtual void towerDoc_vfEC();
+ // F0
+ virtual void towerDoc_vfF0();
+ virtual void towerDoc_vfF4();
+ virtual void towerDoc_vfF8();
+ virtual void towerDoc_vfFC();
+ // 100
+ virtual void towerDoc_vf100();
+ virtual void towerDoc_vf104();
+ virtual void towerDoc_vf108();
+ virtual void towerDoc_vf10C();
+ // 110
+ virtual T2TowerMainView *GetTowerMainView();
+ virtual void towerDoc_vf114();
+ virtual void towerDoc_vf118();
+ virtual void towerDoc_vf11C(int startIndex, int count, PALETTEENTRY *entries); // updates palette
+ // 120
+ virtual T2DateTime *towerDoc_vf120() const;
+ virtual void towerDoc_vf124();
+ virtual void towerDoc_vf128();
+ virtual void towerDoc_vf12C();
+ // 130
+ virtual void towerDoc_vf130();
+ virtual T2SoundPlayer *towerDoc_vf134();
+ virtual void towerDoc_vf138();
+ virtual void towerDoc_vf13C();
+ // 140
+ virtual void towerDoc_vf140();
+ virtual void towerDoc_vf144();
+ virtual void towerDoc_vf148();
+ virtual void towerDoc_vf14C();
+ // 150
+ virtual void towerDoc_vf150();
+ virtual void towerDoc_vf154();
+ virtual void towerDoc_vf158();
+ virtual int towerDoc_vf15C(const RECT &rect);
+ // 160
+ virtual void towerDoc_vf160();
+ virtual void towerDoc_vf164();
+ virtual void towerDoc_vf168();
+ virtual void towerDoc_vf16C();
+ // 170
+ virtual T2WorldDef *towerDoc_vf170();
+ virtual void towerDoc_vf174();
+ virtual void towerDoc_vf178();
+ virtual void towerDoc_vf17C();
+ // 180
+ virtual void towerDoc_vf180();
+ virtual void towerDoc_vf184();
+ virtual void towerDoc_vf188();
+ virtual void towerDoc_vf18C();
+ // 190
+ virtual void towerDoc_vf190();
+ virtual void towerDoc_vf194();
+ virtual void towerDoc_vf198();
+ virtual void towerDoc_vf19C();
+ // 1A0
+ virtual void towerDoc_vf1A0(int);
+ virtual void towerDoc_vf1A4();
+ virtual void towerDoc_vf1A8();
+ virtual void towerDoc_vf1AC();
+ // 1B0
+ virtual void towerDoc_vf1B0();
+ virtual void towerDoc_vf1B4();
+ virtual void towerDoc_vf1B8();
+ virtual void towerDoc_vf1BC();
+ // 1C0
+ virtual void towerDoc_vf1C0();
+ virtual void towerDoc_vf1C4();
+ virtual void towerDoc_vf1C8();
+ virtual void towerDoc_vf1CC();
+ // 1D0
+ virtual void towerDoc_vf1D0();
+ virtual void towerDoc_vf1D4();
+ virtual void towerDoc_vf1D8();
+ virtual void towerDoc_vf1DC();
+ // 1E0
+ virtual void towerDoc_vf1E0();
+ virtual void towerDoc_vf1E4();
+ virtual void towerDoc_vf1E8();
+ virtual void towerDoc_vf1EC();
+ // 1F0
+ virtual void towerDoc_vf1F0();
+ virtual void towerDoc_vf1F4();
+ virtual void towerDoc_vf1F8();
+ virtual void towerDoc_vf1FC();
+ // 200
+ virtual void towerDoc_vf200();
+ virtual void towerDoc_vf204();
+ virtual void towerDoc_vf208();
+ virtual void towerDoc_vf20C();
+ // 210
+ virtual void towerDoc_vf210();
+ virtual void towerDoc_vf214();
+ virtual void towerDoc_vf218();
+ virtual void towerDoc_vf21C();
+ // 220
+ virtual void towerDoc_vf220();
+ virtual void towerDoc_vf224();
+ virtual void towerDoc_vf228();
+ virtual void towerDoc_vf22C();
+ // 230
+ virtual void towerDoc_vf230();
+ virtual void towerDoc_vf234();
+ virtual void towerDoc_vf238();
+ virtual void towerDoc_vf23C();
+ // 240
+ virtual void towerDoc_vf240();
+ virtual void towerDoc_vf244();
+ virtual void towerDoc_vf248();
+ virtual void towerDoc_vf24C();
+ // 250
+ virtual void towerDoc_vf250();
+ virtual void towerDoc_vf254();
+ virtual void towerDoc_vf258();
+ virtual void towerDoc_vf25C();
+ // 260
+ virtual void towerDoc_vf260();
+ virtual void towerDoc_vf264();
+ virtual void towerDoc_vf268();
+ virtual void towerDoc_vf26C();
+ // 270
+ virtual void towerDoc_vf270();
+ virtual void towerDoc_vf274();
+ virtual void DoPayTool(int cost, short unk, T2ToolDef *toolDef);
+ virtual void towerDoc_vf27C();
+ // 280
+ virtual void towerDoc_vf280();
+ virtual void towerDoc_vf284();
+ virtual void towerDoc_vf288();
+ virtual void towerDoc_vf28C();
+ // 290
+ virtual void towerDoc_vf290(int pauseVal);
+ virtual void towerDoc_vf294();
+ virtual void towerDoc_vf298();
+ virtual void towerDoc_vf29C();
+ // 2A0
+ virtual void towerDoc_vf2A0();
+ virtual void towerDoc_vf2A4();
+ virtual void towerDoc_vf2A8();
+ virtual void towerDoc_vf2AC();
+ // 2B0
+ virtual void towerDoc_vf2B0();
+ virtual void towerDoc_vf2B4();
+ virtual void towerDoc_vf2B8();
+ virtual void towerDoc_vf2BC();
+ // 2C0
+ virtual void towerDoc_vf2C0();
+
+ int mZoomLevel;
+ T2WorldDef *mWorldDef;
+};
diff --git a/src/T2TowerMainView.h b/src/T2TowerMainView.h
new file mode 100644
index 0000000..fc0547d
--- /dev/null
+++ b/src/T2TowerMainView.h
@@ -0,0 +1,28 @@
+#pragma once
+#include "common.h"
+#include "LAttachable.h"
+
+class T2TowerMainView : public CView, public LAttachable {
+public:
+ virtual void tmv_vf110();
+ virtual void tmv_vf114();
+ virtual void tmv_vf118();
+ virtual void tmv_vf11C();
+ virtual void tmv_vf120();
+ virtual void tmv_vf124(BOOL); // some invalidator
+ virtual void tmv_vf128();
+ virtual void tmv_vf12C();
+ virtual void tmv_vf130();
+ virtual void tmv_vf134();
+ virtual void tmv_vf138();
+ virtual void tmv_vf13C();
+ virtual void tmv_vf140();
+ virtual void tmv_vf144();
+ virtual void tmv_vf148();
+ virtual void tmv_vf14C();
+ virtual void tmv_vf150();
+ virtual void tmv_vf154();
+ virtual void tmv_vf158();
+ virtual void tmv_vf15C();
+ virtual void tmv_vf160();
+};
diff --git a/src/common.h b/src/common.h
new file mode 100644
index 0000000..b0b92ef
--- /dev/null
+++ b/src/common.h
@@ -0,0 +1,183 @@
+#pragma once
+#include <AFX.H>
+#include <AFXTEMPL.H>
+#include <AFXWIN.H>
+#include <AFXCMN.H>
+#include <MBSTRING.H>
+#include <CRTDBG.H>
+#include <MMSYSTEM.H>
+#include <DSOUND.H>
+#include <math.h>
+
+class CFilePlugin;
+class CFilePluginList;
+class CProgramPlugin;
+class CResFile;
+class CResourcePlugin;
+class CT2App;
+class CTokenizer;
+class CWave;
+class LArray;
+class LArrayIterator;
+class LAttachable;
+class LAttachment;
+class LBroadcaster;
+class LListener;
+class T2AdvertisePlugin;
+class T2Archive;
+class T2BitImage;
+class T2BlackOut;
+class T2ColdTableDef;
+class T2CrossEquipArray;
+class T2DateTime;
+class T2DayLightFilter;
+class T2DlgItem;
+class T2DlgItemAnimation;
+class T2DlgItemHScr;
+class T2DlgItemVScr;
+class T2DrawableObject;
+class T2Equip;
+class T2EquipDef;
+class T2EquipPlugin;
+class T2EventItem;
+class T2FireBurning;
+class T2FloorInfo;
+class T2GlobalData;
+class T2HaveOutViewObject;
+class T2ImageObj;
+class T2InfoDialog;
+class T2Maru_Reggae;
+class T2Matter;
+class T2MatterDef;
+class T2MetroRailway;
+class T2Mover;
+class T2MoverArrayList;
+class T2MoverDef;
+class T2MoverModule;
+class T2MWControl;
+class T2Object;
+class T2OutObj;
+class T2OutObjArrayList;
+class T2OuterObjDef;
+class T2OutsideInfo;
+class T2PaletteAnime;
+class T2PaletteAnimeDef;
+class T2People;
+class T2PeopleDef;
+class T2PeopleArrayList;
+class T2PeopleType;
+class T2PluginSpecifier;
+class T2Pool;
+class T2PoolDef;
+class T2PoolTimeZoneDef;
+class T2Request;
+class T2RequestArrayList;
+class T2ReturnStack;
+class T2RouteCEArray;
+class T2SeasonParamDef;
+class T2SilhouetteDef;
+class T2SoundObjItem;
+class T2SoundPlayer;
+class T2Sprite;
+class T2SpriteObj;
+class T2TemplatePlugin;
+class T2TemplatePluginDB;
+class T2TemplatePluginList;
+class T2Tenant;
+class T2TenantArrayList;
+class T2TenantDef;
+class T2TenantMemberDef;
+class T2ToolDef;
+class T2ToolPlugin;
+class T2ToolWindow;
+class T2TowerDoc;
+class T2TowerEvent;
+class T2TowerMainView;
+class T2TowerVision;
+class T2Transport;
+class T2TreasureStatus;
+class T2UnitInfo;
+class T2WeatherFilter;
+class T2WordDefArray;
+class T2WorldDef;
+class T2WorldPlugin;
+
+enum AREACHECKCODE {
+ AreaCheckCode_0
+};
+
+enum CURSORTYPE {
+ CursorType_0
+};
+
+enum MOUSEEVENT {
+ MouseEvent_0
+};
+
+enum OPTIONEVENTTYPE {
+ OptionEventType_0
+};
+
+enum PARTCODE {
+ PartCode_0,
+ PartCode_1,
+ PartCode_2
+};
+
+enum PROCCODE {
+ ProcCode_0,
+ ProcCode_1,
+ ProcCode_2
+};
+
+enum ROOFANDFLOOR {
+ RoofAndFloor_0
+};
+
+enum SIDEOBJPATTERN {
+ SideObjPattern_0
+};
+
+enum VIEWMODE {
+ ViewMode_0
+};
+
+enum BOOL3 {
+ BOOL3_NEG1 = -1,
+ BOOL3_0 = 0,
+ BOOL3_1 = 1
+};
+
+enum ERequestUpDown;
+
+struct BkgndInfo;
+
+struct SDimension16 {
+ short width;
+ short height;
+};
+
+struct TableCellT {
+ UINT row;
+ UINT col;
+};
+
+#ifdef _MSC_VER
+#define MSVC_STDCALL __stdcall
+#define DLL_EXPORT __declspec(dllexport)
+#else
+#define MSVC_STDCALL
+#define DLL_EXPORT
+#endif
+
+// why is this necessary?
+inline int MSVC_STDCALL my_atoi(const char *s) {
+ int v = 0;
+ while (*s && *s >= '0' && *s <= '9') {
+ v = (v * 10) + (*s - '0');
+ s++;
+ }
+ return v;
+}
+
+#define atoi my_atoi