#include <TileFrameTable.h>
См. определение в файле TileFrameTable.h строка 74
◆ TileTable()
◆ ~TileTable()
TileTable::~TileTable |
( |
| ) |
|
◆ GetTileById()
TileDesc * TileTable::GetTileById |
( |
unsigned int |
uTileID | ) |
|
◆ InitializeTileset()
◆ GetTileForTerrainType()
int TileTable::GetTileForTerrainType |
( |
signed int |
a1, |
|
|
bool |
a2 |
|
) |
| |
◆ GetTileId()
unsigned int TileTable::GetTileId |
( |
unsigned int |
uTerrainType, |
|
|
unsigned int |
uSection |
|
) |
| |
◆ ToFile()
void TileTable::ToFile |
( |
| ) |
|
См. определение в файле TileTable.cpp строка 73
81 v2 = fopen(
"data\\dtile.bin",
"wb");
83 if (!
v2) Error(
"Unable to save dtile.bin!");
84 fwrite(
v1, 4u, 1u,
v2);
85 fwrite(
v1->pTiles, 0x1Au,
v1->sNumTiles,
v3);
◆ FromFile()
См. определение в файле TileTable.cpp строка 90
91 uint num_mm6_tiles = data_mm6 ? *(
int *)data_mm6 : 0,
92 num_mm7_tiles = data_mm7 ? *(
int *)data_mm7 : 0,
93 num_mm8_tiles = data_mm8 ? *(
int *)data_mm8 : 0;
98 auto tile_data = (
TileDesc_MM7 *)((
unsigned char *)data_mm7 + 4);
99 for (
unsigned int i = 0; i < num_mm7_tiles; ++i) {
100 tiles[i].
name = tile_data->pTileName;
102 tiles[i].name.begin(), ::tolower);
103 if (tiles[i].
name.find(
"wtrdr") == 0) {
104 tiles[i].name.insert(
105 tiles[i].
name.begin(),
109 tiles[i].uTileID = tile_data->uTileID;
110 tiles[i].tileset = (
Tileset)tile_data->tileset;
111 tiles[i].uSection = tile_data->uSection;
112 tiles[i].uAttributes = tile_data->uAttributes;
Перекрестные ссылки TileDesc::name, pTiles и sNumTiles.
Используется в Engine::MM7_Initialize().
◆ FromFileTxt()
int TileTable::FromFileTxt |
( |
const char * |
pFilename | ) |
|
См. определение в файле TileTable.cpp строка 126
213 v3 = fopen(pFilename,
"r");
215 if (!
v3) Error(
"TileTable::load - Unable to open file: %s.");
217 for (i =
v3; fgets(&Buf, 490, i); i = File) {
218 *strchr(&Buf, 10) = 0;
225 if (!v5) Error(
"TileTable::Load - Out of Memory!");
226 memset(v5, 0,
sizeof(
TileDesc) *
v2->sNumTiles);
229 if (fgets(&Buf, 490, File)) {
231 *strchr(&Buf, 10) = 0;
237 if (!fgets(&Buf, 490, File))
goto LABEL_174;
242 v2->pTiles[
v2->sNumTiles].uTileID = v6;
247 if (_stricmp(v9,
"TTtype_NULL")) {
248 if (_stricmp(v9,
"TTtype_Start")) {
249 if (_stricmp(v9,
"TTtype_Grass")) {
250 if (_stricmp(v9,
"TTtype_Cracked")) {
251 if (_stricmp(v9,
"TTtype_Snow")) {
252 if (_stricmp(v9,
"TTtype_Sand")) {
253 if (_stricmp(v9,
"TTtype_Volcano")) {
254 if (_stricmp(v9,
"TTtype_Dirt")) {
255 if (_stricmp(v9,
"TTtype_Water")) {
257 "TTtype_Tropical")) {
296 "TTtype_RoadSandCobble")) {
299 "TTtype_RoadSandDirt")) {
302 "TTtype_RoadVolcanoCobble")) {
305 "TTtype_RoadVolcanoDirt")) {
308 "TTtype_RoadSwampCobble")) {
311 "TTtype_RoadSwampDirt")) {
314 "TTtype_RoadTropicalCobble")) {
317 "TTtype_RoadTropicalDirt")) {
320 "TTtype_RoadSnowCobble")) {
323 "TTtype_RoadSnowDirt")) {
326 "TTtype_RoadCityStone")) {
511 (int)&
v2->pTiles[
v2->sNumTiles]
516 v15 = (int)&
v2->pTiles[
v2->sNumTiles]
522 (int)&
v2->pTiles[
v2->sNumTiles].tileset;
526 v13 = (int)&
v2->pTiles[
v2->sNumTiles].tileset;
530 v12 = (int)&
v2->pTiles[
v2->sNumTiles].tileset;
534 v11 = (int)&
v2->pTiles[
v2->sNumTiles].tileset;
539 v10 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
540 *(
char *)v10 |= 0xFEu;
543 v2->pTiles[
v2->sNumTiles].tileset =
544 (
Tileset)(
v2->pTiles[
v2->sNumTiles].tileset | 0xFF);
547 v2->pTiles[
v2->sNumTiles].uSection = 0;
548 v2->pTiles[
v2->sNumTiles].uAttributes = 0;
549 if (!_stricmp(v35,
"TTsect_NULL")) {
550 v2->pTiles[
v2->sNumTiles].uSection |= 0xFF;
555 if (_stricmp(v72,
"TTattr_Water")) {
556 if (_stricmp(v72,
"TTattr_Water2")) {
557 if (_stricmp(v72,
"TTattr_Block")) {
558 if (_stricmp(v72,
"TTattr_Repulse")) {
559 if (_stricmp(v72,
"TTattr_Flat")) {
560 if (_stricmp(v72,
"TTattr_Wave")) {
565 "TTattr_Transition")) {
571 *(
short *)v80 |= 0x200u;
578 *(
char *)v79 |= 0x40u;
582 (int)&
v2->pTiles[
v2->sNumTiles]
584 *(
char *)v78 |= 0x20u;
587 v77 = (int)&
v2->pTiles[
v2->sNumTiles]
589 *(
char *)v77 |= 0x10u;
592 v76 = (int)&
v2->pTiles[
v2->sNumTiles]
598 (int)&
v2->pTiles[
v2->sNumTiles].uAttributes;
603 v2->pTiles[
v2->sNumTiles].uAttributes) |= 1;
606 v74 = (int)&
v2->pTiles[
v2->sNumTiles].uAttributes;
610 v73 = (int)&
v2->pTiles[
v2->sNumTiles].uAttributes;
617 if (!_stricmp(v35,
"TTsect_Start")) {
618 v36 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
619 *(
char *)v36 |= 0xFEu;
622 if (!_stricmp(v35,
"TTsect_Base1"))
goto LABEL_152;
623 if (!_stricmp(v35,
"TTsect_Base2")) {
624 v37 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
628 if (!_stricmp(v35,
"TTsect_Base3")) {
629 v38 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
633 if (!_stricmp(v35,
"TTsect_Base4")) {
634 v39 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
638 if (!_stricmp(v35,
"TTsect_Special1")) {
639 v40 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
643 if (!_stricmp(v35,
"TTsect_Special2")) {
644 v41 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
648 if (!_stricmp(v35,
"TTsect_Special3")) {
649 v42 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
653 if (!_stricmp(v35,
"TTsect_Special4")) {
654 v43 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
658 if (!_stricmp(v35,
"TTsect_Special5")) {
659 v44 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
663 if (!_stricmp(v35,
"TTsect_Special6")) {
664 v45 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
668 if (!_stricmp(v35,
"TTsect_Special7")) {
669 v46 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
670 *(
char *)v46 |= 0xAu;
673 if (!_stricmp(v35,
"TTsect_Special8")) {
674 v47 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
675 *(
char *)v47 |= 0xBu;
678 if (!_stricmp(v35,
"TTsect_NE1"))
goto LABEL_130;
679 if (!_stricmp(v35,
"TTsect_NW1"))
goto LABEL_134;
680 if (!_stricmp(v35,
"TTsect_SE1"))
goto LABEL_130;
681 if (!_stricmp(v35,
"TTsect_SW1"))
goto LABEL_134;
682 if (!_stricmp(v35,
"TTsect_E1"))
goto LABEL_138;
683 if (!_stricmp(v35,
"TTsect_W1"))
goto LABEL_140;
684 if (!_stricmp(v35,
"TTsect_N1"))
goto LABEL_142;
685 if (!_stricmp(v35,
"TTsect_S1"))
goto LABEL_144;
686 if (!_stricmp(v35,
"TTsect_XNE1"))
goto LABEL_146;
687 if (_stricmp(v35,
"TTsect_XNW1")) {
688 if (!_stricmp(v35,
"TTsect_XSE1"))
goto LABEL_146;
689 if (_stricmp(v35,
"TTsect_XSW1")) {
690 if (!_stricmp(v35,
"TTsect_CROS")) {
692 v70 = (int)&
v2->pTiles[
v2->sNumTiles].uAttributes;
693 *(
short *)v70 |= 0x200u;
696 if (!_stricmp(v35,
"TTsect_NS")) {
697 v48 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
701 if (!_stricmp(v35,
"TTsect_EW")) {
702 v49 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
706 if (!_stricmp(v35,
"TTsect_N_E")) {
707 v50 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
711 if (!_stricmp(v35,
"TTsect_N_W")) {
712 v51 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
716 if (!_stricmp(v35,
"TTsect_S_E")) {
717 v52 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
721 if (!_stricmp(v35,
"TTsect_S_W")) {
722 v53 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
726 if (!_stricmp(v35,
"TTsect_NS_E")) {
727 v54 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
731 if (!_stricmp(v35,
"TTsect_NS_W")) {
732 v55 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
736 if (!_stricmp(v35,
"TTsect_EW_N")) {
737 v56 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
741 if (!_stricmp(v35,
"TTsect_EW_S")) {
742 v57 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
743 *(
char *)v57 |= 0xAu;
746 if (!_stricmp(v35,
"TTsect_NCAP")) {
747 v58 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
748 *(
char *)v58 |= 0xBu;
751 if (!_stricmp(v35,
"TTsect_ECAP")) {
753 v59 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
754 *(
char *)v59 |= 0xCu;
757 if (!_stricmp(v35,
"TTsect_SCAP")) {
758 v60 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
759 *(
char *)v60 |= 0xDu;
762 if (!_stricmp(v35,
"TTsect_WCAP")) {
764 v61 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
765 *(
char *)v61 |= 0xEu;
768 if (!_stricmp(v35,
"TTsect_DN")) {
769 v62 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
770 *(
char *)v62 |= 0xFu;
773 if (!_stricmp(v35,
"TTsect_DS")) {
775 v63 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
776 *(
char *)v63 |= 0x10u;
779 if (!_stricmp(v35,
"TTsect_DW")) {
781 v64 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
782 *(
char *)v64 |= 0x11u;
785 if (!_stricmp(v35,
"TTsect_DE")) {
787 v65 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
788 *(
char *)v65 |= 0x12u;
791 if (!_stricmp(v35,
"TTsect_DSW")) {
793 v66 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
794 *(
char *)v66 |= 0x13u;
797 if (!_stricmp(v35,
"TTsect_DNE")) {
799 v67 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
800 *(
char *)v67 |= 0x14u;
803 if (!_stricmp(v35,
"TTsect_DSE")) {
804 v68 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
805 *(
char *)v68 |= 0x15u;
808 if (_stricmp(v35,
"TTsect_DNW"))
goto LABEL_152;
811 v69 = (int)&
v2->pTiles[
v2->sNumTiles].uSection;
812 *(
char *)v69 |= 0x16u;
Перекрестные ссылки FrameTableTxtLine::pProperties, pTiles, TileDesc::tileset, Tileset_Grass, txt_file_frametable_parser(), TileDesc::uAttributes и FrameTableTxtLine::uPropCount.
◆ sNumTiles
◆ pTiles
Объявления и описания членов структур находятся в файлах: