Mercurial > mm7
comparison mm7_4.cpp @ 763:a84db04439a4
Merge
author | Nomad |
---|---|
date | Sat, 23 Mar 2013 19:47:18 +0200 |
parents | cf2fbac6edc9 f24fb0d64a5c |
children | 777c42590ffc a464d28566a6 |
comparison
equal
deleted
inserted
replaced
762:cf2fbac6edc9 | 763:a84db04439a4 |
---|---|
1518 while ( v2 ); | 1518 while ( v2 ); |
1519 } | 1519 } |
1520 // 4EC3EC: using guessed type Edge defaultEdge; | 1520 // 4EC3EC: using guessed type Edge defaultEdge; |
1521 | 1521 |
1522 | 1522 |
1523 | |
1524 | |
1525 //----- (00487E1D) -------------------------------------------------------- | |
1526 TileTable::~TileTable() | |
1527 { | |
1528 if ( this->pTiles ) | |
1529 { | |
1530 pAllocator->FreeChunk(this->pTiles); | |
1531 pTiles = nullptr; | |
1532 } | |
1533 uNumTiles = 0; | |
1534 } | |
1535 | |
1536 //----- (00487E3B) -------------------------------------------------------- | |
1537 TileDesc *TileTable::GetTileById(unsigned int uTileID) | |
1538 { | |
1539 /*TileDesc *result; // eax@3 | |
1540 | |
1541 if ( (uTileID & 0x80000000u) != 0 || (signed int)uTileID > (signed int)(this->uNumTiles - 1) ) | |
1542 result = this->pTiles; | |
1543 else | |
1544 result = &this->pTiles[uTileID]; | |
1545 return result;*/ | |
1546 | |
1547 assert(uTileID < uNumTiles); | |
1548 return &pTiles[uTileID]; | |
1549 } | |
1550 | |
1551 //----- (00487E58) -------------------------------------------------------- | |
1552 void TileTable::InitializeTileset(Tileset tileset) | |
1553 { | |
1554 TileTable *v2; // edi@1 | |
1555 int v3; // ebx@1 | |
1556 TileDesc *v4; // eax@2 | |
1557 signed int i; // [sp+8h] [bp-4h]@1 | |
1558 | |
1559 v2 = this; | |
1560 v3 = 0; | |
1561 for ( i = 0; i < (signed int)v2->uNumTiles; ++v3 ) | |
1562 { | |
1563 v4 = &v2->pTiles[v3]; | |
1564 if (v4->tileset == tileset && v4->pTileName[0] ) | |
1565 { | |
1566 v2->pTiles[v3].uBitmapID = pBitmaps_LOD->LoadTexture(v4->pTileName); | |
1567 if ( v2->pTiles[v3].uBitmapID != -1 ) | |
1568 pBitmaps_LOD->pTextures[v2->pTiles[v3].uBitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[v2->pTiles[v3].uBitmapID].palette_id1); | |
1569 } | |
1570 ++i; | |
1571 } | |
1572 } | |
1573 | |
1574 //----- (00487ED6) -------------------------------------------------------- | |
1575 int TileTable::method_487ED6(signed int a1, int a2) | |
1576 { | |
1577 int v3; // esi@1 | |
1578 TileTable *v4; // edi@1 | |
1579 int v5; // edx@3 | |
1580 int v6; // edx@11 | |
1581 unsigned int v8; // [sp-4h] [bp-10h]@4 | |
1582 | |
1583 v3 = 0; | |
1584 v4 = this; | |
1585 if ( a1 > 8 ) | |
1586 { | |
1587 v8 = 0; | |
1588 return v4->GetTileId(a1, v8); | |
1589 } | |
1590 if ( a2 || (v5 = rand() % 50, v5 < 20) ) | |
1591 { | |
1592 v8 = 0; | |
1593 return v4->GetTileId(a1, v8); | |
1594 } | |
1595 if ( v5 < 30 ) | |
1596 { | |
1597 v8 = 1; | |
1598 return v4->GetTileId(a1, v8); | |
1599 } | |
1600 if ( v5 < 40 ) | |
1601 { | |
1602 v8 = 2; | |
1603 return v4->GetTileId(a1, v8); | |
1604 } | |
1605 if ( v5 < 48 ) | |
1606 { | |
1607 v8 = 3; | |
1608 return v4->GetTileId(a1, v8); | |
1609 } | |
1610 v6 = rand() % 8; | |
1611 if ( !v6 ) | |
1612 { | |
1613 v8 = 4; | |
1614 return v4->GetTileId(a1, v8); | |
1615 } | |
1616 if ( v6 == 1 ) | |
1617 { | |
1618 v8 = 5; | |
1619 return v4->GetTileId(a1, v8); | |
1620 } | |
1621 if ( v6 == 2 ) | |
1622 { | |
1623 v8 = 6; | |
1624 return v4->GetTileId(a1, v8); | |
1625 } | |
1626 if ( v6 == 3 ) | |
1627 { | |
1628 v8 = 7; | |
1629 return v4->GetTileId(a1, v8); | |
1630 } | |
1631 if ( v6 == 4 ) | |
1632 { | |
1633 v8 = 8; | |
1634 return v4->GetTileId(a1, v8); | |
1635 } | |
1636 if ( v6 == 5 ) | |
1637 { | |
1638 v8 = 9; | |
1639 return v4->GetTileId(a1, v8); | |
1640 } | |
1641 if ( v6 == 6 ) | |
1642 { | |
1643 v8 = 10; | |
1644 return v4->GetTileId(a1, v8); | |
1645 } | |
1646 if ( v6 == 7 ) | |
1647 { | |
1648 v8 = 11; | |
1649 return v4->GetTileId(a1, v8); | |
1650 } | |
1651 return v3; | |
1652 } | |
1653 | |
1654 //----- (00487F84) -------------------------------------------------------- | |
1655 unsigned int TileTable::GetTileId(unsigned int uTerrainType, unsigned int uSection) | |
1656 { | |
1657 unsigned int v3; // edx@1 | |
1658 unsigned int result; // eax@1 | |
1659 unsigned __int16 *v5; // ecx@2 | |
1660 | |
1661 v3 = this->uNumTiles; | |
1662 result = 0; | |
1663 if ( (signed int)this->uNumTiles <= 0 ) | |
1664 { | |
1665 LABEL_6: | |
1666 result = 0; | |
1667 } | |
1668 else | |
1669 { | |
1670 v5 = &this->pTiles->uSection; | |
1671 while ( (signed __int16)*(v5 - 1) != uTerrainType || (signed __int16)*v5 != uSection ) | |
1672 { | |
1673 ++result; | |
1674 v5 += 13; | |
1675 if ( (signed int)result >= (signed int)v3 ) | |
1676 goto LABEL_6; | |
1677 } | |
1678 } | |
1679 return result; | |
1680 } | |
1681 | |
1682 //----- (00487FB4) -------------------------------------------------------- | |
1683 void TileTable::ToFile() | |
1684 { | |
1685 TileTable *v1; // esi@1 | |
1686 FILE *v2; // eax@1 | |
1687 FILE *v3; // edi@1 | |
1688 | |
1689 auto Str = this; | |
1690 | |
1691 v1 = Str; | |
1692 v2 = fopen("data\\dtile.bin", "wb"); | |
1693 v3 = v2; | |
1694 if ( !v2 ) | |
1695 Abortf("Unable to save dtile.bin!"); | |
1696 fwrite(v1, 4u, 1u, v2); | |
1697 fwrite(v1->pTiles, 0x1Au, v1->uNumTiles, v3); | |
1698 fclose(v3); | |
1699 } | |
1700 | |
1701 //----- (00488000) -------------------------------------------------------- | |
1702 void TileTable::FromFile(void *pSerialized) | |
1703 { | |
1704 uNumTiles = *(int *)pSerialized; | |
1705 pTiles = (TileDesc *)pAllocator->AllocNamedChunk(pTiles, 26 * uNumTiles, "Tile Descrip"); | |
1706 memcpy(pTiles, (char *)pSerialized + 4, 26 * uNumTiles); | |
1707 } | |
1708 | |
1709 //----- (00488047) -------------------------------------------------------- | |
1710 int TileTable::FromFileTxt(const char *pFilename) | |
1711 { | |
1712 TileTable *v2; // ebp@1 | |
1713 FILE *v3; // eax@1 | |
1714 unsigned int v4; // ebx@3 | |
1715 void *v5; // eax@9 | |
1716 unsigned __int16 v6; // ax@14 | |
1717 const char *v7; // ST14_4@14 | |
1718 unsigned __int16 v8; // ax@14 | |
1719 const char *v9; // esi@14 | |
1720 int v10; // eax@17 | |
1721 int v11; // eax@20 | |
1722 int v12; // eax@22 | |
1723 int v13; // eax@24 | |
1724 int v14; // eax@26 | |
1725 int v15; // eax@28 | |
1726 int v16; // eax@30 | |
1727 int v17; // eax@32 | |
1728 int v18; // eax@34 | |
1729 int v19; // eax@36 | |
1730 int v20; // eax@38 | |
1731 int v21; // eax@40 | |
1732 int v22; // eax@42 | |
1733 int v23; // eax@44 | |
1734 int v24; // eax@46 | |
1735 int v25; // eax@48 | |
1736 int v26; // eax@50 | |
1737 int v27; // eax@52 | |
1738 int v28; // eax@54 | |
1739 int v29; // eax@56 | |
1740 int v30; // eax@58 | |
1741 int v31; // eax@60 | |
1742 int v32; // eax@62 | |
1743 int v33; // eax@64 | |
1744 int v34; // eax@66 | |
1745 const char *v35; // esi@67 | |
1746 int v36; // eax@70 | |
1747 int v37; // eax@73 | |
1748 int v38; // eax@75 | |
1749 int v39; // eax@77 | |
1750 int v40; // eax@79 | |
1751 int v41; // eax@81 | |
1752 int v42; // eax@83 | |
1753 int v43; // eax@85 | |
1754 int v44; // eax@87 | |
1755 int v45; // eax@89 | |
1756 int v46; // eax@91 | |
1757 int v47; // eax@93 | |
1758 int v48; // eax@108 | |
1759 int v49; // eax@110 | |
1760 int v50; // eax@112 | |
1761 int v51; // eax@114 | |
1762 int v52; // eax@116 | |
1763 int v53; // eax@118 | |
1764 int v54; // eax@120 | |
1765 int v55; // eax@122 | |
1766 int v56; // eax@124 | |
1767 int v57; // eax@126 | |
1768 int v58; // eax@128 | |
1769 int v59; // eax@130 | |
1770 int v60; // eax@132 | |
1771 int v61; // eax@134 | |
1772 int v62; // eax@136 | |
1773 int v63; // eax@138 | |
1774 int v64; // eax@140 | |
1775 int v65; // eax@142 | |
1776 int v66; // eax@144 | |
1777 int v67; // eax@146 | |
1778 int v68; // eax@148 | |
1779 int v69; // eax@150 | |
1780 int v70; // eax@151 | |
1781 int j; // edi@152 | |
1782 const char *v72; // esi@153 | |
1783 int v73; // eax@154 | |
1784 int v74; // eax@156 | |
1785 int v75; // eax@160 | |
1786 int v76; // eax@162 | |
1787 int v77; // eax@164 | |
1788 int v78; // eax@166 | |
1789 int v79; // eax@168 | |
1790 int v80; // eax@170 | |
1791 FILE *i; // [sp-10h] [bp-304h]@3 | |
1792 FILE *File; // [sp+4h] [bp-2F0h]@1 | |
1793 FrameTableTxtLine v84; // [sp+8h] [bp-2ECh]@4 | |
1794 FrameTableTxtLine v85; // [sp+84h] [bp-270h]@4 | |
1795 char Buf; // [sp+100h] [bp-1F4h]@4 | |
1796 | |
1797 v2 = this; | |
1798 v3 = fopen(pFilename, "r"); | |
1799 File = v3; | |
1800 if ( !v3 ) | |
1801 Abortf("TileTable::load - Unable to open file: %s."); | |
1802 v4 = 0; | |
1803 for ( i = v3; fgets(&Buf, 490, i); i = File ) | |
1804 { | |
1805 *strchr(&Buf, 10) = 0; | |
1806 memcpy(&v84, txt_file_frametable_parser(&Buf, &v85), sizeof(v84)); | |
1807 if ( v84.uPropCount && *v84.pProperties[0] != 47 ) | |
1808 ++v4; | |
1809 } | |
1810 v2->uNumTiles = v4; | |
1811 v5 = pAllocator->AllocNamedChunk(v2->pTiles, 26 * v4, "Tile Descrip"); | |
1812 v2->pTiles = (TileDesc *)v5; | |
1813 if ( !v5 ) | |
1814 Abortf("TileTable::Load - Out of Memory!"); | |
1815 memset(v5, 0, 26 * v2->uNumTiles); | |
1816 v2->uNumTiles = 0; | |
1817 fseek(File, 0, 0); | |
1818 if ( fgets(&Buf, 490, File) ) | |
1819 { | |
1820 while ( 1 ) | |
1821 { | |
1822 *strchr(&Buf, 10) = 0; | |
1823 memcpy(&v84, txt_file_frametable_parser(&Buf, &v85), sizeof(v84)); | |
1824 if ( v84.uPropCount ) | |
1825 { | |
1826 if ( *v84.pProperties[0] != 47 ) | |
1827 break; | |
1828 } | |
1829 LABEL_173: | |
1830 if ( !fgets(&Buf, 490, File) ) | |
1831 goto LABEL_174; | |
1832 } | |
1833 strcpy(v2->pTiles[v2->uNumTiles].pTileName, v84.pProperties[0]); | |
1834 v6 = atoi(v84.pProperties[1]); | |
1835 v7 = v84.pProperties[2]; | |
1836 v2->pTiles[v2->uNumTiles].uTileID = v6; | |
1837 v8 = atoi(v7); | |
1838 v9 = v84.pProperties[3]; | |
1839 v2->pTiles[v2->uNumTiles].uBitmapID = v8; | |
1840 v2->pTiles[v2->uNumTiles].tileset = Tileset_Grass; | |
1841 if ( _strcmpi(v9, "TTtype_NULL") ) | |
1842 { | |
1843 if ( _strcmpi(v9, "TTtype_Start") ) | |
1844 { | |
1845 if ( _strcmpi(v9, "TTtype_Grass") ) | |
1846 { | |
1847 if ( _strcmpi(v9, "TTtype_Cracked") ) | |
1848 { | |
1849 if ( _strcmpi(v9, "TTtype_Snow") ) | |
1850 { | |
1851 if ( _strcmpi(v9, "TTtype_Sand") ) | |
1852 { | |
1853 if ( _strcmpi(v9, "TTtype_Volcano") ) | |
1854 { | |
1855 if ( _strcmpi(v9, "TTtype_Dirt") ) | |
1856 { | |
1857 if ( _strcmpi(v9, "TTtype_Water") ) | |
1858 { | |
1859 if ( _strcmpi(v9, "TTtype_Tropical") ) | |
1860 { | |
1861 if ( _strcmpi(v9, "TTtype_Swamp") ) | |
1862 { | |
1863 if ( _strcmpi(v9, "TTtype_City") ) | |
1864 { | |
1865 if ( _strcmpi(v9, "TTtype_RoadGrassCobble") ) | |
1866 { | |
1867 if ( _strcmpi(v9, "TTtype_RoadGrassDirt") ) | |
1868 { | |
1869 if ( _strcmpi(v9, "TTtype_RoadCrackedCobble") ) | |
1870 { | |
1871 if ( _strcmpi(v9, "TTtype_RoadCrackedDirt") ) | |
1872 { | |
1873 if ( _strcmpi(v9, "TTtype_RoadSandCobble") ) | |
1874 { | |
1875 if ( _strcmpi(v9, "TTtype_RoadSandDirt") ) | |
1876 { | |
1877 if ( _strcmpi(v9, "TTtype_RoadVolcanoCobble") ) | |
1878 { | |
1879 if ( _strcmpi(v9, "TTtype_RoadVolcanoDirt") ) | |
1880 { | |
1881 if ( _strcmpi(v9, "TTtype_RoadSwampCobble") ) | |
1882 { | |
1883 if ( _strcmpi(v9, "TTtype_RoadSwampDirt") ) | |
1884 { | |
1885 if ( _strcmpi(v9, "TTtype_RoadTropicalCobble") ) | |
1886 { | |
1887 if ( _strcmpi(v9, "TTtype_RoadTropicalDirt") ) | |
1888 { | |
1889 if ( _strcmpi(v9, "TTtype_RoadSnowCobble") ) | |
1890 { | |
1891 if ( _strcmpi(v9, "TTtype_RoadSnowDirt") ) | |
1892 { | |
1893 if ( !_strcmpi(v9, "TTtype_RoadCityStone") ) | |
1894 { | |
1895 v34 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1896 *(char *)v34 |= 0x1Cu; | |
1897 } | |
1898 } | |
1899 else | |
1900 { | |
1901 v33 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1902 *(char *)v33 |= 0xDu; | |
1903 } | |
1904 } | |
1905 else | |
1906 { | |
1907 v32 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1908 *(char *)v32 |= 0xCu; | |
1909 } | |
1910 } | |
1911 else | |
1912 { | |
1913 v31 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1914 *(char *)v31 |= 0x1Bu; | |
1915 } | |
1916 } | |
1917 else | |
1918 { | |
1919 v30 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1920 *(char *)v30 |= 0x1Au; | |
1921 } | |
1922 } | |
1923 else | |
1924 { | |
1925 v29 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1926 *(char *)v29 |= 0x19u; | |
1927 } | |
1928 } | |
1929 else | |
1930 { | |
1931 v28 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1932 *(char *)v28 |= 0x18u; | |
1933 } | |
1934 } | |
1935 else | |
1936 { | |
1937 v27 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1938 *(char *)v27 |= 0x11u; | |
1939 } | |
1940 } | |
1941 else | |
1942 { | |
1943 v26 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1944 *(char *)v26 |= 0x10u; | |
1945 } | |
1946 } | |
1947 else | |
1948 { | |
1949 v25 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1950 *(char *)v25 |= 0xFu; | |
1951 } | |
1952 } | |
1953 else | |
1954 { | |
1955 v24 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1956 *(char *)v24 |= 0xEu; | |
1957 } | |
1958 } | |
1959 else | |
1960 { | |
1961 v23 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1962 *(char *)v23 |= 0x17u; | |
1963 } | |
1964 } | |
1965 else | |
1966 { | |
1967 v22 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1968 *(char *)v22 |= 0x16u; | |
1969 } | |
1970 } | |
1971 else | |
1972 { | |
1973 v21 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1974 *(char *)v21 |= 0xBu; | |
1975 } | |
1976 } | |
1977 else | |
1978 { | |
1979 v20 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1980 *(char *)v20 |= 0xAu; | |
1981 } | |
1982 } | |
1983 else | |
1984 { | |
1985 v19 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1986 *(char *)v19 |= 9u; | |
1987 } | |
1988 } | |
1989 else | |
1990 { | |
1991 v18 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1992 *(char *)v18 |= 7u; | |
1993 } | |
1994 } | |
1995 else | |
1996 { | |
1997 v17 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
1998 *(char *)v17 |= 8u; | |
1999 } | |
2000 } | |
2001 else | |
2002 { | |
2003 v16 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
2004 *(char *)v16 |= 5u; | |
2005 } | |
2006 } | |
2007 else | |
2008 { | |
2009 v15 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
2010 *(char *)v15 |= 4u; | |
2011 } | |
2012 } | |
2013 else | |
2014 { | |
2015 v14 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
2016 *(char *)v14 |= 3u; | |
2017 } | |
2018 } | |
2019 else | |
2020 { | |
2021 v13 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
2022 *(char *)v13 |= 2u; | |
2023 } | |
2024 } | |
2025 else | |
2026 { | |
2027 v12 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
2028 *(char *)v12 |= 1u; | |
2029 } | |
2030 } | |
2031 else | |
2032 { | |
2033 v11 = (int)&v2->pTiles[v2->uNumTiles].tileset; | |
2034 *(char *)v11 |= 6u; | |
2035 } | |
2036 } | |
2037 } | |
2038 else | |
2039 { | |
2040 v10 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2041 *(char *)v10 |= 0xFEu; | |
2042 } | |
2043 } | |
2044 else | |
2045 { | |
2046 LOBYTE(v2->pTiles[v2->uNumTiles].tileset) = -1; | |
2047 } | |
2048 v35 = v84.pProperties[4]; | |
2049 v2->pTiles[v2->uNumTiles].uSection = 0; | |
2050 v2->pTiles[v2->uNumTiles].uAttributes = 0; | |
2051 if ( !_strcmpi(v35, "TTsect_NULL") ) | |
2052 { | |
2053 LOBYTE(v2->pTiles[v2->uNumTiles].uSection) = -1; | |
2054 LABEL_152: | |
2055 for ( j = 5; j < v84.uPropCount; ++j ) | |
2056 { | |
2057 v72 = v84.pProperties[j]; | |
2058 if ( _strcmpi(v84.pProperties[j], "TTattr_Burn") ) | |
2059 { | |
2060 if ( _strcmpi(v72, "TTattr_Water") ) | |
2061 { | |
2062 if ( _strcmpi(v72, "TTattr_Water2") ) | |
2063 { | |
2064 if ( _strcmpi(v72, "TTattr_Block") ) | |
2065 { | |
2066 if ( _strcmpi(v72, "TTattr_Repulse") ) | |
2067 { | |
2068 if ( _strcmpi(v72, "TTattr_Flat") ) | |
2069 { | |
2070 if ( _strcmpi(v72, "TTattr_Wave") ) | |
2071 { | |
2072 if ( _strcmpi(v72, "TTattr_NoDraw") ) | |
2073 { | |
2074 if ( !_strcmpi(v72, "TTattr_Transition") ) | |
2075 { | |
2076 v80 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2077 *(short *)v80 |= 0x200u; | |
2078 } | |
2079 } | |
2080 else | |
2081 { | |
2082 v79 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2083 *(char *)v79 |= 0x40u; | |
2084 } | |
2085 } | |
2086 else | |
2087 { | |
2088 v78 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2089 *(char *)v78 |= 0x20u; | |
2090 } | |
2091 } | |
2092 else | |
2093 { | |
2094 v77 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2095 *(char *)v77 |= 0x10u; | |
2096 } | |
2097 } | |
2098 else | |
2099 { | |
2100 v76 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2101 *(char *)v76 |= 8u; | |
2102 } | |
2103 } | |
2104 else | |
2105 { | |
2106 v75 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2107 *(char *)v75 |= 4u; | |
2108 } | |
2109 } | |
2110 else | |
2111 { | |
2112 HIBYTE(v2->pTiles[v2->uNumTiles].uAttributes) |= 1u; | |
2113 } | |
2114 } | |
2115 else | |
2116 { | |
2117 v74 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2118 *(char *)v74 |= 2u; | |
2119 } | |
2120 } | |
2121 else | |
2122 { | |
2123 v73 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2124 *(char *)v73 |= 1u; | |
2125 } | |
2126 } | |
2127 ++v2->uNumTiles; | |
2128 goto LABEL_173; | |
2129 } | |
2130 if ( !_strcmpi(v35, "TTsect_Start") ) | |
2131 { | |
2132 v36 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2133 *(char *)v36 |= 0xFEu; | |
2134 goto LABEL_152; | |
2135 } | |
2136 if ( !_strcmpi(v35, "TTsect_Base1") ) | |
2137 goto LABEL_152; | |
2138 if ( !_strcmpi(v35, "TTsect_Base2") ) | |
2139 { | |
2140 v37 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2141 *(char *)v37 |= 1u; | |
2142 goto LABEL_152; | |
2143 } | |
2144 if ( !_strcmpi(v35, "TTsect_Base3") ) | |
2145 { | |
2146 v38 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2147 *(char *)v38 |= 2u; | |
2148 goto LABEL_152; | |
2149 } | |
2150 if ( !_strcmpi(v35, "TTsect_Base4") ) | |
2151 { | |
2152 v39 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2153 *(char *)v39 |= 3u; | |
2154 goto LABEL_152; | |
2155 } | |
2156 if ( !_strcmpi(v35, "TTsect_Special1") ) | |
2157 { | |
2158 v40 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2159 *(char *)v40 |= 4u; | |
2160 goto LABEL_152; | |
2161 } | |
2162 if ( !_strcmpi(v35, "TTsect_Special2") ) | |
2163 { | |
2164 v41 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2165 *(char *)v41 |= 5u; | |
2166 goto LABEL_152; | |
2167 } | |
2168 if ( !_strcmpi(v35, "TTsect_Special3") ) | |
2169 { | |
2170 v42 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2171 *(char *)v42 |= 6u; | |
2172 goto LABEL_152; | |
2173 } | |
2174 if ( !_strcmpi(v35, "TTsect_Special4") ) | |
2175 { | |
2176 v43 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2177 *(char *)v43 |= 7u; | |
2178 goto LABEL_152; | |
2179 } | |
2180 if ( !_strcmpi(v35, "TTsect_Special5") ) | |
2181 { | |
2182 v44 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2183 *(char *)v44 |= 8u; | |
2184 goto LABEL_152; | |
2185 } | |
2186 if ( !_strcmpi(v35, "TTsect_Special6") ) | |
2187 { | |
2188 v45 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2189 *(char *)v45 |= 9u; | |
2190 goto LABEL_152; | |
2191 } | |
2192 if ( !_strcmpi(v35, "TTsect_Special7") ) | |
2193 { | |
2194 v46 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2195 *(char *)v46 |= 0xAu; | |
2196 goto LABEL_152; | |
2197 } | |
2198 if ( !_strcmpi(v35, "TTsect_Special8") ) | |
2199 { | |
2200 v47 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2201 *(char *)v47 |= 0xBu; | |
2202 goto LABEL_152; | |
2203 } | |
2204 if ( !_strcmpi(v35, "TTsect_NE1") ) | |
2205 goto LABEL_130; | |
2206 if ( !_strcmpi(v35, "TTsect_NW1") ) | |
2207 goto LABEL_134; | |
2208 if ( !_strcmpi(v35, "TTsect_SE1") ) | |
2209 goto LABEL_130; | |
2210 if ( !_strcmpi(v35, "TTsect_SW1") ) | |
2211 goto LABEL_134; | |
2212 if ( !_strcmpi(v35, "TTsect_E1") ) | |
2213 goto LABEL_138; | |
2214 if ( !_strcmpi(v35, "TTsect_W1") ) | |
2215 goto LABEL_140; | |
2216 if ( !_strcmpi(v35, "TTsect_N1") ) | |
2217 goto LABEL_142; | |
2218 if ( !_strcmpi(v35, "TTsect_S1") ) | |
2219 goto LABEL_144; | |
2220 if ( !_strcmpi(v35, "TTsect_XNE1") ) | |
2221 goto LABEL_146; | |
2222 if ( _strcmpi(v35, "TTsect_XNW1") ) | |
2223 { | |
2224 if ( !_strcmpi(v35, "TTsect_XSE1") ) | |
2225 goto LABEL_146; | |
2226 if ( _strcmpi(v35, "TTsect_XSW1") ) | |
2227 { | |
2228 if ( !_strcmpi(v35, "TTsect_CROS") ) | |
2229 { | |
2230 LABEL_151: | |
2231 v70 = (int)&v2->pTiles[v2->uNumTiles].uAttributes; | |
2232 *(short *)v70 |= 0x200u; | |
2233 goto LABEL_152; | |
2234 } | |
2235 if ( !_strcmpi(v35, "TTsect_NS") ) | |
2236 { | |
2237 v48 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2238 *(char *)v48 |= 1u; | |
2239 goto LABEL_151; | |
2240 } | |
2241 if ( !_strcmpi(v35, "TTsect_EW") ) | |
2242 { | |
2243 v49 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2244 *(char *)v49 |= 2u; | |
2245 goto LABEL_151; | |
2246 } | |
2247 if ( !_strcmpi(v35, "TTsect_N_E") ) | |
2248 { | |
2249 v50 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2250 *(char *)v50 |= 3u; | |
2251 goto LABEL_151; | |
2252 } | |
2253 if ( !_strcmpi(v35, "TTsect_N_W") ) | |
2254 { | |
2255 v51 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2256 *(char *)v51 |= 4u; | |
2257 goto LABEL_151; | |
2258 } | |
2259 if ( !_strcmpi(v35, "TTsect_S_E") ) | |
2260 { | |
2261 v52 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2262 *(char *)v52 |= 5u; | |
2263 goto LABEL_151; | |
2264 } | |
2265 if ( !_strcmpi(v35, "TTsect_S_W") ) | |
2266 { | |
2267 v53 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2268 *(char *)v53 |= 6u; | |
2269 goto LABEL_151; | |
2270 } | |
2271 if ( !_strcmpi(v35, "TTsect_NS_E") ) | |
2272 { | |
2273 v54 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2274 *(char *)v54 |= 7u; | |
2275 goto LABEL_151; | |
2276 } | |
2277 if ( !_strcmpi(v35, "TTsect_NS_W") ) | |
2278 { | |
2279 v55 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2280 *(char *)v55 |= 8u; | |
2281 goto LABEL_151; | |
2282 } | |
2283 if ( !_strcmpi(v35, "TTsect_EW_N") ) | |
2284 { | |
2285 v56 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2286 *(char *)v56 |= 9u; | |
2287 goto LABEL_151; | |
2288 } | |
2289 if ( !_strcmpi(v35, "TTsect_EW_S") ) | |
2290 { | |
2291 v57 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2292 *(char *)v57 |= 0xAu; | |
2293 goto LABEL_151; | |
2294 } | |
2295 if ( !_strcmpi(v35, "TTsect_NCAP") ) | |
2296 { | |
2297 v58 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2298 *(char *)v58 |= 0xBu; | |
2299 goto LABEL_151; | |
2300 } | |
2301 if ( !_strcmpi(v35, "TTsect_ECAP") ) | |
2302 { | |
2303 LABEL_130: | |
2304 v59 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2305 *(char *)v59 |= 0xCu; | |
2306 goto LABEL_151; | |
2307 } | |
2308 if ( !_strcmpi(v35, "TTsect_SCAP") ) | |
2309 { | |
2310 v60 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2311 *(char *)v60 |= 0xDu; | |
2312 goto LABEL_151; | |
2313 } | |
2314 if ( !_strcmpi(v35, "TTsect_WCAP") ) | |
2315 { | |
2316 LABEL_134: | |
2317 v61 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2318 *(char *)v61 |= 0xEu; | |
2319 goto LABEL_151; | |
2320 } | |
2321 if ( !_strcmpi(v35, "TTsect_DN") ) | |
2322 { | |
2323 v62 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2324 *(char *)v62 |= 0xFu; | |
2325 goto LABEL_151; | |
2326 } | |
2327 if ( !_strcmpi(v35, "TTsect_DS") ) | |
2328 { | |
2329 LABEL_138: | |
2330 v63 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2331 *(char *)v63 |= 0x10u; | |
2332 goto LABEL_151; | |
2333 } | |
2334 if ( !_strcmpi(v35, "TTsect_DW") ) | |
2335 { | |
2336 LABEL_140: | |
2337 v64 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2338 *(char *)v64 |= 0x11u; | |
2339 goto LABEL_151; | |
2340 } | |
2341 if ( !_strcmpi(v35, "TTsect_DE") ) | |
2342 { | |
2343 LABEL_142: | |
2344 v65 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2345 *(char *)v65 |= 0x12u; | |
2346 goto LABEL_151; | |
2347 } | |
2348 if ( !_strcmpi(v35, "TTsect_DSW") ) | |
2349 { | |
2350 LABEL_144: | |
2351 v66 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2352 *(char *)v66 |= 0x13u; | |
2353 goto LABEL_151; | |
2354 } | |
2355 if ( !_strcmpi(v35, "TTsect_DNE") ) | |
2356 { | |
2357 LABEL_146: | |
2358 v67 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2359 *(char *)v67 |= 0x14u; | |
2360 goto LABEL_151; | |
2361 } | |
2362 if ( !_strcmpi(v35, "TTsect_DSE") ) | |
2363 { | |
2364 v68 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2365 *(char *)v68 |= 0x15u; | |
2366 goto LABEL_151; | |
2367 } | |
2368 if ( _strcmpi(v35, "TTsect_DNW") ) | |
2369 goto LABEL_152; | |
2370 } | |
2371 } | |
2372 v69 = (int)&v2->pTiles[v2->uNumTiles].uSection; | |
2373 *(char *)v69 |= 0x16u; | |
2374 goto LABEL_151; | |
2375 } | |
2376 LABEL_174: | |
2377 fclose(File); | |
2378 return 1; | |
2379 } | |
2380 | 1523 |
2381 | 1524 |
2382 | 1525 |
2383 //----- (0048958E) -------------------------------------------------------- | 1526 //----- (0048958E) -------------------------------------------------------- |
2384 stru12_MemoryBlock::stru12_MemoryBlock(int a2) | 1527 stru12_MemoryBlock::stru12_MemoryBlock(int a2) |