- std::vector<std::string> images;
- if(!lispreader.read_string_vector("images", images))
- Termination::abort("Sprite contains no images: ", action->name.c_str());
+ /* TODO: add a top filter entry */
+ std::vector <int> mask_color;
+ lispreader.read_int_vector("apply-mask", mask_color);
+ if(mask_color.size() == 4)
+ {
+ for(std::vector<Surface*>::iterator i = action->surfaces.begin();
+ i < action->surfaces.end(); i++)
+ {
+ (*i)->apply_mask(Color(mask_color));
+ }
+ }
+
+ action->mirror = false;
+ std::string mirror_action;
+ lispreader.read_string("mirror-action", mirror_action);
+ if(!mirror_action.empty())
+ {
+ action->mirror = true;
+ Action* act_tmp = get_action(mirror_action);
+ if(act_tmp == NULL)
+ std::cerr << "Warning: Could not mirror action. Action not found\n"
+ "Mirror actions must be defined after the real one!\n";
+ else
+ action->surfaces = act_tmp->surfaces;
+ }