Changeset 23
- Timestamp:
- 2010-01-17 14:01:38 (2 years ago)
- Location:
- trunk
- Files:
-
- 21 added
- 60 edited
-
Classes/RenderQueue.cpp (modified) (1 diff)
-
Classes/SDL/src/video/uikit/SDL_uikitappdelegate.mm (modified) (2 diffs)
-
Classes/achievements.h (modified) (1 diff)
-
Classes/achievements.mm (modified) (2 diffs)
-
Classes/actions.cpp (modified) (3 diffs)
-
Classes/builder.cpp (modified) (12 diffs)
-
Classes/builder.hpp (modified) (13 diffs)
-
Classes/config.cpp (modified) (3 diffs)
-
Classes/config_cache.cpp (modified) (4 diffs)
-
Classes/construct_dialog.cpp (modified) (1 diff)
-
Classes/dialogs.cpp (modified) (1 diff)
-
Classes/game.cpp (modified) (2 diffs)
-
Classes/game_preferences.hpp (modified) (2 diffs)
-
Classes/game_preferences.mm (modified) (8 diffs)
-
Classes/game_preferences_display.cpp (modified) (6 diffs)
-
Classes/gamestatus.cpp (modified) (1 diff)
-
Classes/gui/widgets/window.cpp (modified) (1 diff)
-
Classes/playcampaign.cpp (modified) (1 diff)
-
Classes/playsingle_controller.cpp (modified) (6 diffs)
-
Classes/playsingle_controller.hpp (modified) (1 diff)
-
Classes/preferences.cpp (modified) (1 diff)
-
Classes/preferences.hpp (modified) (1 diff)
-
Classes/tcmalloc/central_freelist.cc (modified) (1 diff)
-
Classes/tcmalloc/common.h (modified) (1 diff)
-
Classes/tcmalloc/page_heap.cc (modified) (1 diff)
-
Classes/video.cpp (modified) (1 diff)
-
OpenFeint/api/internal/OpenFeint/Services/SocialNotification/OFSocialNotificationService+Private.mm (modified) (2 diffs)
-
include/SDL/SDL_stdinc.h (modified) (1 diff)
-
res/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg (modified) (1 diff)
-
res/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg (modified) (2 diffs)
-
res/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg (modified) (2 diffs)
-
res/data/campaigns/Dead_Water/scenarios/12_Revenge.cfg (modified) (2 diffs)
-
res/data/campaigns/Dead_Water/utils/items.cfg (modified) (4 diffs)
-
res/data/campaigns/Eastern_Invasion/scenarios/04b.The_Undead_Border_Patrol.cfg (modified) (2 diffs)
-
res/data/campaigns/Eastern_Invasion/scenarios/17.Weldyn_Under_Attack.cfg (modified) (2 diffs)
-
res/data/campaigns/Heir_To_The_Throne/scenarios/04_The_Bay_of_Pearls.cfg (modified) (2 diffs)
-
res/data/campaigns/Heir_To_The_Throne/scenarios/06_The_Siege_of_Elensefar.cfg (modified) (2 diffs)
-
res/data/campaigns/Heir_To_The_Throne/scenarios/18_A_Choice_Must_Be_Made.cfg (modified) (2 diffs)
-
res/data/campaigns/Invasion_from_the_Unknown/scenarios/04_Over_the_Sands.cfg (modified) (4 diffs)
-
res/data/campaigns/Invasion_from_the_Unknown/scenarios/05a_Crossfire.cfg (modified) (3 diffs)
-
res/data/campaigns/Invasion_from_the_Unknown/scenarios/08a_Errand_of_Hope.cfg (modified) (5 diffs)
-
res/data/campaigns/Invasion_from_the_Unknown/scenarios/10_The_Source_of_Light.cfg (modified) (5 diffs)
-
res/data/campaigns/Legend_of_Wesmere/scenarios/07_Elves_last_stand_utils.cfg (modified) (2 diffs)
-
res/data/campaigns/Liberty/scenarios/06_The_Gray_Woods.cfg (modified) (3 diffs)
-
res/data/campaigns/Northern_Rebirth/scenarios/10a_Stolen_Gold.cfg (modified) (2 diffs)
-
res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/02_The_Fall.cfg (modified) (2 diffs)
-
res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/03_A_Harrowing_Escape.cfg (modified) (2 diffs)
-
res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/09_Fallen_Lich_Point.cfg (modified) (2 diffs)
-
res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/16_Elf_Lords.cfg (modified) (3 diffs)
-
res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/17a_The_Dragon.cfg (modified) (2 diffs)
-
res/data/campaigns/The_South_Guard/scenarios/05_Choice_In_The_Fog.cfg (modified) (2 diffs)
-
res/data/campaigns/The_South_Guard/scenarios/07a_Into_The_Depths.cfg (modified) (3 diffs)
-
res/data/campaigns/Two_Brothers/scenarios/2_The_Chase.cfg (modified) (2 diffs)
-
res/data/campaigns/Under_the_Burning_Suns/scenarios/04_Descending_into_Darkness.cfg (modified) (2 diffs)
-
res/data/campaigns/Under_the_Burning_Suns/scenarios/06a_In_the_Tunnels_of_Trolls.cfg (modified) (1 diff)
-
res/data/campaigns/Under_the_Burning_Suns/scenarios/06b_In_the_Domain_of_Dwarves.cfg (modified) (2 diffs)
-
res/data/campaigns/Under_the_Burning_Suns/scenarios/07a_Dealing_with_Dwarves.cfg (modified) (1 diff)
-
res/data/campaigns/Under_the_Burning_Suns/scenarios/07b_Talking_with_Trolls.cfg (modified) (1 diff)
-
res/data/core/images/achievements (added)
-
res/data/core/images/achievements/01.png (added)
-
res/data/core/images/achievements/02.png (added)
-
res/data/core/images/achievements/03.png (added)
-
res/data/core/images/achievements/04.png (added)
-
res/data/core/images/achievements/05.png (added)
-
res/data/core/images/achievements/06.png (added)
-
res/data/core/images/achievements/07.png (added)
-
res/data/core/images/achievements/08.png (added)
-
res/data/core/images/achievements/09.png (added)
-
res/data/core/images/achievements/10.png (added)
-
res/data/core/images/achievements/11.png (added)
-
res/data/core/images/achievements/12.png (added)
-
res/data/core/images/achievements/13.png (added)
-
res/data/core/images/achievements/14.png (added)
-
res/data/core/images/achievements/15.png (added)
-
res/data/core/images/achievements/16.png (added)
-
res/data/core/images/achievements/17.png (added)
-
res/data/core/images/achievements/18.png (added)
-
res/data/core/images/achievements/19.png (added)
-
res/data/core/images/achievements/20.png (added)
-
wesnoth.xcodeproj/project.pbxproj (modified) (4 diffs)
-
wesnoth_notes.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Classes/RenderQueue.cpp
r22 r23 278 278 for (int k=j; k < mTextureQueue.size(); k++) 279 279 { 280 if (mTextureQueue[k].type == QUEUE_TYPE_FILL && mTextureQueue[k].tex tCoords[0] == color1 && mTextureQueue[k].textCoords[1] == color2 && mTextureQueue[k].textCoords[2] == color3 && mTextureQueue[k].textCoords[3] == color4)280 if (mTextureQueue[k].type == QUEUE_TYPE_FILL && mTextureQueue[k].texCoords[0] == color1 && mTextureQueue[k].texCoords[1] == color2 && mTextureQueue[k].texCoords[2] == color3 && mTextureQueue[k].texCoords[3] == color4) 281 281 { 282 glVertexPointer(2, GL_SHORT, 0, mTextureQueue[ j].vertices);282 glVertexPointer(2, GL_SHORT, 0, mTextureQueue[k].vertices); 283 283 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); 284 284 -
trunk/Classes/SDL/src/video/uikit/SDL_uikitappdelegate.mm
r22 r23 48 48 { 49 49 // memory access checking 50 //execl(VALGRIND_PATH, VALGRIND_PATH, "--gen-suppressions=all", argv[0], "-valgrind", NULL);50 execl(VALGRIND_PATH, VALGRIND_PATH, "--gen-suppressions=all", argv[0], "-valgrind", NULL); 51 51 52 52 // memory profiling 53 execl(VALGRIND_PATH, VALGRIND_PATH, "--tool=massif", "--massif-out-file=/Users/kyle/wesnoth.massif", argv[0], "-valgrind", NULL);53 //execl(VALGRIND_PATH, VALGRIND_PATH, "--tool=massif", "--massif-out-file=/Users/kyle/wesnoth.massif", argv[0], "-valgrind", NULL); 54 54 } 55 55 #endif … … 157 157 - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application 158 158 { 159 // UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Low Memory" message:@"Detected low memory warning! Try resetting device to free more memory. Game will now exit..." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 160 // [alert show]; 161 // [alert release]; 159 /* 160 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Low Memory" message:@"Detected low memory warning! Try restarting device to free more memory. Game will now exit..." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 161 [alert show]; 162 [alert release]; 163 SDL_SendQuit(); 164 */ 162 165 } 163 166 -
trunk/Classes/achievements.h
r22 r23 15 15 #define ACHIEVEMENTS_H_INCLUDED 16 16 17 #define ACHIEVEMENT_BLOODIED 0 18 #define ACHIEVEMENT_SLAYER 1 19 #define ACHIEVEMENT_BATTLE_MASTER 2 20 #define ACHIEVEMENT_BONE_CRUSHER 3 21 #define ACHIEVEMENT_PREDATOR 4 22 #define ACHIEVEMENT_PENNY_PINCHER 5 23 #define ACHIEVEMENT_MONEY_HOARDER 6 24 #define ACHIEVEMENT_VETERAN_UNIT 7 25 #define ACHIEVEMENT_HEROIC_UNIT 8 26 #define ACHIEVEMENT_FEARLESS_LEADER 9 27 #define ACHIEVEMENT_BESERK 10 28 #define ACHIEVEMENT_RAMPAGE 11 29 #define ACHIEVEMENT_PROFICIENT_COMMANDER 12 30 #define ACHIEVEMENT_GREAT_GENERAL 13 31 #define ACHIEVEMENT_DIVINE_BLESSING 14 32 #define ACHIEVEMENT_LIGHTNING_QUICK_BLADES 15 33 #define ACHIEVEMENT_RECRUIT_OF_WESNOTH 16 34 #define ACHIEVEMENT_DEFENDER_OF_WESNOTH 17 35 #define ACHIEVEMENT_HERO_OF_WESNOTH 18 36 #define ACHIEVEMENT_CHAMPION_OF_WESNOTH 19 37 38 17 39 void of_init(void); // Initialize OpenFeint 18 40 void of_dashboard(void); // Open the OpenFeint dashboard 19 41 void earn_achievement(int achievement, bool show_dlg = true); 42 std::string achievement_name(int achievement); 20 43 #endif -
trunk/Classes/achievements.mm
r22 r23 19 19 #include "OFAchievement.h" 20 20 21 #include "game_preferences.hpp" 21 22 22 #define KILLS_25 @"112754" 23 #define KILLS_50 @"112764" 24 #define KILLS_100 @"112774" 25 #define KILLS_500 @"112784" 26 #define KILLS_1000 @"112794" 27 #define RICH_ARMY @"112804" 28 #define MONEY_HOARDER @"112814" 29 #define VETERAN_UNIT @"112824" 30 #define HEROIC_UNIT @"112844" 31 #define FEARLESS_LEADER @"112904" 32 #define RAMPAGE @"113334" 33 #define DOMINATING @"113344" 34 #define LARGE_ARMY @"113354" 35 #define MASSIVE_ARMY @"113364" 36 #define EFFICIENT_ARMY @"113374" 37 #define PERFECT_STRATEGY @"113384" 38 #define EDUCATED_PLAYER @"113394" 39 #define VETERAN_PLAYER @"113404" 40 #define HEROIC_PLAYER @"113414" 41 #define CHAMPION_PLAYER @"113424" 23 #include "construct_dialog.hpp" 24 #include "game_display.hpp" 25 #include "stdio.h" 26 27 std::string names[] = { "Bloodied", "Slayer", "Battle Master", "Bone Crusher", "Predator", "Penny Pincher", "Money Hoarder", "Veteran Unit", 28 "Heroic Unit", "Fearless Leader", "Beserk", "Rampage", "Proficient Commander", "Great General", "Divine Blessing", "Lightning Quick Blades", 29 "Recruit of Wesnoth", "Defender of Wesnoth", "Hero of Wesnoth", "Champion of Wesnoth"}; 30 31 NSString* ids[] = { @"112754", @"112764", @"112774", @"112784", @"112794", @"112804", @"112814", @"112824", @"112844", @"112904", @"113334", 32 @"113344", @"113354", @"113364", @"113374", @"113384", @"113394", @"113404", @"113414", @"113424"}; 33 34 std::string desc[] = { "Kill 25 enemy units", "Kill 50 enemy units", "Kill 100 enemy units", "Kill 500 enemy units", "Kill 1000 enemy units", 35 "Collect 300 gold", "Collect 500 gold", "Level up a unit to level 3", "Level up a unit to level 4", "Level up your leader", "Kill 3 units in a turn", 36 "Kill 5 units in a turn", "Control 20 units", "Control 30 units", "Finish a mission 10 turns early", "Finish a mission 15 turns early", 37 "Complete the tutorial", "Complete a full campaign on easy difficulty", "Complete a full campaign on normal difficulty", 38 "Complete a full campaign on hard difficulty"}; 42 39 43 40 bool gInitialized = false; … … 66 63 } 67 64 68 void earn_achievement(int achievement)65 std::string achievement_name(int achievement) 69 66 { 70 [OFAchievementService unlockAchievement:KILLS_25];67 return names[achievement]; 71 68 } 72 69 73 70 void earn_achievement(int achievement, bool show_dlg) 71 { 72 if (preferences::achievement_earned(achievement)) 73 return; 74 75 preferences::achievement_add(achievement); 76 77 // display dialog 78 if (show_dlg == true) 79 { 80 char img_str[50]; 81 sprintf(img_str, "data/core/images/achievements/%02d.png", achievement+1); 82 surface surf(image::get_image(img_str, image::UNSCALED, false)); 83 std::string text, caption; 84 caption = "Achievement Unlocked: "; 85 caption += names[achievement]; 86 //wml_event_dialog to_show(*screen,"",desc[achievement]); 87 gui::message_dialog dlg(*(game_display::get_singleton()), "", desc[achievement]); 88 if(!surf.null()) { 89 dlg.set_image(surf, caption); 90 } 91 dlg.layout(); 92 dlg.show(300); 93 } 94 95 // do OpenFeint stuff 96 [OFAchievementService unlockAchievement:ids[achievement]]; 97 } -
trunk/Classes/actions.cpp
r4 r23 1148 1148 1149 1149 if(dies) { // attacker kills defender 1150 // KP: add kills for player 1151 if (a_.get_unit().side() == preferences::get_player_side()) 1152 preferences::add_kill(); 1153 1150 1154 a_.xp_ = game_config::kill_experience * d_.get_unit().level(); 1151 1155 if(d_.get_unit().level() == 0) … … 1417 1421 1418 1422 if(dies) { // defender kills attacker 1423 if (d_.get_unit().side() == preferences::get_player_side()) 1424 preferences::add_kill(); 1425 1419 1426 d_.xp_ = game_config::kill_experience * a_.get_unit().level(); 1420 1427 if(a_.get_unit().level() == 0) … … 1898 1905 LOG_NG << "firing post_advance event at " << loc << "\n"; 1899 1906 game_events::fire("post_advance",loc); 1907 1908 // KP: check for achievements 1909 if (new_unit.side() == preferences::get_player_side()) 1910 { 1911 if (new_unit.level() == 4) 1912 earn_achievement(ACHIEVEMENT_HEROIC_UNIT); 1913 else if (new_unit.level() == 3) 1914 earn_achievement(ACHIEVEMENT_VETERAN_UNIT); 1915 if (new_unit.can_recruit() && new_unit.name() != "Galas") // IftU part 2 advances you for free right at the start... 1916 earn_achievement(ACHIEVEMENT_FEARLESS_LEADER); 1917 } 1918 1919 1900 1920 } 1901 1921 -
trunk/Classes/builder.cpp
r12 r23 39 39 #define ERR_NG LOG_STREAM(err, engine) 40 40 #define DEBUG_NG LOG_STREAM(info, engine) 41 42 extern "C" { 43 void* dlmalloc(size_t size); 44 void* dlcalloc(size_t count, size_t size); 45 void* dlvalloc(size_t size); 46 void* dlmemalign(size_t alignment, size_t size); 47 void* dlrealloc(void* ptr, size_t size); 48 void dlfree(void* ptr); 49 }; 41 50 42 51 /** The tile width used when using basex and basey. This is not, … … 507 516 // Transforms attributes 508 517 //std::vector<std::string>::iterator flag; 518 /* 509 519 std::vector<shared_string>::iterator flag; 510 // if (cons->second.set_flag)511 // {512 520 for(flag = cons->second.set_flag.begin(); flag != cons->second.set_flag.end(); flag++) { 513 521 replace_token(*flag, token, replacement); 514 522 } 515 // }516 // if (cons->second.no_flag)517 // {518 523 for(flag = cons->second.no_flag.begin(); flag != cons->second.no_flag.end(); flag++) { 519 524 replace_token(*flag, token, replacement); 520 525 } 521 // }522 // if (cons->second.has_flag)523 // {524 526 for(flag = cons->second.has_flag.begin(); flag != cons->second.has_flag.end(); flag++) { 525 527 replace_token(*flag, token, replacement); 526 528 } 527 // } 528 // if (cons->second.images) 529 */ 530 std::vector<tc_flag>::iterator fit; 531 for (fit = cons->second.flags.begin(); fit != cons->second.flags.end(); fit++) { 532 replace_token((*fit).str, token, replacement); 533 } 529 534 replace_token(cons->second.images, token, replacement); 530 535 } … … 667 672 if (item_string.size() > 0) 668 673 { 669 // if (!constraint.set_flag) 670 // constraint.set_flag = new std::vector<shared_string>; 671 constraint.set_flag.insert(constraint.set_flag.end(), 672 item_string.begin(), item_string.end()); 674 //constraint.set_flag.insert(constraint.set_flag.end(), 675 // item_string.begin(), item_string.end()); 676 tc_flag tcf; 677 tcf.flag_type = FLAG_TYPE_SET; 678 for (int i=0; i < item_string.size(); i++) 679 { 680 tcf.str = item_string[i]; 681 constraint.flags.push_back(tcf); 682 } 673 683 } 674 684 … … 676 686 if (item_string.size() > 0) 677 687 { 678 // if (!constraint.has_flag) 679 // constraint.has_flag = new std::vector<shared_string>; 680 constraint.has_flag.insert(constraint.has_flag.end(), 681 item_string.begin(), item_string.end()); 688 //constraint.has_flag.insert(constraint.has_flag.end(), 689 // item_string.begin(), item_string.end()); 690 tc_flag tcf; 691 tcf.flag_type = FLAG_TYPE_HAS; 692 for (int i=0; i < item_string.size(); i++) 693 { 694 tcf.str = item_string[i]; 695 constraint.flags.push_back(tcf); 696 } 697 682 698 } 683 699 … … 685 701 if (item_string.size() > 0) 686 702 { 687 // if (!constraint.no_flag) 688 // constraint.no_flag = new std::vector<shared_string>; 689 constraint.no_flag.insert(constraint.no_flag.end(), 690 item_string.begin(), item_string.end()); 691 } 692 // if (constraint.images) 703 //constraint.no_flag.insert(constraint.no_flag.end(), 704 // item_string.begin(), item_string.end()); 705 tc_flag tcf; 706 tcf.flag_type = FLAG_TYPE_NO; 707 for (int i=0; i < item_string.size(); i++) 708 { 709 tcf.str = item_string[i]; 710 constraint.flags.push_back(tcf); 711 } 712 713 } 693 714 add_images_from_config(constraint.images, cfg, false); 694 715 } … … 838 859 if(global_set_flag.size()) 839 860 { 840 // if (!constraint->second.set_flag) 841 // constraint->second.set_flag = new std::vector<shared_string>; 842 constraint->second.set_flag.push_back(global_set_flag); 861 //constraint->second.set_flag.push_back(global_set_flag); 862 tc_flag tcf; 863 tcf.flag_type = FLAG_TYPE_SET; 864 tcf.str = global_set_flag; 865 constraint->second.flags.push_back(tcf); 843 866 } 844 867 845 868 if(global_no_flag.size()) 846 869 { 847 // if (!constraint->second.no_flag) 848 // constraint->second.no_flag = new std::vector<shared_string>; 849 constraint->second.no_flag.push_back(global_no_flag); 870 //constraint->second.no_flag.push_back(global_no_flag); 871 tc_flag tcf; 872 tcf.flag_type = FLAG_TYPE_NO; 873 tcf.str = global_no_flag; 874 constraint->second.flags.push_back(tcf); 850 875 } 851 876 852 877 if(global_has_flag.size()) 853 878 { 854 // if (!constraint->second.has_flag) 855 // constraint->second.has_flag = new std::vector<shared_string>; 856 constraint->second.has_flag.push_back(global_has_flag); 879 //constraint->second.has_flag.push_back(global_has_flag); 880 tc_flag tcf; 881 tcf.flag_type = FLAG_TYPE_HAS; 882 tcf.str = global_has_flag; 883 constraint->second.flags.push_back(tcf); 857 884 } 858 885 … … 965 992 const tile& btile = tile_map_[tloc]; 966 993 994 /* 967 995 //std::vector<std::string>::const_iterator itor; 968 996 std::vector<shared_string>::const_iterator itor; 969 // if (cons->second.no_flag)970 // {971 997 for(itor = cons->second.no_flag.begin(); itor != cons->second.no_flag.end(); ++itor) { 972 998 … … 976 1002 } 977 1003 } 978 // }979 // if (cons->second.has_flag)980 // {981 1004 for(itor = cons->second.has_flag.begin(); itor != cons->second.has_flag.end(); ++itor) { 982 1005 … … 986 1009 } 987 1010 } 988 // } 1011 */ 1012 std::vector<tc_flag>::const_iterator itor; 1013 for(itor = cons->second.flags.begin(); itor != cons->second.flags.end(); ++itor) 1014 { 1015 if ((*itor).flag_type == FLAG_TYPE_NO) 1016 { 1017 // If a flag listed in "no_flag" is present, the rule does not match 1018 if(btile.flags.find((*itor).str) != btile.flags.end()) { 1019 return false; 1020 } 1021 } 1022 else if ((*itor).flag_type == FLAG_TYPE_HAS) 1023 { 1024 // If a flag listed in "has_flag" is not present, this rule does not match 1025 if(btile.flags.find((*itor).str) == btile.flags.end()) { 1026 return false; 1027 } 1028 } 1029 } 989 1030 } 990 1031 … … 1008 1049 // so we sort by layer*BASE_Y_INTERVAL + BASE_Y_INTERVAL/2 + basey 1009 1050 // Thus, allowed values for basey are from -50000 to 49999 1010 // if (constraint->second.images)1011 // {1012 1051 for(img = constraint->second.images.begin(); img != constraint->second.images.end(); ++img) { 1013 1052 btile.images.insert(std::pair<int, const rule_image*>( 1014 1053 img->layer*BASE_Y_INTERVAL + BASE_Y_INTERVAL/2 + img->basey, &*img)); 1015 1054 } 1016 // }1017 1055 1018 1056 // Sets flags 1019 // if (constraint->second.set_flag) 1020 // { 1057 /* 1021 1058 for(std::vector<shared_string>::const_iterator itor = constraint->second.set_flag.begin(); 1022 1059 itor != constraint->second.set_flag.end(); itor++) { 1023 1060 btile.flags.insert(*itor); 1024 1061 } 1025 // } 1062 */ 1063 for(std::vector<tc_flag>::const_iterator itor = constraint->second.flags.begin(); itor != constraint->second.flags.end(); itor++) 1064 { 1065 if ((*itor).flag_type == FLAG_TYPE_SET) 1066 { 1067 btile.flags.insert((*itor).str); 1068 } 1069 } 1070 1026 1071 1027 1072 } … … 1139 1184 MEMFILE mf(data); 1140 1185 cacheLoadStringTable(&mf, loadBuffer); 1141 free(data);1186 dlfree(data); 1142 1187 } 1143 1188 … … 1147 1192 MEMFILE mf(data); 1148 1193 loadCache(&mf, loadBuffer); 1149 free(data);1194 dlfree(data); 1150 1195 } 1151 1196 -
trunk/Classes/builder.hpp
r22 r23 229 229 230 230 /** The layer of the image for horizontal layering */ 231 int layer;231 short layer; 232 232 /** The position of the image base (that is, the point where 233 233 * the image reaches the floor) for vertical layering 234 234 */ 235 int basex, basey;235 short basex, basey; 236 236 237 237 /** A list of Time-Of-Day-related variants for this image … … 246 246 /** The position where the center of the image base should be 247 247 */ 248 int center_x, center_y;248 short center_x, center_y; 249 249 250 250 // KP: added cache functions … … 313 313 typedef std::vector<rule_image> rule_imagelist; 314 314 315 #define FLAG_TYPE_SET 0 316 #define FLAG_TYPE_NO 1 317 #define FLAG_TYPE_HAS 2 318 319 struct tc_flag 320 { 321 unsigned char flag_type; 322 shared_string str; 323 }; 315 324 316 325 /** … … 323 332 loc(), 324 333 terrain_types_match(), 325 set_flag(), 326 no_flag(), 327 has_flag(), 334 //set_flag(), 335 //no_flag(), 336 //has_flag(), 337 flags(NULL), 328 338 images() 329 339 {}; … … 332 342 loc(loc), 333 343 terrain_types_match(), 334 set_flag(NULL), 335 no_flag(NULL), 336 has_flag(NULL), 344 //set_flag(NULL), 345 //no_flag(NULL), 346 //has_flag(NULL), 347 flags(NULL), 337 348 images(NULL) 338 349 {}; … … 340 351 t_translation::t_match terrain_types_match; 341 352 353 // combining these saves 24 bytes per terrain constraint, which certainly adds up... 354 /* 342 355 std::vector<shared_string> set_flag; 343 356 std::vector<shared_string> no_flag; 344 357 std::vector<shared_string> has_flag; 358 */ 359 std::vector<tc_flag> flags; 345 360 rule_imagelist images; 346 361 … … 355 370 356 371 short size; 372 /* 357 373 size = set_flag.size(); 358 374 fwrite(&size, sizeof(size), 1, file); … … 375 391 cacheSaveString(file, (has_flag)[i]); 376 392 } 393 */ 394 395 size = flags.size(); 396 fwrite(&size, sizeof(size), 1, file); 397 for (int i=0; i < size; i++) 398 { 399 fwrite(&flags[i].flag_type, sizeof(flags[i].flag_type), 1, file); 400 cacheSaveString(file, flags[i].str); 401 } 402 377 403 size = images.size(); 378 404 fwrite(&size, sizeof(size), 1, file); … … 392 418 char *str; 393 419 unsigned long strSize; 394 420 421 422 /* 395 423 mread(&size, sizeof(size), 1, file); 396 424 if (size > 0) … … 427 455 gTempStr.assign(str, strSize); 428 456 has_flag.push_back(gTempStr); 457 } 458 */ 459 460 mread(&size, sizeof(size), 1, file); 461 if (size > 0) 462 { 463 flags.reserve(size); 464 } 465 for (int i=0; i < size; i++) 466 { 467 tc_flag tcf; 468 mread(&tcf.flag_type, sizeof(tcf.flag_type), 1, file); 469 cacheLoadString(file, &str, &strSize); 470 tcf.str.assign(str, strSize); 471 472 flags.push_back(tcf); 429 473 } 430 474 … … 544 588 * [terrain_graphics] element is set. 545 589 */ 546 int probability;590 short probability; 547 591 548 592 /** … … 552 596 * [terrain_graphics] element is set. 553 597 */ 554 int precedence;598 short precedence; 555 599 556 600 // KP: added cache functions … … 651 695 std::vector<tile> tiles_; 652 696 /** The x dimension of the map */ 653 int x_;697 short x_; 654 698 /** The y dimension of the map */ 655 int y_;699 short y_; 656 700 }; 657 701 -
trunk/Classes/config.cpp
r12 r23 35 35 36 36 37 37 extern "C" { 38 void* dlmalloc(size_t size); 39 void* dlcalloc(size_t count, size_t size); 40 void* dlvalloc(size_t size); 41 void* dlmemalign(size_t alignment, size_t size); 42 void* dlrealloc(void* ptr, size_t size); 43 void dlfree(void* ptr); 44 }; 38 45 39 46 config::config() : values(), children()//, ordered_children() … … 891 898 MEMFILE mf(data); 892 899 cacheLoadStringTable(&mf, loadBuffer); 893 free(data);900 dlfree(data); 894 901 } 895 902 … … 899 906 MEMFILE mf(data); 900 907 loadCache(&mf, loadBuffer); 901 free(data);908 dlfree(data); 902 909 } 903 910 -
trunk/Classes/config_cache.cpp
r4 r23 38 38 #define LOG_CACHE std::cerr //LOG_STREAM(info, cache) 39 39 #define DBG_CACHE std::cerr //LOG_STREAM(debug, cache) 40 41 42 extern "C" { 43 void* dlmalloc(size_t size); 44 void* dlcalloc(size_t count, size_t size); 45 void* dlvalloc(size_t size); 46 void* dlmemalign(size_t alignment, size_t size); 47 void* dlrealloc(void* ptr, size_t size); 48 void dlfree(void* ptr); 49 }; 40 50 41 51 namespace game_config { … … 617 627 * @return unsigned char * - pointer to uncompressed data 618 628 * 619 * NOTE: make sure to free() the returned pointer! 629 * NOTE: it uses dlmalloc to get memory, avoiding increasing the tcmalloc pool, which is never released to the OS 630 * NOTE: make sure to dlfree() the returned pointer! 620 631 */ 621 632 unsigned char *cacheUncompress(std::string &filename) … … 633 644 634 645 // uncompress the data 635 unsigned char *compressedData = (unsigned char *) malloc(compressedSize);636 unsigned char *originalData = (unsigned char *) malloc(originalSize);646 unsigned char *compressedData = (unsigned char *) dlmalloc(compressedSize); 647 unsigned char *originalData = (unsigned char *) dlmalloc(originalSize); 637 648 assert(compressedData); 638 649 assert(originalData); … … 643 654 assert(z_result == Z_OK); 644 655 645 free(compressedData);656 dlfree(compressedData); 646 657 return originalData; 647 658 } -
trunk/Classes/construct_dialog.cpp
r22 r23 685 685 if (dim.x < 0) 686 686 dim.x = 0; 687 else 688 { 689 dim.image_x = dim.x + left_padding; 690 dim.image_y = dim.y + top_padding; 691 } 687 692 } 688 693 -
trunk/Classes/dialogs.cpp
r22 r23 697 697 // create an option for whether the replay should be shown or not 698 698 if(show_replay != NULL) { 699 lmenu.add_option(_("Show replay"), false,700 game_config::small_gui ? gui::dialog::BUTTON_CHECKBOX : gui::dialog::BUTTON_STANDARD);699 // lmenu.add_option(_("Show replay"), false, 700 // game_config::small_gui ? gui::dialog::BUTTON_CHECKBOX : gui::dialog::BUTTON_STANDARD); 701 701 } 702 702 #ifndef __IPHONEOS__ -
trunk/Classes/game.cpp
r22 r23 130 130 class game_controller 131 131 { 132 public: 132 public: 133 133 game_controller(int argc, char** argv); 134 134 ~game_controller(); … … 1719 1719 // change this if MP campaigns are implemented 1720 1720 if(result == VICTORY && (state_.campaign_type.empty() || state_.campaign_type != "multiplayer")) { 1721 // KP: achievements @TODO: we can't display the in-game dialog at this point, but OpenFeint will still pop up... 1722 if (state_.campaign_type == "tutorial") 1723 { 1724 earn_achievement(ACHIEVEMENT_RECRUIT_OF_WESNOTH, false); 1725 } 1726 else 1727 { 1728 if (state_.difficulty == "EASY") 1729 { 1730 earn_achievement(ACHIEVEMENT_DEFENDER_OF_WESNOTH, false); 1731 } 1732 else if (state_.difficulty == "NORMAL") 1733 { 1734 earn_achievement(ACHIEVEMENT_HERO_OF_WESNOTH, false); 1735 } 1736 else 1737 { 1738 earn_achievement(ACHIEVEMENT_CHAMPION_OF_WESNOTH, false); 1739 } 1740 } 1741 1742 1721 1743 the_end(disp(), state_.end_text, state_.end_text_duration); 1744 1745 1746 1722 1747 // about::show_about(disp(),state_.campaign); 1723 1748 } -
trunk/Classes/game_preferences.hpp
r4 r23 27 27 #include <utility> 28 28 #include <set> 29 30 #include "achievements.h" 29 31 30 32 namespace preferences { … … 235 237 // Add all terrains on the map as encountered terrains. 236 238 void encounter_map_terrain(gamemap& map); 239 240 241 bool achievement_earned(int achievement); 242 void achievement_add(int achievement); 243 void set_player_side(int side); 244 int get_player_side(); 245 void add_kill(); 246 void reset_turn_kills(); 237 247 } 238 248 -
trunk/Classes/game_preferences.mm
r12 r23 37 37 std::set<shared_string> encountered_units_set; 38 38 std::set<t_translation::t_terrain> encountered_terrains_set; 39 std::set<std::string> achievements_set; 40 int player_side; 41 int turn_kills; 42 int total_kills; 39 43 40 44 std::map<std::string, std::vector<std::string> > history_map; … … 68 72 std::copy(v.begin(), v.end(), 69 73 std::inserter(encountered_units_set, encountered_units_set.begin())); 74 75 const std::vector<std::string> a = utils::split(preferences::get("achievements")); 76 std::copy(a.begin(), a.end(), 77 std::inserter(achievements_set, achievements_set.begin())); 78 total_kills = lexical_cast_default<unsigned int>(preferences::get("kills"), 0); 79 turn_kills = 0; 80 player_side = 0; 70 81 71 82 const t_translation::t_list terrain = … … 110 121 std::copy(encountered_units_set.begin(), encountered_units_set.end(), std::back_inserter(v)); 111 122 preferences::set("encountered_units", utils::join(v)); 123 124 // KP: added for saving achievements 125 std::vector<std::string> a; 126 std::copy(achievements_set.begin(), achievements_set.end(), std::back_inserter(a)); 127 preferences::set("achievements", utils::join(a)); 128 preferences::set("kills", lexical_cast<std::string>(total_kills)); 129 112 130 t_translation::t_list terrain; 113 131 std::copy(encountered_terrains_set.begin(), encountered_terrains_set.end(), … … 140 158 history_map.clear(); 141 159 encountered_units_set.clear(); 160 achievements_set.clear(); 161 total_kills = 0; 162 turn_kills = 0; 142 163 encountered_terrains_set.clear(); 143 164 set_ping_timeout(network::ping_timeout); … … 361 382 362 383 NSString *nsName = [[UIDevice currentDevice] name]; 363 std::string res2 = [nsName cStringUsingEncoding:[NSString defaultCStringEncoding]]; 384 if (!nsName) 385 return ("Player"); 386 std::string res2 = [nsName cStringUsingEncoding:NSASCIIStringEncoding]; 364 387 365 388 if(res2.empty()) { 366 return _(" player");389 return _("Player"); 367 390 } 368 391 return res2; … … 642 665 bool save_replays() 643 666 { 644 return utils::string_bool(preferences::get("save_replays"), false); 667 // KP: no saving replays on iPhone 668 //return utils::string_bool(preferences::get("save_replays"), false); 669 return false; 645 670 } 646 671 … … 827 852 return encountered_terrains_set; 828 853 } 829 854 830 855 std::string custom_command() { 831 856 return preferences::get("custom_command"); … … 906 931 } 907 932 933 934 // KP: checks if the achievement has been earned already 935 bool achievement_earned(int achievement) 936 { 937 if (achievements_set.find(achievement_name(achievement)) != achievements_set.end()) 938 return true; 939 940 return false; 941 } 942 943 // KP: records the achievement 944 void achievement_add(int achievement) 945 { 946 achievements_set.insert(achievement_name(achievement)); 947 948 // keep prefs up to date 949 std::vector<std::string> a; 950 std::copy(achievements_set.begin(), achievements_set.end(), std::back_inserter(a)); 951 preferences::set("achievements", utils::join(a)); 952 preferences::set("kills", lexical_cast<std::string>(total_kills)); 953 preferences::write_preferences(); 954 } 955 956 void add_kill() 957 { 958 total_kills++; 959 if (total_kills >= 1000 && !achievement_earned(ACHIEVEMENT_BATTLE_MASTER)) 960 earn_achievement(ACHIEVEMENT_BATTLE_MASTER); 961 else if (total_kills >= 500 && !achievement_earned(ACHIEVEMENT_BONE_CRUSHER)) 962 earn_achievement(ACHIEVEMENT_BONE_CRUSHER); 963 else if (total_kills >= 100 && !achievement_earned(ACHIEVEMENT_PREDATOR)) 964 earn_achievement(ACHIEVEMENT_PREDATOR); 965 else if (total_kills >= 50 && !achievement_earned(ACHIEVEMENT_SLAYER)) 966 earn_achievement(ACHIEVEMENT_SLAYER); 967 else if (total_kills >= 25 && !achievement_earned(ACHIEVEMENT_BLOODIED)) 968 earn_achievement(ACHIEVEMENT_BLOODIED); 969 970 turn_kills++; 971 if (turn_kills >= 5 && !achievement_earned(ACHIEVEMENT_RAMPAGE)) 972 earn_achievement(ACHIEVEMENT_RAMPAGE); 973 else if (turn_kills >= 3 && !achievement_earned(ACHIEVEMENT_BESERK)) 974 earn_achievement(ACHIEVEMENT_BESERK); 975 976 } 977 978 void reset_turn_kills() 979 { 980 turn_kills = 0; 981 } 982 983 void set_player_side(int side) 984 { 985 player_side = side; 986 } 987 988 int get_player_side() 989 { 990 return player_side; 991 } 992 993 908 994 } // preferences namespace -
trunk/Classes/game_preferences_display.cpp
r4 r23 346 346 show_ai_moves_button_.set_help_string(_("Do not animate AI units moving")); 347 347 348 save_replays_button_.set_check(save_replays());349 save_replays_button_.set_help_string(_("Save Replay on SP/MP Victory or MP Defeat"));348 // save_replays_button_.set_check(save_replays()); 349 // save_replays_button_.set_help_string(_("Save Replay on SP/MP Victory or MP Defeat")); 350 350 351 351 delete_saves_button_.set_check(delete_saves()); … … 428 428 h.push_back(&idle_anim_button_); 429 429 h.push_back(&show_ai_moves_button_); 430 h.push_back(&save_replays_button_);430 // h.push_back(&save_replays_button_); 431 431 h.push_back(&delete_saves_button_); 432 432 h.push_back(&show_grid_button_); … … 527 527 ypos += item_interline; show_team_colours_button_.set_location(rect.x, ypos); 528 528 ypos += short_interline; show_grid_button_.set_location(rect.x, ypos); 529 ypos += item_interline; save_replays_button_.set_location(rect.x, ypos);530 ypos += short_interline; delete_saves_button_.set_location(rect.x, ypos);529 // ypos += item_interline; save_replays_button_.set_location(rect.x, ypos); 530 ypos += item_interline; delete_saves_button_.set_location(rect.x, ypos); 531 531 ypos += short_interline; autosavemax_slider_label_.set_location(rect.x, ypos+5); 532 532 SDL_Rect autosavemax_rect = { rect.x + 90, ypos, … … 553 553 ypos += item_interline; show_team_colours_button_.set_location(rect.x, ypos); 554 554 ypos += short_interline; show_grid_button_.set_location(rect.x, ypos); 555 ypos += item_interline; save_replays_button_.set_location(rect.x, ypos);556 ypos += short_interline; delete_saves_button_.set_location(rect.x, ypos);555 // ypos += item_interline; save_replays_button_.set_location(rect.x, ypos); 556 ypos += item_interline; delete_saves_button_.set_location(rect.x, ypos); 557 557 ypos += short_interline; autosavemax_slider_label_.set_location(rect.x, ypos); 558 558 SDL_Rect autosavemax_rect = { rect.x, ypos+short_interline, … … 710 710 if (show_grid_button_.pressed()) 711 711 set_grid(show_grid_button_.checked()); 712 if (save_replays_button_.pressed())713 set_save_replays(save_replays_button_.checked());712 // if (save_replays_button_.pressed()) 713 // set_save_replays(save_replays_button_.checked()); 714 714 if (delete_saves_button_.pressed()) 715 715 set_delete_saves(delete_saves_button_.checked()); … … 1076 1076 show_team_colours_button_.hide(hide_general); 1077 1077 show_grid_button_.hide(hide_general); 1078 save_replays_button_.hide(hide_general);1078 // save_replays_button_.hide(hide_general); 1079 1079 delete_saves_button_.hide(hide_general); 1080 1080 autosavemax_slider_label_.hide(hide_general); -
trunk/Classes/gamestatus.cpp
r13 r23 986 986 // KP: clear all "map_data" values, for next save 987 987 save_index_cfg.recursive_clear_value("map_data"); 988 989 988 save_index_loaded = true; 990 989 } -
trunk/Classes/gui/widgets/window.cpp
r22 r23 256 256 suspend_drawing_ = false; 257 257 258 // KP: make sure we don't close by mistake 259 add_easy_close_blocker("waitasec"); 260 unsigned long easy_time = SDL_GetTicks() + 500; 261 bool block = true; 262 258 263 // Start our loop drawing will happen here as well. 259 264 for(status_ = SHOWING; status_ != REQUEST_CLOSE; ) { 265 if (block == true && SDL_GetTicks() >= easy_time) 266 { 267 remove_easy_close_blocker("waitasec"); 268 block = false; 269 } 270 260 271 // KP: always redraw options list 261 272 tlistbox* options = dynamic_cast<tlistbox*>(find_widget("input_list", true)); -
trunk/Classes/playcampaign.cpp
r19 r23 151 151 if (!disp.video().faked() && res != QUIT && end_level->linger_mode) 152 152 try { 153 playcontroller.linger(log );153 playcontroller.linger(log, res); 154 154 } catch(end_level_exception& e) { 155 155 if (e.result == QUIT) { -
trunk/Classes/playsingle_controller.cpp
r19 r23 34 34 #include "events.hpp" 35 35 #include "loadscreen.hpp" 36 37 #include "memory_wrapper.h" 36 38 37 39 #define ERR_NG LOG_STREAM(err, engine) … … 662 664 gui_->invalidate_all(); 663 665 gui_->draw(true,true); 666 667 draw_wait_cursor(); 668 free_all_caches(); 664 669 665 670 if (save) { … … 670 675 sound::play_bell(game_config::sounds::turn_bell); 671 676 } 677 678 // KP: achievement stuff 679 preferences::set_player_side(player_number_); 680 preferences::reset_turn_kills(); 681 682 683 int gold = teams_manager::get_teams()[player_number_ - 1].gold(); 684 if (gold >= 500) 685 earn_achievement(ACHIEVEMENT_MONEY_HOARDER); 686 else if (gold >= 300) 687 earn_achievement(ACHIEVEMENT_PENNY_PINCHER); 688 689 int units = 0; 690 for (unit_map::const_iterator it = units_.begin(); it != units_.end(); it++) 691 { 692 if ((*it).second.side() == player_number_) 693 units++; 694 } 695 if (units >= 30) 696 earn_achievement(ACHIEVEMENT_GREAT_GENERAL); 697 else if (units >= 20) 698 earn_achievement(ACHIEVEMENT_PROFICIENT_COMMANDER); 672 699 } 673 700 … … 727 754 }; 728 755 729 void playsingle_controller::linger(upload_log& log )756 void playsingle_controller::linger(upload_log& log, LEVEL_RESULT res) 730 757 { 731 758 LOG_NG << "beginning end-of-scenario linger\n"; … … 746 773 gui_->invalidate_theme(); 747 774 gui_->redraw_everything(); 748 775 749 776 // End all unit moves 750 777 for (unit_map::iterator u = units_.begin(); u != units_.end(); u++) { 751 778 u->second.set_user_end_turn(true); 752 779 } 780 781 782 // KP: check mission achievements here 783 int early = status_.number_of_turns() - status_.turn(); 784 if (res == VICTORY && early >= 10) 785 { 786 earn_achievement(ACHIEVEMENT_DIVINE_BLESSING); 787 } 788 if (res == VICTORY && early >= 15) 789 { 790 earn_achievement(ACHIEVEMENT_LIGHTNING_QUICK_BLADES); 791 } 792 793 753 794 try { 754 795 // Same logic as single-player human turn, but … … 807 848 gui_->set_route(NULL); 808 849 gui_->unhighlight_reach(); 850 851 preferences::reset_turn_kills(); 809 852 } 810 853 -
trunk/Classes/playsingle_controller.hpp
r8 r23 61 61 virtual void user_command_3(); 62 62 #endif 63 void linger(upload_log& log );63 void linger(upload_log& log, LEVEL_RESULT res); 64 64 65 65 protected: -
trunk/Classes/preferences.cpp
r4 r23 619 619 sound::reset_sound(); 620 620 } 621 621 622 622 623 } // end namespace preferences -
trunk/Classes/preferences.hpp
r4 r23 163 163 bool grid(); 164 164 void _set_grid(bool ison); 165 165 166 } // end namespace preferences 166 167 -
trunk/Classes/tcmalloc/central_freelist.cc
r4 r23 85 85 86 86 counter_++; 87 span->refcount--; 87 span->refcount--; // KP: tends to crash here???? 88 88 if (span->refcount == 0) { 89 89 Event(span, '#', 0); -
trunk/Classes/tcmalloc/common.h
r4 r23 70 70 // scavenging code will shrink it down when its contents are not in use. 71 71 static const int kMaxDynamicFreeListLength = 8192; 72 //static const int kMaxDynamicFreeListLength = 256;73 72 74 73 static const Length kMaxValidPages = (~static_cast<Length>(0)) >> kPageShift; -
trunk/Classes/tcmalloc/page_heap.cc
r4 r23 213 213 } 214 214 Span* next = GetDescriptor(p+n); 215 if (next != NULL && next->location != Span::IN_USE) { 215 if (next != NULL && next->location != Span::IN_USE) { // KP: crashes on this line??? 216 216 // Merge next span into this span 217 217 ASSERT(next->start == p+n); -
trunk/Classes/video.cpp
r22 r23 882 882 883 883 SDL_Rect outside = {x-1, y-1, w+2, h+2}; 884 fill_rect(0xffffffff, &outside); 884 fill_rect(0xffffffff, &outside); // white outline 885 885 outside.x++; 886 886 outside.y++; 887 887 outside.w -= 2; 888 outside.h -= 2; 889 fill_rect(0x505050, &outside); 890 SDL_Rect inside = {x, y+fillStart, w, h-fillStart}; 891 fill_rect(fillColor, &inside); 888 outside.h = fillStart; 889 fill_rect(0x505050, &outside); // unfilled area 890 if (fillColor != 0xff000000) // (fix totally unfilled...) 891 { 892 SDL_Rect inside = {x, y+fillStart, w, h-fillStart}; 893 fill_rect(fillColor, &inside); // filled area 894 } 892 895 } 893 896 -
trunk/OpenFeint/api/internal/OpenFeint/Services/SocialNotification/OFSocialNotificationService+Private.mm
r22 r23 101 101 { 102 102 NSString* notificationText = [NSString 103 stringWithFormat:@"I unlocked \"%@\" in \"%@\"!", 104 achievement.achievement.title, 105 [OpenFeint applicationShortDisplayName]]; 103 stringWithFormat:@"I unlocked \"%@\" in \"Battle for Wesnoth\" for iPhone!", 104 achievement.achievement.title]; 106 105 107 106 OFSocialNotification* notice = [[[OFSocialNotification alloc] … … 118 117 { 119 118 NSString* notificationText = [NSString 120 stringWithFormat:@"I unlocked %i achievements in \" %@\"!",121 [page count] ,122 [OpenFeint applicationShortDisplayName]];119 stringWithFormat:@"I unlocked %i achievements in \"Battle for Wesnoth\" for iPhone!", 120 [page count] 121 ]; 123 122 124 123 OFSocialNotification* notice = [[[OFSocialNotification alloc] -
trunk/include/SDL/SDL_stdinc.h
r6 r23 197 197 /* *INDENT-ON* */ 198 198 #endif 199 199 200 200 #ifdef HAVE_MALLOC 201 201 #define SDL_malloc malloc -
trunk/res/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg
r22 r23 271 271 [/option] 272 272 [option] 273 message= _ " That sounds frightening.Let someone else have it."273 message= _ "Let someone else have it." 274 274 [/option] 275 275 [/message] -
trunk/res/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg
r22 r23 645 645 [message] 646 646 speaker=Kai Krellis 647 message= _ "We have destroyed the undead. "647 message= _ "We have destroyed the undead. But what of the orcs?" 648 648 [option] 649 message= _ " Now maybe we can head west undisturbed."649 message= _ "Head west undisturbed." 650 650 [command] 651 651 [endlevel] … … 656 656 [/option] 657 657 [option] 658 message= _ " This orc leader has not learned that threatening merfolk is a bad idea. We shall defeat himbefore we go."658 message= _ "Defeat the orcs before we go." 659 659 [/option] 660 660 [/message] -
trunk/res/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg
r22 r23 926 926 speaker=unit 927 927 [option] 928 message= _ " I'll carry this sword and destroy undead with blasts of flame."928 message= _ "Pick up the sword." 929 929 [command] 930 930 [set_variable] … … 935 935 [/option] 936 936 [option] 937 message= _ " This sword is not right for me.Let someone else have it."937 message= _ "Let someone else have it." 938 938 [/option] 939 939 [/message] -
trunk/res/data/campaigns/Dead_Water/scenarios/12_Revenge.cfg
r22 r23 888 888 speaker=$unit.id 889 889 [option] 890 message= _ " I think that could be usefull. I'll take it."890 message= _ "Take the necklace." 891 891 [command] 892 892 [set_variable] … … 897 897 [/option] 898 898 [option] 899 message= _ " It doesn't seem to have helped its previous owner. I don't wantit."899 message= _ "Let someone else have it." 900 900 [/option] 901 901 [/message] -
trunk/res/data/campaigns/Dead_Water/utils/items.cfg
r22 r23 246 246 speaker=Kai Krellis 247 247 [option] 248 message= _ " We will let the bat have the ring. It will make him more helpful."248 message= _ "Let the bat have the ring" 249 249 [command] 250 250 [set_variable] … … 255 255 [/option] 256 256 [option] 257 message= _ " Someone take that off of him before he hurts himself."257 message= _ "Take it off the bat." 258 258 [/option] 259 259 [/message] … … 292 292 speaker=unit 293 293 [option] 294 message= _ " I'll take this ring, and you can rely on my strength."294 message= _ "Pick up the ring" 295 295 [command] 296 296 [set_variable] … … 301 301 [/option] 302 302 [option] 303 message= _ " This thing makes me dizzy. Someone else can have it."303 message= _ "Let someone else have it" 304 304 [/option] 305 305 [/message] -
trunk/res/data/campaigns/Eastern_Invasion/scenarios/04b.The_Undead_Border_Patrol.cfg
r7 r23 161 161 message= _ "Hmm..." 162 162 [option] 163 message= _ " I wish to destroy the evil before it can spread. East we go!"163 message= _ "Go further east" 164 164 [command] 165 165 [message] … … 180 180 [/option] 181 181 [option] 182 message= _ " You are right. It is foolish to go onward - we must defeat Mal-Skraat and turn back, going to the Northern Outpost."182 message= _ "Turn back to the Northern Outpost" 183 183 [command] 184 184 [message] -
trunk/res/data/campaigns/Eastern_Invasion/scenarios/17.Weldyn_Under_Attack.cfg
r7 r23 290 290 message= _ "Hmm..." 291 291 [option] 292 message= _ " I will accept this challenge. By your own master's terms, that proves I am no coward."292 message= _ "Accept the challenge" 293 293 [command] 294 294 [store_unit] … … 307 307 [/option] 308 308 [option] 309 message= _ " I will not accept a fight in which he will obviously cheat! I refuse!"309 message= _ "He will obviously cheat! I refuse!" 310 310 [command] 311 311 [store_unit] -
trunk/res/data/campaigns/Heir_To_The_Throne/scenarios/04_The_Bay_of_Pearls.cfg
r7 r23 747 747 message= _ "It is north-west of here, a few leagues inland. There are two ways to go, by ship or on foot. Each has its own dangers. You must choose between them." 748 748 [option] 749 message= _ "Ships? Ugh! I have been sea sick for the last time.We shall walk!"749 message= _ "Ships? Ugh! We shall walk!" 750 750 [command] 751 751 [message] … … 765 765 [/option] 766 766 [option] 767 message= _ " Going by ship we may at least get a little rest for ourselves.By sea it is!"767 message= _ "By sea it is!" 768 768 [command] 769 769 [message] -
trunk/res/data/campaigns/Heir_To_The_Throne/scenarios/06_The_Siege_of_Elensefar.cfg
r7 r23 291 291 message= _ "Hmm... I have to consider this..." 292 292 [option] 293 message= _ "Help us infiltrate the city . We can do the rest."293 message= _ "Help us infiltrate the city" 294 294 [command] 295 295 [message] … … 307 307 [/option] 308 308 [option] 309 message= _ " I want you to reinforce us once we break through their line."309 message= _ "Reinforce us once we break through" 310 310 [command] 311 311 [message] -
trunk/res/data/campaigns/Heir_To_The_Throne/scenarios/18_A_Choice_Must_Be_Made.cfg
r7 r23 362 362 message= _ "I say that..." 363 363 [option] 364 message= _ "Our need for speed outweighs the danger . With the Merfolk to help us, we will win through."364 message= _ "Our need for speed outweighs the danger" 365 365 [command] 366 366 {CLEAR_VARIABLE dialog} … … 375 375 [/option] 376 376 [option] 377 message= _ "On second thought, perhaps we should choose a safer way to go."377 message= _ "On second thought, safety first!" 378 378 [command] 379 379 [message] -
trunk/res/data/campaigns/Invasion_from_the_Unknown/scenarios/04_Over_the_Sands.cfg
r19 r23 613 613 [/option] 614 614 [option] 615 message= _ "No. We may get better results if we take over your village"615 message= _ "No. We will take over your village!" 616 616 [show_if] 617 617 {VARIABLE_NUM_GREATER_OR_EQUAL_THAN temp_side1_store.gold $fee_value} … … 629 629 [/option] 630 630 [option] 631 message= _ "No, unfortunatelywe don't have that much gold."631 message= _ "No, we don't have that much gold." 632 632 [show_if] 633 633 {VARIABLE_NUM_LESS_THAN temp_side1_store.gold $fee_value} … … 645 645 [/option] 646 646 [option] 647 message= _ "Oh, please. Have mercy on us! We were forced to abandon our home, and are now lost in this vast desert! How can you expect us to have enough gold to give you?"647 message= _ "Oh, please. Have mercy on us!" 648 648 [show_if] 649 649 {VARIABLE_NUM_LESS_THAN temp_side1_store.gold $fee_value} … … 1371 1371 [/option] 1372 1372 [option] 1373 message= _ "No. Perhaps later , if I change my mind."1373 message= _ "No. Perhaps later..." 1374 1374 [command] 1375 1375 {MSG_UNIT (Mal Keshar) ( _ "Very well, but I don't think that we could come back later...")} -
trunk/res/data/campaigns/Invasion_from_the_Unknown/scenarios/05a_Crossfire.cfg
r19 r23 260 260 [/option] 261 261 [option] 262 message= _ "Ignore them for nowand let them flee."262 message= _ "Ignore them and let them flee." 263 263 [command] 264 264 [role] … … 424 424 message= _ "Um... well." 425 425 [option] 426 message= _ "We shall hear your offer. Just swear you will never cause us trouble again."426 message= _ "We shall hear your offer." 427 427 428 428 [command] … … 585 585 [/option] 586 586 [option] 587 message= _ "Your kind cannot be trusted . Any other last words?"587 message= _ "Your kind cannot be trusted!" 588 588 [command] 589 589 # They are dead -
trunk/res/data/campaigns/Invasion_from_the_Unknown/scenarios/08a_Errand_of_Hope.cfg
r19 r23 1075 1075 message= _ "Um..." 1076 1076 [option] 1077 message= _ "A better home, in the large body of water called 'Ocean' far to the West, to be free!"1077 message= _ "A better home, in the ocean!" 1078 1078 [command] 1079 1079 {VARIABLE temp_speech_got_it 0} … … 1082 1082 [/option] 1083 1083 [option] 1084 message= _ "Gold. What about 10 pieces to start with?"1084 message= _ "Gold. What about 10?" 1085 1085 [command] 1086 1086 {VARIABLE temp_speech_got_it 0} … … 1089 1089 [/option] 1090 1090 [option] 1091 message= _ "Some fun, killing enemies with us , perhaps..?"1091 message= _ "Some fun, killing enemies with us!" 1092 1092 [command] 1093 1093 {VARIABLE temp_speech_got_it 1} … … 1111 1111 message= _ "Um..." 1112 1112 [option] 1113 message= _ " I do not trust them. We should kill them just in case they attack us afterwards."1113 message= _ "Kill them all" 1114 1114 [command] 1115 1115 {MSG_UNIT Galas ( _ "Very well. Kill them.")} … … 1148 1148 [/option] 1149 1149 [option] 1150 message= _ " They have chosen their path. We must respect their decision."1150 message= _ "Respect their decision." 1151 1151 [command] 1152 1152 {MSG_UNIT Galas ( _ "Very well.")} -
trunk/res/data/campaigns/Invasion_from_the_Unknown/scenarios/10_The_Source_of_Light.cfg
r19 r23 1598 1598 message= _ "This strange potion bottle gives me the chills. A label with a skull on it makes it clear that it is a bad thing, but for some reason it does not smell like poison. This scroll I found next to it explains that it is a draining potion - that while it makes the drinker much weaker, but it also grants them the draining ability with their melee attacks. I am not sure if it is really worth the exchange, but draining my opponent's vital energy certainly attracts me." 1599 1599 [option] 1600 message= _ " I think it is worthwhile.Let me have it."1600 message= _ "Let me have it." 1601 1601 [command] 1602 1602 {VARIABLE took_drainer yes} … … 1640 1640 [/option] 1641 1641 [option] 1642 message= _ " On a second thought, I don't like the idea. It is revolting."1642 message= _ "I don't like the idea..." 1643 1643 [/option] 1644 1644 [/message] … … 1715 1715 message= _ "What a beautiful flask for a potion! Reddish in color, I open and smell it, and immediately feel euphoric and energized. It must be one of those ancient 'berserk' potions, which make the drinker stronger and frenetically lethal to their enemies. This implies many risks in combat, as berserk attacks don't allow you to get protection and so forth during combat. However, it might prove to be useful in our war against the demons." 1716 1716 [option] 1717 message= _ "I'll take it . I do not fear death!"1717 message= _ "I'll take it!" 1718 1718 [command] 1719 1719 {VARIABLE took_berserker yes} … … 1769 1769 [option] 1770 1770 # FIXME: this text might be too much like a biased opinion of mine on berserkers! 1771 message= _ " On the other hand, I do not want to give up control of my emotions during battle."1771 message= _ "Better left for someone else..." 1772 1772 [/option] 1773 1773 [/message] … … 1943 1943 [/option] 1944 1944 [option] 1945 message= _ " I think it would be safer to keep away from this cave."1945 message= _ "Keep away from this cave." 1946 1946 [/option] 1947 1947 [/message] -
trunk/res/data/campaigns/Legend_of_Wesmere/scenarios/07_Elves_last_stand_utils.cfg
r7 r23 161 161 [option] 162 162 id=incommand_true 163 message= _ "You do me great honor. I will strive to be worthy of it."163 message= _ "You do me great honor." 164 164 [command] 165 165 [set_variable] … … 171 171 [option] 172 172 id=incommand_false 173 message= _ " You do me great honor, butI am not yet ready for this."173 message= _ "I am not yet ready for this." 174 174 [command] 175 175 [set_variable] -
trunk/res/data/campaigns/Liberty/scenarios/06_The_Gray_Woods.cfg
r7 r23 360 360 message= _ "I leave it to you to decide." 361 361 [option] 362 message= _ "I will take the gold. How does 500 sound?"362 message= _ "I will take 500 gold" 363 363 [command] 364 364 [message] … … 385 385 # Note: don't mess with the alignment in the next message key. 386 386 [option] 387 message= _ "Send your men with us . They will be valuable help as we prepare for the assault from the Wesnoth army garrison."387 message= _ "Send your men with us" 388 388 [command] 389 389 [message] … … 403 403 [/option] 404 404 [option] 405 message= _ " I wish you to join us in battle against the Queen's forces."405 message= _ "Join us in battle" 406 406 [command] 407 407 [message] -
trunk/res/data/campaigns/Northern_Rebirth/scenarios/10a_Stolen_Gold.cfg
r7 r23 870 870 message= _ "Hmmm, should we let the trolls run away or should we finish them now?" 871 871 [option] 872 message= _ " Hey!Stand your ground, you cowards!"872 message= _ "Stand your ground, you cowards!" 873 873 [command] 874 874 [message] … … 995 995 message= _ "Hmmm, should we let the trolls run away or should we finish them now?" 996 996 [option] 997 message= _ " Hey!Stand your ground, you cowards!"997 message= _ "Stand your ground, you cowards!" 998 998 [command] 999 999 [message] -
trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/02_The_Fall.cfg
r7 r23 284 284 285 285 [option] 286 message= _ " I think that your skills may be useful.You may join us."286 message= _ "You may join us." 287 287 [command] 288 288 [message] … … 337 337 [/option] 338 338 [option] 339 message= _ "Your word can't be trusted . Prepare to meet your gods!"339 message= _ "Your word can't be trusted!" 340 340 image=portraits/haldric-mad.png 341 341 [command] -
trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/03_A_Harrowing_Escape.cfg
r7 r23 273 273 274 274 [option] 275 message= _ " I think I'll take the River Road..."275 message= _ "Take the River Road..." 276 276 [command] 277 277 [message] … … 294 294 [/option] 295 295 [option] 296 message= _ " We'll go through the Midlands..."296 message= _ "Go through the Midlands..." 297 297 [command] 298 298 [message] -
trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/09_Fallen_Lich_Point.cfg
r7 r23 363 363 364 364 [option] 365 message= _ " I think I'll say that magic phrase."365 message= _ "Say that magic phrase." 366 366 367 367 [command] … … 416 416 417 417 [option] 418 message= _ " I think I'll wait a while before uttering any magic phrases."418 message= _ "Wait a while." 419 419 420 420 [command] -
trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/16_Elf_Lords.cfg
r7 r23 140 140 #define DRAGON 141 141 [option] 142 message= _ " I think I'll fight the dragon!"142 message= _ "Fight the dragon!" 143 143 144 144 [show_if] … … 183 183 #define BEACH 184 184 [option] 185 message= _ " Let's get those saurians and nagas on that beach!"185 message= _ "Get those saurians and nagas!" 186 186 187 187 [show_if] … … 268 268 #define ISLE 269 269 [option] 270 message= _ "Let's put those souls to rest on the cursed isle!"270 message= _ "Let's put those souls to rest!" 271 271 272 272 [show_if] -
trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/17a_The_Dragon.cfg
r7 r23 485 485 486 486 [option] 487 message= _ " Let's get out of here!"487 message= _ "Get out of here!" 488 488 [command] 489 489 [endlevel] … … 496 496 497 497 [option] 498 message= _ " Let's finish off the rest of these monsters!"498 message= _ "Finish off the rest!" 499 499 [/option] 500 500 [/message] -
trunk/res/data/campaigns/The_South_Guard/scenarios/05_Choice_In_The_Fog.cfg
r22 r23 441 441 message= _ "Hmm...I have to consider this..." 442 442 [option] 443 message= _ " Very well.All men must unite against the undead."443 message= _ "All men must unite against the undead." 444 444 [command] 445 445 [music] … … 575 575 576 576 [option] 577 message= _ "Your crimes are too great . You will fall with the rest of the foul undead!"577 message= _ "Your crimes are too great!" 578 578 [command] 579 579 [music] -
trunk/res/data/campaigns/The_South_Guard/scenarios/07a_Into_The_Depths.cfg
r7 r23 479 479 message= _ "What should we offer them for their help?" 480 480 [option] 481 message= _ " We will give you $troll_help_cost gold pieces if you help us defeat the undead."481 message= _ "Offer $troll_help_cost gold" 482 482 [command] 483 483 [store_side] … … 539 539 540 540 [option] 541 message= _ " We will offer you freedom and a place in our lands."541 message= _ "Offer freedom and land" 542 542 [command] 543 543 [message] … … 634 634 [/show_if] 635 635 636 message= _ "Here's $troll_help_cost for your help against the undead."636 message= _ "Here's $troll_help_cost gold" 637 637 638 638 [command] -
trunk/res/data/campaigns/Two_Brothers/scenarios/2_The_Chase.cfg
r7 r23 419 419 message= _ "It is my place to decide this." 420 420 [option] 421 message= _ " Oh, all right then.Come along with us."421 message= _ "Come along with us." 422 422 [command] 423 423 [message] … … 431 431 [/option] 432 432 [option] 433 message= _ " I am sorry. We have not thetime to spare."433 message= _ "We have no time to spare." 434 434 [command] 435 435 [message] -
trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/04_Descending_into_Darkness.cfg
r7 r23 1266 1266 message= _ "How odd. Someone has carved a crude fountain out of the stone at the end of the passage. The freezing water pours out into a large pool. At the bottom of the pool I can see a skeleton still gripping a sword. The blade seems to glow faintly blue. The pool isn't very deep, I could easily wade in and pick it up. But someone else has carved a crude message in the wall. 'If you dare to take this blade here, your greatest fear will surely appear' It looks like a nice sword, but do I dare chance it?" 1267 1267 [option] 1268 message= _ " I fear no creature, I will take the blade!"1268 message= _ "Take the blade!" 1269 1269 [command] 1270 1270 [set_variable] … … 1328 1328 1329 1329 [option] 1330 message= _ " I don't like the sound of this. I'm out of here."1330 message= _ "Leave it for someone else." 1331 1331 [/option] 1332 1332 [/message] -
trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/06a_In_the_Tunnels_of_Trolls.cfg
r7 r23 2454 2454 2455 2455 [option] 2456 message= _ " On second thought, it's better to leave the dead in peace."2456 message= _ "Leave the dead in peace." 2457 2457 2458 2458 [command] -
trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/06b_In_the_Domain_of_Dwarves.cfg
r7 r23 2306 2306 message= _ "Based on the runes covering the walls this must be the tomb of some ancient dwarf. The tomb seems empty except for this ornate stone coffin. The skeleton inside the coffin has long since vanished into dust. All that's left are a few ceremonial trinkets and this shining golden belt. Inscribed on this inside are the words: 'May you have the toughness to stay standing long after your enemies fall' Grave robbing is never a good thing to do, but this belt looks magical and its former owner certainly won't miss it." 2307 2307 [option] 2308 message= _ "I fear no ghosts , I'll take it."2308 message= _ "I fear no ghosts!" 2309 2309 [command] 2310 2310 [set_variable] … … 2356 2356 2357 2357 [option] 2358 message= _ " On second thought, it's better to leave the dead in peace."2358 message= _ "Leave the dead in peace." 2359 2359 2360 2360 [command] -
trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/07a_Dealing_with_Dwarves.cfg
r7 r23 819 819 820 820 [option] 821 message= _ " No, I think someone else should wield it."821 message= _ "Someone else should wield it." 822 822 [/option] 823 823 [/message] -
trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/07b_Talking_with_Trolls.cfg
r7 r23 815 815 816 816 [option] 817 message= _ " No, I think someone else should wield it."817 message= _ "Someone else should wield it." 818 818 [/option] 819 819 [/message] -
trunk/wesnoth.xcodeproj/project.pbxproj
r22 r23 970 970 27454EC1108995FB0075BBD2 /* xml_woarchive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27454E83108995FB0075BBD2 /* xml_woarchive.cpp */; }; 971 971 2759B24210D4E1310074F50A /* achievements.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2759B24110D4E1310074F50A /* achievements.mm */; }; 972 2764949E10FDC9E9002EABBA /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = 2764949910FDC9E9002EABBA /* fonts */; };973 2764949F10FDC9E9002EABBA /* sounds in Resources */ = {isa = PBXBuildFile; fileRef = 2764949A10FDC9E9002EABBA /* sounds */; };974 276494A010FDC9E9002EABBA /* data in Resources */ = {isa = PBXBuildFile; fileRef = 2764949B10FDC9E9002EABBA /* data */; };975 276494A110FDC9E9002EABBA /* precache in Resources */ = {isa = PBXBuildFile; fileRef = 2764949C10FDC9E9002EABBA /* precache */; };976 276494A210FDC9E9002EABBA /* images in Resources */ = {isa = PBXBuildFile; fileRef = 2764949D10FDC9E9002EABBA /* images */; };977 972 2782D28D100DB08A00C5386D /* cdjpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 2782D24C100DB08A00C5386D /* cdjpeg.c */; }; 978 973 2782D291100DB08A00C5386D /* jaricom.c in Sources */ = {isa = PBXBuildFile; fileRef = 2782D251100DB08A00C5386D /* jaricom.c */; }; … … 2820 2815 2759B24010D4E1310074F50A /* achievements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = achievements.h; path = Classes/achievements.h; sourceTree = "<group>"; }; 2821 2816 2759B24110D4E1310074F50A /* achievements.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = achievements.mm; path = Classes/achievements.mm; sourceTree = "<group>"; }; 2822 2764949910FDC9E9002EABBA /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = fonts; path = res/fonts; sourceTree = "<group>"; };2823 2764949A10FDC9E9002EABBA /* sounds */ = {isa = PBXFileReference; lastKnownFileType = folder; name = sounds; path = res/sounds; sourceTree = "<group>"; };2824 2764949B10FDC9E9002EABBA /* data */ = {isa = PBXFileReference; lastKnownFileType = folder; name = data; path = res/data; sourceTree = "<group>"; };2825 2764949C10FDC9E9002EABBA /* precache */ = {isa = PBXFileReference; lastKnownFileType = folder; name = precache; path = res/precache; sourceTree = "<group>"; };2826 2764949D10FDC9E9002EABBA /* images */ = {isa = PBXFileReference; lastKnownFileType = folder; name = images; path = res/images; sourceTree = "<group>"; };2827 2817 2782D24B100DB08A00C5386D /* cderror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cderror.h; path = include/jpeglib/cderror.h; sourceTree = "<group>"; }; 2828 2818 2782D24C100DB08A00C5386D /* cdjpeg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cdjpeg.c; path = include/jpeglib/cdjpeg.c; sourceTree = "<group>"; }; … … 7564 7554 isa = PBXGroup; 7565 7555 children = ( 7566 2764949910FDC9E9002EABBA /* fonts */,7567 2764949A10FDC9E9002EABBA /* sounds */,7568 2764949B10FDC9E9002EABBA /* data */,7569 2764949C10FDC9E9002EABBA /* precache */,7570 2764949D10FDC9E9002EABBA /* images */,7571 7556 FD77A07E0E26BDA900F39101 /* Default.png */, 7572 7557 FD77A07C0E26BD8C00F39101 /* Icon.png */, … … 7944 7929 2738F75C10E78EFC006BE9F2 /* OFDashboardTabNowPlayingLandscapeHit.png in Resources */, 7945 7930 2738F7F010E78F99006BE9F2 /* openfeint_offline_config.xml in Resources */, 7946 2764949E10FDC9E9002EABBA /* fonts in Resources */,7947 2764949F10FDC9E9002EABBA /* sounds in Resources */,7948 276494A010FDC9E9002EABBA /* data in Resources */,7949 276494A110FDC9E9002EABBA /* precache in Resources */,7950 276494A210FDC9E9002EABBA /* images in Resources */,7951 7931 ); 7952 7932 runOnlyForDeploymentPostprocessing = 0; -
trunk/wesnoth_notes.txt
r22 r23 791 791 Title screen, load game, back to title screen.... 9.3mb in use... but of course, we have loaded the full wml, which must be 8mb big! 792 792 793 Finished loading level 794 ------------------------------------------------ 795 MALLOC: 19562496 ( 18.7 MB) Heap size 796 MALLOC: 15904632 ( 15.2 MB) Bytes in use by application 797 MALLOC: 2965504 ( 2.8 MB) Bytes free in page heap 798 MALLOC: 156672 ( 0.1 MB) Bytes free in central cache 799 MALLOC: 0 ( 0.0 MB) Bytes free in transfer cache 800 MALLOC: 535688 ( 0.5 MB) Bytes free in thread caches 801 MALLOC: 3521 Spans in use 802 MALLOC: 1 Thread heaps in use 803 MALLOC: 524288 ( 0.5 MB) Metadata allocated 804 ------------------------------------------------ 805 806 - saved 1mb by optimizing builder cache data structures 807 Turn 2: 23mb 808 3: 25mb 809 4: 26mb 810 811 ------------ 812 There needs to be a way for tcmalloc to scavange at will: 813 For example, after completing a level, 814 815 After cache free 816 ------------------------------------------------ 817 MALLOC: 26902528 ( 25.7 MB) Heap size 818 MALLOC: 14694128 ( 14.0 MB) Bytes in use by application 819 MALLOC: 8912896 ( 8.5 MB) Bytes free in page heap 820 MALLOC: 2311928 ( 2.2 MB) Bytes free in central cache 821 MALLOC: 76800 ( 0.1 MB) Bytes free in transfer cache 822 MALLOC: 906776 ( 0.9 MB) Bytes free in thread caches 823 MALLOC: 4141 Spans in use 824 MALLOC: 1 Thread heaps in use 825 MALLOC: 524288 ( 0.5 MB) Metadata allocated 826 ------------------------------------------------ 827 iPhone system memory used: 54927360 free: 7450624 total: 62377984 828 initialized teams... 712 829 loading units...3556 830 initializing display... 3568 831 TCMALLOC: alloc size 2785280 (Bytes); Total : 28 (Mb) 832 iPhone system memory used: 55660544 free: 7012352 total: 62672896 833 TCMALLOC: alloc size 131072 (Bytes); Total : 28 (Mb) 834 iPhone system memory used: 55660544 free: 7012352 total: 62672896 835 836 Took 5964 ms to read cached file /var/mobile/Applications/19B7E670-09FB-43B4-877F-CB6B7392B0B9/wesnoth.app/precache/terrain 837 done initializing display... 12550 838 initializing managers... 12550 839 done initializing managers... 12559 840 841 842 Finished loading level 843 ------------------------------------------------ 844 MALLOC: 29687808 ( 28.3 MB) Heap size 845 MALLOC: 20835832 ( 19.9 MB) Bytes in use by application 846 MALLOC: 8151040 ( 7.8 MB) Bytes free in page heap 847 MALLOC: 196976 ( 0.2 MB) Bytes free in central cache 848 MALLOC: 0 ( 0.0 MB) Bytes free in transfer cache 849 MALLOC: 503960 ( 0.5 MB) Bytes free in thread caches 850 MALLOC: 4456 Spans in use 851 MALLOC: 1 Thread heaps in use 852 MALLOC: 655360 ( 0.6 MB) Metadata allocated 853 ------------------------------------------------ 854
Note: See TracChangeset
for help on using the changeset viewer.