~ubuntu-branches/ubuntu/saucy/lordsawar/saucy

« back to all changes in this revision

Viewing changes to src/GraphicsCache.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese, Barry deFreese
  • Date: 2008-12-20 13:52:12 UTC
  • mfrom: (1.1.6 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20081220135212-noeb2w3y98ebo7o9
Tags: 0.1.4-1
[ Barry deFreese ]
* New upstream release.
* Move 0.0.8-2.1 changelog entry to correct point in changelog.
* Make lordsawar-data suggest lordsawar.
* Update my e-mail address.
* Add build-depends on intltool, uuid-dev, and libboost-dev.
* Don't install locales since there are no translations currently.
* Add simple man page for new lordsawar-pbm binary.
* Drop gcc4.3 patches as they have been fixed upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include <string>
24
24
#include <list>
 
25
#include <vector>
25
26
 
26
27
#include "player.h"
27
28
#include "defs.h"
121
122
          */
122
123
        SDL_Surface* getArmyPic(Uint32 armyset, Uint32 army, const Player* p,
123
124
                                const bool* medals);
 
125
        SDL_Surface* getArmyPic(Army *a);
124
126
 
125
127
        /** Function for getting the shield picture from the cache
126
128
          * 
270
272
          * @return image for the shield
271
273
          */
272
274
        SDL_Surface* getShieldPic(Uint32 type, const Player* p);
 
275
 
 
276
 
273
277
        SDL_Surface* getSmallRuinedCityPic();
274
278
        SDL_Surface* getSmallHeroPic();
275
279
        SDL_Surface* getPortPic();
309
313
        SDL_Surface* applyMask(SDL_Surface* image, SDL_Surface* mask, const Player* p);
310
314
        static SDL_Surface* applyMask(SDL_Surface* image, SDL_Surface* mask, SDL_Color mask_color, bool isNeutral);
311
315
        
 
316
        static bool loadSelectorImages(std::string tileset, std::string filename, Uint32 tilesize, std::vector<SDL_Surface*> &images, std::vector<SDL_Surface *> &masks);
 
317
 
 
318
        Uint32 getNumberOfLargeSelectorFrames() {return d_selector.size();};
 
319
        Uint32 getNumberOfSmallSelectorFrames() {return d_smallselector.size();}
 
320
 
312
321
    private:
313
322
        GraphicsCache();
314
323
        ~GraphicsCache();
452
461
 
453
462
        //! Loads the images for the two selectors
454
463
        void loadSelectors();
 
464
 
455
465
        
456
466
        //! Loads the images for the production shields
457
467
        void loadProdShields();
458
468
        
459
469
        //! Loads the images for the movement bonuses
460
470
        void loadMoveBonusPics();
461
 
        
 
471
        /** Get a cityset picture
 
472
          * @param citysetname       the name of the cityset
 
473
          * @param picname          the name of the picture
 
474
          * @return the surface which contains the picture
 
475
          */
 
476
        static SDL_Surface* getCitysetPicture(std::string citysetname, std::string picname);
 
477
 
462
478
        //the data
463
479
        static GraphicsCache* s_instance;
464
480
 
494
510
        SDL_Surface* d_razedpic[MAX_PLAYERS + 1]; //+1 for neutral
495
511
        SDL_Surface* d_flagpic[MAX_STACK_SIZE];
496
512
        SDL_Surface* d_flagmask[MAX_STACK_SIZE];
497
 
        SDL_Surface* d_selector[SELECTOR_FRAMES];
498
 
        SDL_Surface* d_selectormask[SELECTOR_FRAMES];
499
 
        SDL_Surface* d_smallselector[SMALL_SELECTOR_FRAMES];
500
 
        SDL_Surface* d_smallselectormask[SMALL_SELECTOR_FRAMES];
 
513
        //SDL_Surface* d_selector[SELECTOR_FRAMES];
 
514
        //SDL_Surface* d_selectormask[SELECTOR_FRAMES];
 
515
        std::vector<SDL_Surface*> d_selector;
 
516
        std::vector<SDL_Surface*> d_selectormask;
 
517
        std::vector<SDL_Surface*> d_smallselector;
 
518
        std::vector<SDL_Surface*> d_smallselectormask;
 
519
        //SDL_Surface* d_smallselector[SMALL_SELECTOR_FRAMES];
 
520
        //SDL_Surface* d_smallselectormask[SMALL_SELECTOR_FRAMES];
501
521
        SDL_Surface* d_prodshieldpic[PRODUCTION_SHIELD_TYPES];
502
522
        SDL_Surface* d_smallruinedcity;
503
523
        SDL_Surface* d_smallhero;