Merge branch 'master' from Windows
This commit is contained in:
@@ -296,9 +296,10 @@ void cPlayer::writeTo(std::ostream& file) const {
|
|||||||
file << "EXPERIENCE " << experience << '\n';
|
file << "EXPERIENCE " << experience << '\n';
|
||||||
file << "SKILLPTS " << skill_pts << '\n';
|
file << "SKILLPTS " << skill_pts << '\n';
|
||||||
file << "LEVEL " << level << '\n';
|
file << "LEVEL " << level << '\n';
|
||||||
|
auto status = this->status;
|
||||||
for(int i = 0; i < 15; i++) {
|
for(int i = 0; i < 15; i++) {
|
||||||
eStatus stat = (eStatus) i;
|
eStatus stat = (eStatus) i;
|
||||||
if(status.at(stat) != 0)
|
if(status[stat] != 0)
|
||||||
file << "STATUS " << i << ' ' << status.at(stat) << '\n';
|
file << "STATUS " << i << ' ' << status.at(stat) << '\n';
|
||||||
}
|
}
|
||||||
for(int i = 0; i < 24; i++)
|
for(int i = 0; i < 24; i++)
|
||||||
@@ -310,9 +311,10 @@ void cPlayer::writeTo(std::ostream& file) const {
|
|||||||
for(int i = 0; i < 62; i++)
|
for(int i = 0; i < 62; i++)
|
||||||
if(priest_spells[i])
|
if(priest_spells[i])
|
||||||
file << "PRIEST " << i << '\n';
|
file << "PRIEST " << i << '\n';
|
||||||
|
auto traits = this->traits;
|
||||||
for(int i = 0; i < 62; i++) {
|
for(int i = 0; i < 62; i++) {
|
||||||
eTrait trait = eTrait(i);
|
eTrait trait = eTrait(i);
|
||||||
if(traits.at(trait))
|
if(traits[trait])
|
||||||
file << "TRAIT " << i << '\n';
|
file << "TRAIT " << i << '\n';
|
||||||
}
|
}
|
||||||
file << "ICON " << which_graphic << '\n';
|
file << "ICON " << which_graphic << '\n';
|
||||||
@@ -320,7 +322,7 @@ void cPlayer::writeTo(std::ostream& file) const {
|
|||||||
file << "DIRECTION " << direction << '\n';
|
file << "DIRECTION " << direction << '\n';
|
||||||
file << "POISON " << weap_poisoned << '\n';
|
file << "POISON " << weap_poisoned << '\n';
|
||||||
file << '\f';
|
file << '\f';
|
||||||
for(int i; i < 24; i++)
|
for(int i = 0; i < 24; i++)
|
||||||
if(items[i].variety != eItemType::NO_ITEM){
|
if(items[i].variety != eItemType::NO_ITEM){
|
||||||
file << "ITEM " << i << '\n';
|
file << "ITEM " << i << '\n';
|
||||||
items[i].writeTo(file);
|
items[i].writeTo(file);
|
||||||
|
@@ -54,7 +54,9 @@ void update_item_menu() {
|
|||||||
AppendMenuA(items_menu, MF_STRING | MF_GRAYED, 1000, "Items Not Loaded");
|
AppendMenuA(items_menu, MF_STRING | MF_GRAYED, 1000, "Items Not Loaded");
|
||||||
} else for(int i = 0; i < 100; i++) {
|
} else for(int i = 0; i < 100; i++) {
|
||||||
cItemRec& item = item_list[i + j * 100];
|
cItemRec& item = item_list[i + j * 100];
|
||||||
AppendMenuA(items_menu, MF_STRING | MF_ENABLED, 1000 + j * 100 + i, item.full_name.c_str());
|
UINT flags = MF_STRING | MF_ENABLED;
|
||||||
|
if(i % 25 == 0) flags |= MF_MENUBARBREAK;
|
||||||
|
AppendMenuA(items_menu, flags, 1000 + j * 100 + i, item.full_name.c_str());
|
||||||
// TODO: Also disable gold or food
|
// TODO: Also disable gold or food
|
||||||
EnableMenuItem(items_menu, i, MF_BYPOSITION | (item.variety != eItemType::NO_ITEM ? MF_ENABLED : MF_GRAYED));
|
EnableMenuItem(items_menu, i, MF_BYPOSITION | (item.variety != eItemType::NO_ITEM ? MF_ENABLED : MF_GRAYED));
|
||||||
}
|
}
|
||||||
|
@@ -121,7 +121,7 @@ void update_item_menu() {
|
|||||||
while(GetMenuItemCount(item_menu)) RemoveMenu(item_menu, 0, MF_BYPOSITION);
|
while(GetMenuItemCount(item_menu)) RemoveMenu(item_menu, 0, MF_BYPOSITION);
|
||||||
for(int i = 0; i < 80; i++) {
|
for(int i = 0; i < 80; i++) {
|
||||||
UINT flags = MF_STRING | MF_ENABLED;
|
UINT flags = MF_STRING | MF_ENABLED;
|
||||||
if(i % 40 == 0) flags |= MF_MENUBARBREAK;
|
if(i % 20 == 0) flags |= MF_MENUBARBREAK;
|
||||||
AppendMenuA(item_menu, flags, 10000 + i + j * 80, scenario.scen_items[i + j * 80].full_name.c_str());
|
AppendMenuA(item_menu, flags, 10000 + i + j * 80, scenario.scen_items[i + j * 80].full_name.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@ tarball::header_posix_ustar tarball::generateTarHeader(const std::string& fileNa
|
|||||||
memset(header.checksum,' ',8);
|
memset(header.checksum,' ',8);
|
||||||
header.typeflag[0] = directory ? '5' : '0';
|
header.typeflag[0] = directory ? '5' : '0';
|
||||||
// leave linkname filled with NULs
|
// leave linkname filled with NULs
|
||||||
snprintf(header.magic,6,"ustar ");
|
snprintf(header.magic,6,"ustar");
|
||||||
snprintf(header.version,2," ");
|
snprintf(header.version,2," ");
|
||||||
// leave uname filled with NULs
|
// leave uname filled with NULs
|
||||||
// leave gname filled with NULs
|
// leave gname filled with NULs
|
||||||
|
Reference in New Issue
Block a user