------------------------------------------------------------------------------------------------ Parse the skeleton section of the file
| 804 | // ------------------------------------------------------------------------------------------------ |
| 805 | // Parse the skeleton section of the file |
| 806 | void SMDImporter::ParseSkeletonSection(const char *szCurrent, const char **szCurrentOut, const char *end) { |
| 807 | int iTime = 0; |
| 808 | for ( ;; ) { |
| 809 | if (!SkipSpacesAndLineEnd(szCurrent,&szCurrent, end)) { |
| 810 | break; |
| 811 | } |
| 812 | |
| 813 | // "end\n" - Ends the skeleton section |
| 814 | if (TokenMatch(szCurrent,"end",3)) { |
| 815 | break; |
| 816 | } else if (TokenMatch(szCurrent,"time",4)) { |
| 817 | // "time <n>\n" - Specifies the current animation frame |
| 818 | if (!ParseSignedInt(szCurrent, &szCurrent, end, iTime)) { |
| 819 | break; |
| 820 | } |
| 821 | |
| 822 | iSmallestFrame = std::min(iSmallestFrame,iTime); |
| 823 | SkipLine(szCurrent, &szCurrent, end); |
| 824 | } else { |
| 825 | ParseSkeletonElement(szCurrent, &szCurrent, end, iTime); |
| 826 | } |
| 827 | } |
| 828 | *szCurrentOut = szCurrent; |
| 829 | } |
| 830 | |
| 831 | // ------------------------------------------------------------------------------------------------ |
| 832 | #define SMDI_PARSE_RETURN { \ |
nothing calls this directly
no test coverage detected