| 3805 | } |
| 3806 | |
| 3807 | void InitObjectGFX() |
| 3808 | { |
| 3809 | uint16_t filesWidths[65] = {}; |
| 3810 | |
| 3811 | if (IsAnyOf(currlevel, 4, 8, 12)) { |
| 3812 | filesWidths[OFILE_BKSLBRNT] = AllObjects[OBJ_STORYBOOK].animWidth; |
| 3813 | filesWidths[OFILE_CANDLE2] = AllObjects[OBJ_STORYCANDLE].animWidth; |
| 3814 | } |
| 3815 | |
| 3816 | for (const ObjectData objectData : AllObjects) { |
| 3817 | if (objectData.minlvl != 0 && currlevel >= objectData.minlvl && currlevel <= objectData.maxlvl) { |
| 3818 | if (IsAnyOf(objectData.ofindex, OFILE_TRAPHOLE, OFILE_TRAPHOLE) && leveltype == DTYPE_HELL) { |
| 3819 | continue; |
| 3820 | } |
| 3821 | |
| 3822 | filesWidths[objectData.ofindex] = objectData.animWidth; |
| 3823 | } |
| 3824 | if (objectData.otheme != THEME_NONE) { |
| 3825 | for (int j = 0; j < numthemes; j++) { |
| 3826 | if (themes[j].ttype == objectData.otheme) { |
| 3827 | filesWidths[objectData.ofindex] = objectData.animWidth; |
| 3828 | } |
| 3829 | } |
| 3830 | } |
| 3831 | |
| 3832 | if (objectData.oquest != Q_INVALID && Quests[objectData.oquest].IsAvailable()) { |
| 3833 | filesWidths[objectData.ofindex] = objectData.animWidth; |
| 3834 | } |
| 3835 | } |
| 3836 | |
| 3837 | LoadLevelObjects(filesWidths); |
| 3838 | } |
| 3839 | |
| 3840 | void FreeObjectGFX() |
| 3841 | { |
no test coverage detected