// Sprites // Copyright (C) 2002 David Rosen // Copyright (C) 2003 Steven Fuller // Copyright (C) 2003 Zachary Jack Slater // Copyright (C) 2021 Nguyễn Gia Phong // // This file is part of Black Shades. // // Black Shades is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published // by the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Black Shades is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Black Shades. If not, see . #ifndef BLACKSHADES_SPRITES_H #define BLACKSHADES_SPRITES_H #include #include "Quaternions.h" #define maxsprites 2000 #define muzzleflashsprite 1 #define smokesprite 2 #define smokespritenoup 3 #define bullet 4 #define bulletinstant 5 #define flashsprite 6 #define grenadesprite 7 #define pinsprite 8 #define spoonsprite 9 #define bloodspritedown 10 #define bloodspritenoup 11 #define particlesspritedown 12 #define snowsprite 13 #define rainsprite 14 class Sprites{ public: GLuint flaretextureptr; GLuint muzzleflaretextureptr; GLuint smoketextureptr; GLuint bullettextureptr; GLuint bloodtextureptr; GLuint raintextureptr; GLuint snowtextureptr; int howmanysprites; XYZ location[maxsprites]; XYZ oldlocation[maxsprites]; XYZ velocity[maxsprites]; XYZ initialvelocity[maxsprites]; float size[maxsprites]; float initialsize[maxsprites]; float brightness[maxsprites]; float initialbrightness[maxsprites]; float color1[maxsprites]; float color2[maxsprites]; float color3[maxsprites]; float alivetime[maxsprites]; float rotation[maxsprites]; int type[maxsprites]; int owner[maxsprites]; void draw(); int DeleteSprite(int which); int MakeSprite(int atype, float abrightness, float acolor1, float acolor2, float acolor3, XYZ alocation, XYZ avelocity, float asize); int MakeSprite(int atype, float abrightness, float acolor1, float acolor2, float acolor3, XYZ alocation, XYZ avelocity, float asize, int aowner); void DoStuff(); ~Sprites(); }; #endif // BLACKSHADES_SPRITES_H