Mercurial > mm7
comparison Engine/Serialization/LegacyImages.cpp @ 2575:a76d408c5132 tip
DrawTranslucent -> DrawTextureGrayShade
Removed old texture drawing stuff
author | a.parshin |
---|---|
date | Wed, 09 Mar 2016 01:39:52 +0200 |
parents | d569340b05ff |
children |
comparison
equal
deleted
inserted
replaced
2574:dd36326a9994 | 2575:a76d408c5132 |
---|---|
1 #include "Engine/Engine.h" | 1 #include "Engine/Engine.h" |
2 #include "Engine/LOD.h" | |
2 #include "Engine/Timer.h" | 3 #include "Engine/Timer.h" |
3 #include "Engine/Party.h" | 4 #include "Engine/Party.h" |
5 #include "Engine/Tables/IconFrameTable.h" | |
4 #include "Engine/Objects/NPC.h" | 6 #include "Engine/Objects/NPC.h" |
5 #include "Engine/Graphics/Overlays.h" | 7 #include "Engine/Graphics/Overlays.h" |
6 #include "Engine/Serialization/LegacyImages.h" | 8 #include "Engine/Serialization/LegacyImages.h" |
7 | 9 |
8 NPCData_Image_MM7::NPCData_Image_MM7() | 10 NPCData_Image_MM7::NPCData_Image_MM7() |
78 } | 80 } |
79 | 81 |
80 OtherOverlayList_Image_MM7::OtherOverlayList_Image_MM7() | 82 OtherOverlayList_Image_MM7::OtherOverlayList_Image_MM7() |
81 { | 83 { |
82 Assert(sizeof(*this) == 0x3F0); | 84 Assert(sizeof(*this) == 0x3F0); |
85 memset(this, 0, sizeof(*this)); | |
86 } | |
87 | |
88 IconFrame_MM7::IconFrame_MM7() | |
89 { | |
90 Assert(sizeof(*this) == 0x20); | |
91 memset(this, 0, sizeof(*this)); | |
92 } | |
93 | |
94 UIAnimation_MM7::UIAnimation_MM7() | |
95 { | |
96 Assert(sizeof(*this) == 0xD); | |
83 memset(this, 0, sizeof(*this)); | 97 memset(this, 0, sizeof(*this)); |
84 } | 98 } |
85 | 99 |
86 | 100 |
87 | 101 |
941 player->uNumDivineInterventionCastsThisDay = this->uNumDivineInterventionCastsThisDay; | 955 player->uNumDivineInterventionCastsThisDay = this->uNumDivineInterventionCastsThisDay; |
942 player->uNumArmageddonCasts = this->uNumArmageddonCasts; | 956 player->uNumArmageddonCasts = this->uNumArmageddonCasts; |
943 player->uNumFireSpikeCasts = this->uNumFireSpikeCasts; | 957 player->uNumFireSpikeCasts = this->uNumFireSpikeCasts; |
944 player->field_1B3B = this->field_1B3B; | 958 player->field_1B3B = this->field_1B3B; |
945 } | 959 } |
960 | |
961 | |
962 | |
963 void IconFrame_MM7::Serialize(Icon *icon) | |
964 { | |
965 strcpy(pAnimationName, icon->GetAnimationName()); | |
966 uAnimLength = icon->GetAnimLength(); | |
967 | |
968 strcpy(pTextureName, icon->pTextureName); | |
969 uAnimTime = icon->GetAnimTime(); | |
970 uFlags = icon->uFlags; | |
971 | |
972 __debugbreak(); // impossible | |
973 //uTextureID = icon->uTextureID; | |
974 } | |
975 | |
976 void IconFrame_MM7::Deserialize(Icon *icon) | |
977 { | |
978 icon->SetAnimationName(this->pAnimationName); | |
979 icon->SetAnimLength(8 * this->uAnimLength); | |
980 | |
981 strcpy(icon->pTextureName, pTextureName); | |
982 icon->SetAnimTime(uAnimTime); | |
983 icon->uFlags = uFlags; | |
984 icon->texture = assets->GetImage_16BitColorKey(pIcons_LOD->pTextures[uTextureID].pName, 0x7FF); | |
985 } | |
986 | |
987 | |
988 | |
989 void UIAnimation_MM7::Serialize(UIAnimation *anim) | |
990 { | |
991 /* 000 */ uIconID = anim->icon->id; | |
992 /* 002 */ field_2 = anim->field_2; | |
993 /* 004 */ uAnimTime = anim->uAnimTime; | |
994 /* 006 */ uAnimLength = anim->uAnimLength; | |
995 /* 008 */ x = anim->x; | |
996 /* 00A */ y = anim->y; | |
997 /* 00C */ field_C = anim->field_C; | |
998 } | |
999 | |
1000 void UIAnimation_MM7::Deserialize(UIAnimation *anim) | |
1001 { | |
1002 anim->icon = pIconsFrameTable->GetIcon(uIconID); | |
1003 ///* 000 */ anim->uIconID = uIconID; | |
1004 /* 002 */ anim->field_2 = field_2; | |
1005 /* 004 */ anim->uAnimTime = uAnimTime; | |
1006 /* 006 */ anim->uAnimLength = uAnimLength; | |
1007 /* 008 */ anim->x = x; | |
1008 /* 00A */ anim->y = y; | |
1009 /* 00C */ anim->field_C = field_C; | |
1010 } |