World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
|
См. документацию.
78 if (!(uFlags & 0x0080)) {
94 for (
uint i = 0; i < 8; ++i) {
100 }
else if (uFlags & 0x10000) {
101 for (
uint i = 0; i < 8; ++i) {
106 sprintf(sprite_name,
"%s4",
108 .texture_name.c_str());
112 sprintf(sprite_name,
"%s2",
114 .texture_name.c_str());
119 sprintf(sprite_name,
"%s0",
121 .texture_name.c_str());
132 }
else if (uFlags & 0x40) {
133 strcpy(Source,
"stA");
135 auto v14 = strlen(Str);
136 strcpy(&Str[v14 - 3], Source);
137 for (
uint i = 0; i < 8; ++i) {
140 sprintf(sprite_name,
"%s0",
142 .texture_name.c_str());
145 sprintf(sprite_name,
"%s4", Str);
149 sprintf(sprite_name,
"%s3", Str);
153 sprintf(sprite_name,
"%s2",
155 .texture_name.c_str());
159 sprintf(sprite_name,
"%s1",
161 .texture_name.c_str());
173 for (
uint i = 0; i < 8; ++i) {
178 sprintf(sprite_name,
"%s7",
180 .texture_name.c_str());
183 sprintf(sprite_name,
"%s6",
185 .texture_name.c_str());
188 sprintf(sprite_name,
"%s5",
190 .texture_name.c_str());
193 sprintf(sprite_name,
"%s4",
195 .texture_name.c_str());
198 sprintf(sprite_name,
"%s3",
200 .texture_name.c_str());
203 sprintf(sprite_name,
"%s2",
205 .texture_name.c_str());
208 sprintf(sprite_name,
"%s1",
210 .texture_name.c_str());
247 if (searchResult < 0)
259 int searchRange = endPos - startPos;
260 int middleFrameIndex = startPos + (endPos - startPos) / 2;
261 int comparisonResult = _stricmp(pSpriteName, this->
pSpritePFrames[middleFrameIndex]->icon_name.c_str());
262 if (!comparisonResult) {
263 return middleFrameIndex;
265 if (startPos == endPos) {
268 if (comparisonResult >= 0) {
269 startPos += std::max(((endPos - startPos) / 2), 1);
271 endPos = std::max(((endPos - startPos) / 2), 1) + startPos;
278 unsigned int uTime) {
324 for (i = (
char *)&v4->
uAnimTime;; i += 60) {
326 if (v9 <= v11)
break;
338 FILE *file = fopen(
"data\\dsft.bin",
"wb");
339 if (file ==
nullptr) {
340 Error(
"Unable to save dsft.bin!");
353 this->icon_name.begin(), ::tolower);
357 this->texture_name.begin(), ::tolower);
359 for (
unsigned int i = 0; i < 8; ++i) {
380 uint num_mm6_frames = 0;
381 uint num_mm6_eframes = 0;
383 num_mm6_frames = *(
int *)data_mm6;
384 num_mm6_eframes = *((
int *)data_mm6 + 1);
387 uint num_mm7_frames = 0;
388 uint num_mm7_eframes = 0;
390 num_mm7_frames = *(
int *)data_mm7;
391 num_mm7_eframes = *((
int *)data_mm7 + 1);
394 uint num_mm8_frames = 0;
395 uint num_mm8_eframes = 0;
397 num_mm8_frames = *(
int *)data_mm8;
398 num_mm8_eframes = *((
int *)data_mm8 + 1);
419 2 * num_mm7_eframes);
443 i < num_mm7_eframes ; ++i)
449 unsigned __int16 *
v3;
466 unsigned __int16 *v20;
587 (
signed __int16)*v20;
687 assert(month >= 0 && month < 12);
SpriteFrame * GetFrameBy_x(unsigned int uSpriteID, signed int a3)
SpriteFrame * LevelDecorationChangeSeason(DecorationDesc *desc, int t, int month)
std::array< LevelDecoration, 3000 > pLevelDecorations
DecorationDesc * GetDecoration(unsigned int index)
GLenum GLenum GLenum GLenum GLenum scale
struct SpriteFrameTable * pSpriteFrameTable
LODFile_Sprites * pSprites_LOD
int LoadPalette(unsigned int uPaletteID)
int LoadSprite(const char *pContainerName, unsigned int uPaletteID)
int BinarySearch(const char *pSpriteName)
EGLSurface EGLint EGLint y
void FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
@ LEVEL_DECORATION_INVISIBLE
SpriteFrame * GetFrame(unsigned int uSpriteID, unsigned int uTime)
void ResetSomeSpriteFlags()
void Warning(const wchar_t *pFormat,...)
__int64 fixpoint_mul(int a1, int a2)
SpriteFrame * pSpriteSFrames
void _46E26D_collide_against_sprites(int a1, int a2)
PaletteManager * pPaletteManager
void InitializeSprite(signed int uSpriteID)
uint16_t uDecorationDescID
GLuint GLenum GLenum transform
int FastFindSprite(const char *pSpriteName)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLfloat GLfloat GLfloat v2
int integer_sqrt(int val)
GLfloat GLfloat GLfloat GLfloat v3
void __cdecl __debugbreak(void)
uint16_t uDecorationHeight
SpriteFrame ** pSpritePFrames
Sprite * pHardwareSprites
stru141_actor_collision_object stru_721530
OutdoorLocation * pOutdoor
bool Deserialize(const struct SpriteFrame_MM7 *)
struct DecorationList * pDecorationList