Changeset 23


Ignore:
Timestamp:
2010-01-17 14:01:38 (2 years ago)
Author:
kpoole
Message:

finalized achievements

Location:
trunk
Files:
21 added
60 edited

Legend:

Unmodified
Added
Removed
  • trunk/Classes/RenderQueue.cpp

    r22 r23  
    278278                        for (int k=j; k < mTextureQueue.size(); k++) 
    279279                        { 
    280                             if (mTextureQueue[k].type == QUEUE_TYPE_FILL && mTextureQueue[k].textCoords[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) 
    281281                            { 
    282                                 glVertexPointer(2, GL_SHORT, 0, mTextureQueue[j].vertices); 
     282                                glVertexPointer(2, GL_SHORT, 0, mTextureQueue[k].vertices); 
    283283                                glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); 
    284284                         
  • trunk/Classes/SDL/src/video/uikit/SDL_uikitappdelegate.mm

    r22 r23  
    4848    { 
    4949        // 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); 
    5151         
    5252        // 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); 
    5454    } 
    5555#endif 
     
    157157- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application   
    158158{    
    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     */ 
    162165 
    163166 
  • trunk/Classes/achievements.h

    r22 r23  
    1515#define ACHIEVEMENTS_H_INCLUDED 
    1616 
     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 
    1739void of_init(void);                 // Initialize OpenFeint 
    1840void of_dashboard(void);            // Open the OpenFeint dashboard 
    19  
     41void earn_achievement(int achievement, bool show_dlg = true); 
     42std::string achievement_name(int achievement); 
    2043#endif 
  • trunk/Classes/achievements.mm

    r22 r23  
    1919#include "OFAchievement.h" 
    2020 
     21#include "game_preferences.hpp" 
    2122 
    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 
     27std::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 
     31NSString* ids[] = { @"112754", @"112764", @"112774", @"112784", @"112794", @"112804", @"112814", @"112824", @"112844", @"112904", @"113334", 
     32    @"113344", @"113354", @"113364", @"113374", @"113384", @"113394", @"113404", @"113414", @"113424"}; 
     33 
     34std::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"}; 
    4239 
    4340bool gInitialized = false; 
     
    6663} 
    6764 
    68 void earn_achievement(int achievement) 
     65std::string achievement_name(int achievement) 
    6966{ 
    70     [OFAchievementService unlockAchievement:KILLS_25]; 
     67    return names[achievement]; 
    7168} 
    7269 
    73  
     70void 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  
    11481148 
    11491149            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                 
    11501154                a_.xp_ = game_config::kill_experience * d_.get_unit().level(); 
    11511155                if(d_.get_unit().level() == 0) 
     
    14171421 
    14181422            if(dies) { // defender kills attacker 
     1423                if (d_.get_unit().side() == preferences::get_player_side()) 
     1424                    preferences::add_kill(); 
     1425 
    14191426                d_.xp_ = game_config::kill_experience * a_.get_unit().level(); 
    14201427                if(a_.get_unit().level() == 0) 
     
    18981905    LOG_NG << "firing post_advance event at " << loc << "\n"; 
    18991906    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         
    19001920} 
    19011921 
  • trunk/Classes/builder.cpp

    r12 r23  
    3939#define ERR_NG LOG_STREAM(err, engine) 
    4040#define DEBUG_NG LOG_STREAM(info, engine) 
     41 
     42extern "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}; 
    4150 
    4251/** The tile width used when using basex and basey. This is not, 
     
    507516        // Transforms attributes 
    508517        //std::vector<std::string>::iterator flag; 
     518        /* 
    509519        std::vector<shared_string>::iterator flag; 
    510 //      if (cons->second.set_flag) 
    511 //      { 
    512520        for(flag = cons->second.set_flag.begin(); flag != cons->second.set_flag.end(); flag++) { 
    513521            replace_token(*flag, token, replacement); 
    514522        } 
    515 //      } 
    516 //      if (cons->second.no_flag) 
    517 //      { 
    518523        for(flag = cons->second.no_flag.begin(); flag != cons->second.no_flag.end(); flag++) { 
    519524            replace_token(*flag, token, replacement); 
    520525        } 
    521 //      } 
    522 //      if (cons->second.has_flag) 
    523 //      { 
    524526        for(flag = cons->second.has_flag.begin(); flag != cons->second.has_flag.end(); flag++) { 
    525527            replace_token(*flag, token, replacement); 
    526528        } 
    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        } 
    529534            replace_token(cons->second.images, token, replacement); 
    530535    } 
     
    667672    if (item_string.size() > 0) 
    668673    { 
    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        } 
    673683    } 
    674684 
     
    676686    if (item_string.size() > 0) 
    677687    { 
    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         
    682698    } 
    683699     
     
    685701    if (item_string.size() > 0) 
    686702    { 
    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    } 
    693714        add_images_from_config(constraint.images, cfg, false); 
    694715} 
     
    838859            if(global_set_flag.size()) 
    839860            { 
    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); 
    843866            } 
    844867 
    845868            if(global_no_flag.size()) 
    846869            { 
    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);                 
    850875            } 
    851876 
    852877            if(global_has_flag.size()) 
    853878            { 
    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);                 
    857884            } 
    858885 
     
    965992        const tile& btile = tile_map_[tloc]; 
    966993 
     994        /* 
    967995        //std::vector<std::string>::const_iterator itor; 
    968996        std::vector<shared_string>::const_iterator itor; 
    969 //      if (cons->second.no_flag) 
    970 //      { 
    971997        for(itor = cons->second.no_flag.begin(); itor != cons->second.no_flag.end(); ++itor) { 
    972998 
     
    9761002            } 
    9771003        } 
    978 //      } 
    979 //      if (cons->second.has_flag) 
    980 //      { 
    9811004        for(itor = cons->second.has_flag.begin(); itor != cons->second.has_flag.end(); ++itor) { 
    9821005 
     
    9861009            } 
    9871010        } 
    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        }        
    9891030    } 
    9901031 
     
    10081049        // so we sort by layer*BASE_Y_INTERVAL + BASE_Y_INTERVAL/2 + basey 
    10091050        // Thus, allowed values for basey are from -50000 to 49999 
    1010 //      if (constraint->second.images) 
    1011 //      { 
    10121051        for(img = constraint->second.images.begin(); img != constraint->second.images.end(); ++img) { 
    10131052            btile.images.insert(std::pair<int, const rule_image*>( 
    10141053                                    img->layer*BASE_Y_INTERVAL + BASE_Y_INTERVAL/2 + img->basey, &*img)); 
    10151054        } 
    1016 //      } 
    10171055 
    10181056        // Sets flags 
    1019 //      if (constraint->second.set_flag) 
    1020 //      { 
     1057        /* 
    10211058        for(std::vector<shared_string>::const_iterator itor = constraint->second.set_flag.begin(); 
    10221059                itor != constraint->second.set_flag.end(); itor++) { 
    10231060            btile.flags.insert(*itor); 
    10241061        } 
    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         
    10261071 
    10271072    } 
     
    11391184        MEMFILE mf(data); 
    11401185        cacheLoadStringTable(&mf, loadBuffer); 
    1141         free(data); 
     1186        dlfree(data); 
    11421187    } 
    11431188     
     
    11471192        MEMFILE mf(data); 
    11481193        loadCache(&mf, loadBuffer); 
    1149         free(data); 
     1194        dlfree(data); 
    11501195    } 
    11511196 
  • trunk/Classes/builder.hpp

    r22 r23  
    229229 
    230230        /** The layer of the image for horizontal layering */ 
    231         int layer; 
     231        short layer; 
    232232        /** The position of the image base (that is, the point where 
    233233         * the image reaches the floor) for vertical layering 
    234234         */ 
    235         int basex, basey; 
     235        short basex, basey; 
    236236 
    237237        /** A list of Time-Of-Day-related variants for this image 
     
    246246        /** The position where the center of the image base should be 
    247247         */ 
    248         int center_x, center_y; 
     248        short center_x, center_y; 
    249249         
    250250        // KP: added cache functions 
     
    313313    typedef std::vector<rule_image> rule_imagelist; 
    314314 
     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    }; 
    315324     
    316325    /** 
     
    323332            loc(), 
    324333            terrain_types_match(), 
    325         set_flag(), 
    326         no_flag(), 
    327         has_flag(), 
     334        //set_flag(), 
     335        //no_flag(), 
     336        //has_flag(), 
     337        flags(NULL), 
    328338        images() 
    329339        {}; 
     
    332342            loc(loc), 
    333343            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), 
    337348            images(NULL) 
    338349            {}; 
     
    340351        t_translation::t_match terrain_types_match; 
    341352 
     353        // combining these saves 24 bytes per terrain constraint, which certainly adds up... 
     354        /* 
    342355        std::vector<shared_string> set_flag; 
    343356        std::vector<shared_string> no_flag; 
    344357        std::vector<shared_string> has_flag; 
     358         */ 
     359        std::vector<tc_flag> flags; 
    345360        rule_imagelist images; 
    346361         
     
    355370             
    356371            short size; 
     372            /* 
    357373            size = set_flag.size(); 
    358374            fwrite(&size, sizeof(size), 1, file); 
     
    375391                cacheSaveString(file, (has_flag)[i]); 
    376392            } 
     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             
    377403            size = images.size(); 
    378404            fwrite(&size, sizeof(size), 1, file); 
     
    392418            char *str; 
    393419            unsigned long strSize; 
    394  
     420             
     421             
     422            /* 
    395423            mread(&size, sizeof(size), 1, file); 
    396424            if (size > 0) 
     
    427455                gTempStr.assign(str, strSize); 
    428456                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); 
    429473            } 
    430474             
     
    544588         * [terrain_graphics] element is set. 
    545589         */ 
    546         int probability; 
     590        short probability; 
    547591 
    548592        /** 
     
    552596         * [terrain_graphics] element is set. 
    553597         */ 
    554         int precedence; 
     598        short precedence; 
    555599         
    556600        // KP: added cache functions 
     
    651695        std::vector<tile> tiles_; 
    652696        /** The x dimension of the map */ 
    653         int x_; 
     697        short x_; 
    654698        /** The y dimension of the map */ 
    655         int y_; 
     699        short y_; 
    656700    }; 
    657701 
  • trunk/Classes/config.cpp

    r12 r23  
    3535 
    3636 
    37  
     37extern "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}; 
    3845 
    3946config::config() : values(), children()//, ordered_children() 
     
    891898        MEMFILE mf(data); 
    892899        cacheLoadStringTable(&mf, loadBuffer); 
    893         free(data); 
     900        dlfree(data); 
    894901    } 
    895902     
     
    899906        MEMFILE mf(data);    
    900907        loadCache(&mf, loadBuffer); 
    901         free(data); 
     908        dlfree(data); 
    902909    } 
    903910     
  • trunk/Classes/config_cache.cpp

    r4 r23  
    3838#define LOG_CACHE std::cerr //LOG_STREAM(info, cache) 
    3939#define DBG_CACHE std::cerr //LOG_STREAM(debug, cache) 
     40 
     41 
     42extern "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}; 
    4050 
    4151namespace game_config { 
     
    617627 *  @return unsigned char * - pointer to uncompressed data 
    618628 * 
    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! 
    620631 */ 
    621632unsigned char *cacheUncompress(std::string &filename) 
     
    633644     
    634645    // 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); 
    637648    assert(compressedData); 
    638649    assert(originalData); 
     
    643654    assert(z_result == Z_OK); 
    644655     
    645     free(compressedData); 
     656    dlfree(compressedData); 
    646657    return originalData; 
    647658} 
  • trunk/Classes/construct_dialog.cpp

    r22 r23  
    685685        if (dim.x < 0) 
    686686            dim.x = 0; 
     687        else 
     688        { 
     689            dim.image_x = dim.x + left_padding; 
     690            dim.image_y = dim.y + top_padding; 
     691        } 
    687692    } 
    688693 
  • trunk/Classes/dialogs.cpp

    r22 r23  
    697697    // create an option for whether the replay should be shown or not 
    698698    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); 
    701701    } 
    702702#ifndef __IPHONEOS__ 
  • trunk/Classes/game.cpp

    r22 r23  
    130130class game_controller 
    131131{ 
    132 public: 
     132public:  
    133133    game_controller(int argc, char** argv); 
    134134    ~game_controller(); 
     
    17191719        // change this if MP campaigns are implemented 
    17201720        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             
    17211743            the_end(disp(), state_.end_text, state_.end_text_duration); 
     1744             
     1745 
     1746             
    17221747//          about::show_about(disp(),state_.campaign); 
    17231748        } 
  • trunk/Classes/game_preferences.hpp

    r4 r23  
    2727#include <utility> 
    2828#include <set> 
     29 
     30#include "achievements.h" 
    2931 
    3032namespace preferences { 
     
    235237    // Add all terrains on the map as encountered terrains. 
    236238    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(); 
    237247} 
    238248 
  • trunk/Classes/game_preferences.mm

    r12 r23  
    3737std::set<shared_string> encountered_units_set; 
    3838std::set<t_translation::t_terrain> encountered_terrains_set; 
     39std::set<std::string> achievements_set; 
     40int player_side; 
     41int turn_kills; 
     42int total_kills; 
    3943 
    4044std::map<std::string, std::vector<std::string> > history_map; 
     
    6872    std::copy(v.begin(), v.end(), 
    6973            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; 
    7081 
    7182    const t_translation::t_list terrain = 
     
    110121    std::copy(encountered_units_set.begin(), encountered_units_set.end(), std::back_inserter(v)); 
    111122    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     
    112130    t_translation::t_list terrain; 
    113131    std::copy(encountered_terrains_set.begin(), encountered_terrains_set.end(), 
     
    140158    history_map.clear(); 
    141159    encountered_units_set.clear(); 
     160    achievements_set.clear(); 
     161    total_kills = 0; 
     162    turn_kills = 0; 
    142163    encountered_terrains_set.clear(); 
    143164    set_ping_timeout(network::ping_timeout); 
     
    361382         
    362383        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]; 
    364387 
    365388        if(res2.empty()) { 
    366             return _("player"); 
     389            return _("Player"); 
    367390        } 
    368391        return res2; 
     
    642665bool save_replays() 
    643666{ 
    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; 
    645670} 
    646671 
     
    827852    return encountered_terrains_set; 
    828853} 
    829  
     854     
    830855std::string custom_command() { 
    831856    return preferences::get("custom_command"); 
     
    906931} 
    907932 
     933     
     934// KP: checks if the achievement has been earned already 
     935bool 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 
     944void 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 
     956void 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     
     978void reset_turn_kills() 
     979{ 
     980    turn_kills = 0; 
     981} 
     982     
     983void set_player_side(int side) 
     984{ 
     985    player_side = side; 
     986} 
     987 
     988int get_player_side() 
     989{ 
     990    return player_side; 
     991} 
     992 
     993     
    908994} // preferences namespace 
  • trunk/Classes/game_preferences_display.cpp

    r4 r23  
    346346    show_ai_moves_button_.set_help_string(_("Do not animate AI units moving")); 
    347347 
    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")); 
    350350 
    351351    delete_saves_button_.set_check(delete_saves()); 
     
    428428    h.push_back(&idle_anim_button_); 
    429429    h.push_back(&show_ai_moves_button_); 
    430     h.push_back(&save_replays_button_); 
     430//  h.push_back(&save_replays_button_); 
    431431    h.push_back(&delete_saves_button_); 
    432432    h.push_back(&show_grid_button_); 
     
    527527    ypos += item_interline; show_team_colours_button_.set_location(rect.x, ypos); 
    528528    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); 
    531531    ypos += short_interline; autosavemax_slider_label_.set_location(rect.x, ypos+5); 
    532532    SDL_Rect autosavemax_rect = { rect.x + 90, ypos, 
     
    553553    ypos += item_interline; show_team_colours_button_.set_location(rect.x, ypos); 
    554554    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); 
    557557    ypos += short_interline; autosavemax_slider_label_.set_location(rect.x, ypos); 
    558558    SDL_Rect autosavemax_rect = { rect.x, ypos+short_interline, 
     
    710710        if (show_grid_button_.pressed()) 
    711711            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()); 
    714714        if (delete_saves_button_.pressed()) 
    715715            set_delete_saves(delete_saves_button_.checked()); 
     
    10761076    show_team_colours_button_.hide(hide_general); 
    10771077    show_grid_button_.hide(hide_general); 
    1078     save_replays_button_.hide(hide_general); 
     1078//  save_replays_button_.hide(hide_general); 
    10791079    delete_saves_button_.hide(hide_general); 
    10801080    autosavemax_slider_label_.hide(hide_general); 
  • trunk/Classes/gamestatus.cpp

    r13 r23  
    986986        // KP: clear all "map_data" values, for next save 
    987987        save_index_cfg.recursive_clear_value("map_data"); 
    988  
    989988        save_index_loaded = true; 
    990989    } 
  • trunk/Classes/gui/widgets/window.cpp

    r22 r23  
    256256    suspend_drawing_ = false; 
    257257     
     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     
    258263    // Start our loop drawing will happen here as well. 
    259264    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         
    260271        // KP: always redraw options list 
    261272        tlistbox* options = dynamic_cast<tlistbox*>(find_widget("input_list", true)); 
  • trunk/Classes/playcampaign.cpp

    r19 r23  
    151151    if (!disp.video().faked() && res != QUIT && end_level->linger_mode) 
    152152        try { 
    153             playcontroller.linger(log); 
     153            playcontroller.linger(log, res); 
    154154        } catch(end_level_exception& e) { 
    155155            if (e.result == QUIT) { 
  • trunk/Classes/playsingle_controller.cpp

    r19 r23  
    3434#include "events.hpp" 
    3535#include "loadscreen.hpp" 
     36 
     37#include "memory_wrapper.h" 
    3638 
    3739#define ERR_NG LOG_STREAM(err, engine) 
     
    662664    gui_->invalidate_all(); 
    663665    gui_->draw(true,true); 
     666     
     667    draw_wait_cursor(); 
     668    free_all_caches(); 
    664669 
    665670    if (save) { 
     
    670675        sound::play_bell(game_config::sounds::turn_bell); 
    671676    } 
     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); 
    672699} 
    673700 
     
    727754}; 
    728755 
    729 void playsingle_controller::linger(upload_log& log) 
     756void playsingle_controller::linger(upload_log& log, LEVEL_RESULT res) 
    730757{ 
    731758    LOG_NG << "beginning end-of-scenario linger\n"; 
     
    746773    gui_->invalidate_theme(); 
    747774    gui_->redraw_everything(); 
    748  
     775     
    749776    // End all unit moves 
    750777    for (unit_map::iterator u = units_.begin(); u != units_.end(); u++) { 
    751778        u->second.set_user_end_turn(true); 
    752779    } 
     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     
    753794    try { 
    754795        // Same logic as single-player human turn, but 
     
    807848    gui_->set_route(NULL); 
    808849    gui_->unhighlight_reach(); 
     850     
     851    preferences::reset_turn_kills(); 
    809852} 
    810853 
  • trunk/Classes/playsingle_controller.hpp

    r8 r23  
    6161    virtual void user_command_3(); 
    6262#endif 
    63     void linger(upload_log& log); 
     63    void linger(upload_log& log, LEVEL_RESULT res); 
    6464 
    6565protected: 
  • trunk/Classes/preferences.cpp

    r4 r23  
    619619    sound::reset_sound(); 
    620620} 
     621     
    621622 
    622623} // end namespace preferences 
  • trunk/Classes/preferences.hpp

    r4 r23  
    163163    bool grid(); 
    164164    void _set_grid(bool ison); 
     165         
    165166} // end namespace preferences 
    166167 
  • trunk/Classes/tcmalloc/central_freelist.cc

    r4 r23  
    8585 
    8686  counter_++; 
    87   span->refcount--; 
     87  span->refcount--; // KP: tends to crash here???? 
    8888  if (span->refcount == 0) { 
    8989    Event(span, '#', 0); 
  • trunk/Classes/tcmalloc/common.h

    r4 r23  
    7070// scavenging code will shrink it down when its contents are not in use. 
    7171static const int kMaxDynamicFreeListLength = 8192; 
    72 //static const int kMaxDynamicFreeListLength = 256; 
    7372 
    7473static const Length kMaxValidPages = (~static_cast<Length>(0)) >> kPageShift; 
  • trunk/Classes/tcmalloc/page_heap.cc

    r4 r23  
    213213  } 
    214214  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??? 
    216216    // Merge next span into this span 
    217217    ASSERT(next->start == p+n); 
  • trunk/Classes/video.cpp

    r22 r23  
    882882     
    883883    SDL_Rect outside = {x-1, y-1, w+2, h+2}; 
    884     fill_rect(0xffffffff, &outside); 
     884    fill_rect(0xffffffff, &outside);    // white outline 
    885885    outside.x++; 
    886886    outside.y++; 
    887887    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    } 
    892895} 
    893896 
  • trunk/OpenFeint/api/internal/OpenFeint/Services/SocialNotification/OFSocialNotificationService+Private.mm

    r22 r23  
    101101{ 
    102102    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]; 
    106105 
    107106    OFSocialNotification* notice = [[[OFSocialNotification alloc]  
     
    118117{ 
    119118    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                                  ]; 
    123122     
    124123    OFSocialNotification* notice = [[[OFSocialNotification alloc]  
  • trunk/include/SDL/SDL_stdinc.h

    r6 r23  
    197197/* *INDENT-ON* */ 
    198198#endif 
    199  
     199     
    200200#ifdef HAVE_MALLOC 
    201201#define SDL_malloc  malloc 
  • trunk/res/data/campaigns/Dead_Water/scenarios/03_Wolf_Coast.cfg

    r22 r23  
    271271            [/option] 
    272272            [option] 
    273                 message= _ "That sounds frightening. Let someone else have it." 
     273                message= _ "Let someone else have it." 
    274274            [/option] 
    275275        [/message] 
  • trunk/res/data/campaigns/Dead_Water/scenarios/05_Tirigaz.cfg

    r22 r23  
    645645                        [message] 
    646646                            speaker=Kai Krellis 
    647                             message= _ "We have destroyed the undead." 
     647                            message= _ "We have destroyed the undead. But what of the orcs?" 
    648648                            [option] 
    649                                 message= _ "Now maybe we can head west undisturbed." 
     649                                message= _ "Head west undisturbed." 
    650650                                [command] 
    651651                                    [endlevel] 
     
    656656                            [/option] 
    657657                            [option] 
    658                                 message= _ "This orc leader has not learned that threatening merfolk is a bad idea. We shall defeat him before we go." 
     658                                message= _ "Defeat the orcs before we go." 
    659659                            [/option] 
    660660                        [/message] 
  • trunk/res/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg

    r22 r23  
    926926            speaker=unit 
    927927            [option] 
    928                 message= _ "I'll carry this sword and destroy undead with blasts of flame." 
     928                message= _ "Pick up the sword." 
    929929                [command] 
    930930                    [set_variable] 
     
    935935            [/option] 
    936936            [option] 
    937                 message= _ "This sword is not right for me. Let someone else have it." 
     937                message= _ "Let someone else have it." 
    938938            [/option] 
    939939        [/message] 
  • trunk/res/data/campaigns/Dead_Water/scenarios/12_Revenge.cfg

    r22 r23  
    888888            speaker=$unit.id 
    889889            [option] 
    890                 message= _ "I think that could be usefull. I'll take it." 
     890                message= _ "Take the necklace." 
    891891                [command] 
    892892                    [set_variable] 
     
    897897            [/option] 
    898898            [option] 
    899                 message= _ "It doesn't seem to have helped its previous owner. I don't want it." 
     899                message= _ "Let someone else have it." 
    900900            [/option] 
    901901        [/message] 
  • trunk/res/data/campaigns/Dead_Water/utils/items.cfg

    r22 r23  
    246246                    speaker=Kai Krellis 
    247247                    [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" 
    249249                        [command] 
    250250                            [set_variable] 
     
    255255                    [/option] 
    256256                    [option] 
    257                         message= _ "Someone take that off of him before he hurts himself." 
     257                        message= _ "Take it off the bat." 
    258258                    [/option] 
    259259                [/message] 
     
    292292                    speaker=unit 
    293293                    [option] 
    294                         message= _ "I'll take this ring, and you can rely on my strength." 
     294                        message= _ "Pick up the ring" 
    295295                        [command] 
    296296                            [set_variable] 
     
    301301                    [/option] 
    302302                    [option] 
    303                         message= _ "This thing makes me dizzy. Someone else can have it." 
     303                        message= _ "Let someone else have it" 
    304304                    [/option] 
    305305                [/message] 
  • trunk/res/data/campaigns/Eastern_Invasion/scenarios/04b.The_Undead_Border_Patrol.cfg

    r7 r23  
    161161            message= _ "Hmm..." 
    162162            [option] 
    163                 message= _ "I wish to destroy the evil before it can spread. East we go!" 
     163                message= _ "Go further east" 
    164164                [command] 
    165165                    [message] 
     
    180180            [/option] 
    181181            [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" 
    183183                [command] 
    184184                    [message] 
  • trunk/res/data/campaigns/Eastern_Invasion/scenarios/17.Weldyn_Under_Attack.cfg

    r7 r23  
    290290        message= _ "Hmm..." 
    291291        [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" 
    293293            [command] 
    294294                [store_unit] 
     
    307307        [/option] 
    308308        [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!" 
    310310            [command] 
    311311                [store_unit] 
  • trunk/res/data/campaigns/Heir_To_The_Throne/scenarios/04_The_Bay_of_Pearls.cfg

    r7 r23  
    747747            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." 
    748748            [option] 
    749                 message= _ "Ships? Ugh! I have been sea sick for the last time. We shall walk!" 
     749                message= _ "Ships? Ugh! We shall walk!" 
    750750                [command] 
    751751                    [message] 
     
    765765            [/option] 
    766766            [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!" 
    768768                [command] 
    769769                    [message] 
  • trunk/res/data/campaigns/Heir_To_The_Throne/scenarios/06_The_Siege_of_Elensefar.cfg

    r7 r23  
    291291            message= _ "Hmm... I have to consider this..." 
    292292            [option] 
    293                 message= _ "Help us infiltrate the city. We can do the rest." 
     293                message= _ "Help us infiltrate the city" 
    294294                [command] 
    295295                    [message] 
     
    307307            [/option] 
    308308            [option] 
    309                 message= _ "I want you to reinforce us once we break through their line." 
     309                message= _ "Reinforce us once we break through" 
    310310                [command] 
    311311                    [message] 
  • trunk/res/data/campaigns/Heir_To_The_Throne/scenarios/18_A_Choice_Must_Be_Made.cfg

    r7 r23  
    362362            message= _ "I say that..." 
    363363            [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" 
    365365                [command] 
    366366                    {CLEAR_VARIABLE dialog} 
     
    375375            [/option] 
    376376            [option] 
    377                 message= _ "On second thought, perhaps we should choose a safer way to go." 
     377                message= _ "On second thought, safety first!" 
    378378                [command] 
    379379                    [message] 
  • trunk/res/data/campaigns/Invasion_from_the_Unknown/scenarios/04_Over_the_Sands.cfg

    r19 r23  
    613613            [/option] 
    614614            [option] 
    615                 message= _ "No. We may get better results if we take over your village" 
     615                message= _ "No. We will take over your village!" 
    616616                [show_if] 
    617617                    {VARIABLE_NUM_GREATER_OR_EQUAL_THAN temp_side1_store.gold $fee_value} 
     
    629629            [/option] 
    630630            [option] 
    631                 message= _ "No, unfortunately we don't have that much gold." 
     631                message= _ "No, we don't have that much gold." 
    632632                [show_if] 
    633633                    {VARIABLE_NUM_LESS_THAN temp_side1_store.gold $fee_value} 
     
    645645            [/option] 
    646646            [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!" 
    648648                [show_if] 
    649649                    {VARIABLE_NUM_LESS_THAN temp_side1_store.gold $fee_value} 
     
    13711371            [/option] 
    13721372            [option] 
    1373                 message= _ "No. Perhaps later, if I change my mind." 
     1373                message= _ "No. Perhaps later..." 
    13741374                [command] 
    13751375                    {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  
    260260            [/option] 
    261261            [option] 
    262                 message= _ "Ignore them for now and let them flee." 
     262                message= _ "Ignore them and let them flee." 
    263263                [command] 
    264264                    [role] 
     
    424424            message= _ "Um... well." 
    425425            [option] 
    426                 message= _ "We shall hear your offer. Just swear you will never cause us trouble again." 
     426                message= _ "We shall hear your offer." 
    427427 
    428428                [command] 
     
    585585            [/option] 
    586586            [option] 
    587                 message= _ "Your kind cannot be trusted. Any other last words?" 
     587                message= _ "Your kind cannot be trusted!" 
    588588                [command] 
    589589                    # They are dead 
  • trunk/res/data/campaigns/Invasion_from_the_Unknown/scenarios/08a_Errand_of_Hope.cfg

    r19 r23  
    10751075            message= _ "Um..." 
    10761076            [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!" 
    10781078                [command] 
    10791079                    {VARIABLE temp_speech_got_it 0} 
     
    10821082            [/option] 
    10831083            [option] 
    1084                 message= _ "Gold. What about 10 pieces to start with?" 
     1084                message= _ "Gold. What about 10?" 
    10851085                [command] 
    10861086                    {VARIABLE temp_speech_got_it 0} 
     
    10891089            [/option] 
    10901090            [option] 
    1091                 message= _ "Some fun, killing enemies with us, perhaps..?" 
     1091                message= _ "Some fun, killing enemies with us!" 
    10921092                [command] 
    10931093                    {VARIABLE temp_speech_got_it 1} 
     
    11111111                    message= _ "Um..." 
    11121112                    [option] 
    1113                         message= _ "I do not trust them. We should kill them just in case they attack us afterwards." 
     1113                        message= _ "Kill them all" 
    11141114                        [command] 
    11151115                            {MSG_UNIT Galas ( _ "Very well. Kill them.")} 
     
    11481148                    [/option] 
    11491149                    [option] 
    1150                         message= _ "They have chosen their path. We must respect their decision." 
     1150                        message= _ "Respect their decision." 
    11511151                        [command] 
    11521152                            {MSG_UNIT Galas ( _ "Very well.")} 
  • trunk/res/data/campaigns/Invasion_from_the_Unknown/scenarios/10_The_Source_of_Light.cfg

    r19 r23  
    15981598                    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." 
    15991599                    [option] 
    1600                         message= _ "I think it is worthwhile. Let me have it." 
     1600                        message= _ "Let me have it." 
    16011601                        [command] 
    16021602                            {VARIABLE took_drainer yes} 
     
    16401640                    [/option] 
    16411641                    [option] 
    1642                         message= _ "On a second thought, I don't like the idea. It is revolting." 
     1642                        message= _ "I don't like the idea..." 
    16431643                    [/option] 
    16441644                [/message] 
     
    17151715                    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." 
    17161716                    [option] 
    1717                         message= _ "I'll take it. I do not fear death!" 
     1717                        message= _ "I'll take it!" 
    17181718                        [command] 
    17191719                            {VARIABLE took_berserker yes} 
     
    17691769                    [option] 
    17701770                        # 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..." 
    17721772                    [/option] 
    17731773                [/message] 
     
    19431943                    [/option] 
    19441944                    [option] 
    1945                         message= _ "I think it would be safer to keep away from this cave." 
     1945                        message= _ "Keep away from this cave." 
    19461946                    [/option] 
    19471947                [/message] 
  • trunk/res/data/campaigns/Legend_of_Wesmere/scenarios/07_Elves_last_stand_utils.cfg

    r7 r23  
    161161            [option] 
    162162                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." 
    164164                [command] 
    165165                    [set_variable] 
     
    171171            [option] 
    172172                id=incommand_false 
    173                 message= _ "You do me great honor, but I am not yet ready for this." 
     173                message= _ "I am not yet ready for this." 
    174174                [command] 
    175175                    [set_variable] 
  • trunk/res/data/campaigns/Liberty/scenarios/06_The_Gray_Woods.cfg

    r7 r23  
    360360                    message= _ "I leave it to you to decide." 
    361361                    [option] 
    362                         message= _ "I will take the gold. How does 500 sound?" 
     362                        message= _ "I will take 500 gold" 
    363363                        [command] 
    364364                            [message] 
     
    385385                    # Note: don't mess with the alignment in the next message key. 
    386386                    [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" 
    388388                        [command] 
    389389                            [message] 
     
    403403                    [/option] 
    404404                    [option] 
    405                         message= _ "I wish you to join us in battle against the Queen's forces." 
     405                        message= _ "Join us in battle" 
    406406                        [command] 
    407407                            [message] 
  • trunk/res/data/campaigns/Northern_Rebirth/scenarios/10a_Stolen_Gold.cfg

    r7 r23  
    870870                    message= _ "Hmmm, should we let the trolls run away or should we finish them now?" 
    871871                    [option] 
    872                         message= _ "Hey! Stand your ground, you cowards!" 
     872                        message= _ "Stand your ground, you cowards!" 
    873873                        [command] 
    874874                            [message] 
     
    995995                            message= _ "Hmmm, should we let the trolls run away or should we finish them now?" 
    996996                            [option] 
    997                                 message= _ "Hey! Stand your ground, you cowards!" 
     997                                message= _ "Stand your ground, you cowards!" 
    998998                                [command] 
    999999                                    [message] 
  • trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/02_The_Fall.cfg

    r7 r23  
    284284 
    285285            [option] 
    286                 message= _ "I think that your skills may be useful. You may join us." 
     286                message= _ "You may join us." 
    287287                [command] 
    288288                    [message] 
     
    337337            [/option] 
    338338            [option] 
    339                 message= _ "Your word can't be trusted. Prepare to meet your gods!" 
     339                message= _ "Your word can't be trusted!" 
    340340                image=portraits/haldric-mad.png 
    341341                [command] 
  • trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/03_A_Harrowing_Escape.cfg

    r7 r23  
    273273 
    274274        [option] 
    275             message= _ "I think I'll take the River Road..." 
     275            message= _ "Take the River Road..." 
    276276            [command] 
    277277                [message] 
     
    294294        [/option] 
    295295        [option] 
    296             message= _ "We'll go through the Midlands..." 
     296            message= _ "Go through the Midlands..." 
    297297            [command] 
    298298                [message] 
  • trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/09_Fallen_Lich_Point.cfg

    r7 r23  
    363363 
    364364                            [option] 
    365                                 message= _ "I think I'll say that magic phrase." 
     365                                message= _ "Say that magic phrase." 
    366366 
    367367                                [command] 
     
    416416 
    417417                            [option] 
    418                                 message= _ "I think I'll wait a while before uttering any magic phrases." 
     418                                message= _ "Wait a while." 
    419419 
    420420                                [command] 
  • trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/16_Elf_Lords.cfg

    r7 r23  
    140140#define DRAGON 
    141141    [option] 
    142         message= _ "I think I'll fight the dragon!" 
     142        message= _ "Fight the dragon!" 
    143143 
    144144        [show_if] 
     
    183183#define BEACH 
    184184    [option] 
    185         message= _ "Let's get those saurians and nagas on that beach!" 
     185        message= _ "Get those saurians and nagas!" 
    186186 
    187187        [show_if] 
     
    268268#define ISLE 
    269269    [option] 
    270         message= _ "Let's put those souls to rest on the cursed isle!" 
     270        message= _ "Let's put those souls to rest!" 
    271271 
    272272        [show_if] 
  • trunk/res/data/campaigns/The_Rise_Of_Wesnoth/scenarios/17a_The_Dragon.cfg

    r7 r23  
    485485 
    486486                    [option] 
    487                         message= _ "Let's get out of here!" 
     487                        message= _ "Get out of here!" 
    488488                        [command] 
    489489                            [endlevel] 
     
    496496 
    497497                    [option] 
    498                         message= _ "Let's finish off the rest of these monsters!" 
     498                        message= _ "Finish off the rest!" 
    499499                    [/option] 
    500500                [/message] 
  • trunk/res/data/campaigns/The_South_Guard/scenarios/05_Choice_In_The_Fog.cfg

    r22 r23  
    441441            message= _ "Hmm...I have to consider this..." 
    442442            [option] 
    443                 message= _ "Very well. All men must unite against the undead." 
     443                message= _ "All men must unite against the undead." 
    444444                [command] 
    445445                    [music] 
     
    575575 
    576576            [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!" 
    578578                [command] 
    579579                    [music] 
  • trunk/res/data/campaigns/The_South_Guard/scenarios/07a_Into_The_Depths.cfg

    r7 r23  
    479479            message= _ "What should we offer them for their help?" 
    480480            [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" 
    482482                [command] 
    483483                    [store_side] 
     
    539539 
    540540            [option] 
    541                 message= _ "We will offer you freedom and a place in our lands." 
     541                message= _ "Offer freedom and land" 
    542542                [command] 
    543543                    [message] 
     
    634634                        [/show_if] 
    635635 
    636                         message= _ "Here's $troll_help_cost for your help against the undead." 
     636                        message= _ "Here's $troll_help_cost gold" 
    637637 
    638638                        [command] 
  • trunk/res/data/campaigns/Two_Brothers/scenarios/2_The_Chase.cfg

    r7 r23  
    419419            message= _ "It is my place to decide this." 
    420420            [option] 
    421                 message= _ "Oh, all right then. Come along with us." 
     421                message= _ "Come along with us." 
    422422                [command] 
    423423                    [message] 
     
    431431            [/option] 
    432432            [option] 
    433                 message= _ "I am sorry. We have not the time to spare." 
     433                message= _ "We have no time to spare." 
    434434                [command] 
    435435                    [message] 
  • trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/04_Descending_into_Darkness.cfg

    r7 r23  
    12661266                    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?" 
    12671267                    [option] 
    1268                         message= _ "I fear no creature, I will take the blade!" 
     1268                        message= _ "Take the blade!" 
    12691269                        [command] 
    12701270                            [set_variable] 
     
    13281328 
    13291329                    [option] 
    1330                         message= _ "I don't like the sound of this. I'm out of here." 
     1330                        message= _ "Leave it for someone else." 
    13311331                    [/option] 
    13321332                [/message] 
  • trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/06a_In_the_Tunnels_of_Trolls.cfg

    r7 r23  
    24542454 
    24552455                    [option] 
    2456                         message= _ "On second thought, it's better to leave the dead in peace." 
     2456                        message= _ "Leave the dead in peace." 
    24572457 
    24582458                        [command] 
  • trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/06b_In_the_Domain_of_Dwarves.cfg

    r7 r23  
    23062306                    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." 
    23072307                    [option] 
    2308                         message= _ "I fear no ghosts, I'll take it." 
     2308                        message= _ "I fear no ghosts!" 
    23092309                        [command] 
    23102310                            [set_variable] 
     
    23562356 
    23572357                    [option] 
    2358                         message= _ "On second thought, it's better to leave the dead in peace." 
     2358                        message= _ "Leave the dead in peace." 
    23592359 
    23602360                        [command] 
  • trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/07a_Dealing_with_Dwarves.cfg

    r7 r23  
    819819 
    820820            [option] 
    821                 message= _ "No, I think someone else should wield it." 
     821                message= _ "Someone else should wield it." 
    822822            [/option] 
    823823        [/message] 
  • trunk/res/data/campaigns/Under_the_Burning_Suns/scenarios/07b_Talking_with_Trolls.cfg

    r7 r23  
    815815 
    816816            [option] 
    817                 message= _ "No, I think someone else should wield it." 
     817                message= _ "Someone else should wield it." 
    818818            [/option] 
    819819        [/message] 
  • trunk/wesnoth.xcodeproj/project.pbxproj

    r22 r23  
    970970        27454EC1108995FB0075BBD2 /* xml_woarchive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27454E83108995FB0075BBD2 /* xml_woarchive.cpp */; }; 
    971971        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 */; }; 
    977972        2782D28D100DB08A00C5386D /* cdjpeg.c in Sources */ = {isa = PBXBuildFile; fileRef = 2782D24C100DB08A00C5386D /* cdjpeg.c */; }; 
    978973        2782D291100DB08A00C5386D /* jaricom.c in Sources */ = {isa = PBXBuildFile; fileRef = 2782D251100DB08A00C5386D /* jaricom.c */; }; 
     
    28202815        2759B24010D4E1310074F50A /* achievements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = achievements.h; path = Classes/achievements.h; sourceTree = "<group>"; }; 
    28212816        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>"; }; 
    28272817        2782D24B100DB08A00C5386D /* cderror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cderror.h; path = include/jpeglib/cderror.h; sourceTree = "<group>"; }; 
    28282818        2782D24C100DB08A00C5386D /* cdjpeg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = cdjpeg.c; path = include/jpeglib/cdjpeg.c; sourceTree = "<group>"; }; 
     
    75647554            isa = PBXGroup; 
    75657555            children = ( 
    7566                 2764949910FDC9E9002EABBA /* fonts */, 
    7567                 2764949A10FDC9E9002EABBA /* sounds */, 
    7568                 2764949B10FDC9E9002EABBA /* data */, 
    7569                 2764949C10FDC9E9002EABBA /* precache */, 
    7570                 2764949D10FDC9E9002EABBA /* images */, 
    75717556                FD77A07E0E26BDA900F39101 /* Default.png */, 
    75727557                FD77A07C0E26BD8C00F39101 /* Icon.png */, 
     
    79447929                2738F75C10E78EFC006BE9F2 /* OFDashboardTabNowPlayingLandscapeHit.png in Resources */, 
    79457930                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 */, 
    79517931            ); 
    79527932            runOnlyForDeploymentPostprocessing = 0; 
  • trunk/wesnoth_notes.txt

    r22 r23  
    791791Title 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! 
    792792 
     793Finished loading level 
     794------------------------------------------------ 
     795MALLOC:     19562496 (   18.7 MB) Heap size 
     796MALLOC:     15904632 (   15.2 MB) Bytes in use by application 
     797MALLOC:      2965504 (    2.8 MB) Bytes free in page heap 
     798MALLOC:       156672 (    0.1 MB) Bytes free in central cache 
     799MALLOC:            0 (    0.0 MB) Bytes free in transfer cache 
     800MALLOC:       535688 (    0.5 MB) Bytes free in thread caches 
     801MALLOC:         3521              Spans in use 
     802MALLOC:            1              Thread heaps in use 
     803MALLOC:       524288 (    0.5 MB) Metadata allocated 
     804------------------------------------------------ 
     805 
     806- saved 1mb by optimizing builder cache data structures 
     807Turn 2: 23mb 
     808    3: 25mb 
     809    4: 26mb 
     810     
     811------------ 
     812There needs to be a way for tcmalloc to scavange at will: 
     813For example, after completing a level, 
     814 
     815After cache free 
     816------------------------------------------------ 
     817MALLOC:     26902528 (   25.7 MB) Heap size 
     818MALLOC:     14694128 (   14.0 MB) Bytes in use by application 
     819MALLOC:      8912896 (    8.5 MB) Bytes free in page heap 
     820MALLOC:      2311928 (    2.2 MB) Bytes free in central cache 
     821MALLOC:        76800 (    0.1 MB) Bytes free in transfer cache 
     822MALLOC:       906776 (    0.9 MB) Bytes free in thread caches 
     823MALLOC:         4141              Spans in use 
     824MALLOC:            1              Thread heaps in use 
     825MALLOC:       524288 (    0.5 MB) Metadata allocated 
     826------------------------------------------------ 
     827iPhone system memory used: 54927360 free: 7450624 total: 62377984 
     828initialized teams... 712 
     829loading units...3556 
     830initializing display... 3568 
     831TCMALLOC: alloc size 2785280 (Bytes); Total : 28 (Mb) 
     832iPhone system memory used: 55660544 free: 7012352 total: 62672896 
     833TCMALLOC: alloc size 131072 (Bytes); Total : 28 (Mb) 
     834iPhone system memory used: 55660544 free: 7012352 total: 62672896 
     835 
     836Took 5964 ms to read cached file /var/mobile/Applications/19B7E670-09FB-43B4-877F-CB6B7392B0B9/wesnoth.app/precache/terrain 
     837done initializing display... 12550 
     838initializing managers... 12550 
     839done initializing managers... 12559 
     840 
     841 
     842Finished loading level 
     843------------------------------------------------ 
     844MALLOC:     29687808 (   28.3 MB) Heap size 
     845MALLOC:     20835832 (   19.9 MB) Bytes in use by application 
     846MALLOC:      8151040 (    7.8 MB) Bytes free in page heap 
     847MALLOC:       196976 (    0.2 MB) Bytes free in central cache 
     848MALLOC:            0 (    0.0 MB) Bytes free in transfer cache 
     849MALLOC:       503960 (    0.5 MB) Bytes free in thread caches 
     850MALLOC:         4456              Spans in use 
     851MALLOC:            1              Thread heaps in use 
     852MALLOC:       655360 (    0.6 MB) Metadata allocated 
     853------------------------------------------------ 
     854 
Note: See TracChangeset for help on using the changeset viewer.