1 /* 2 BStone: A Source port of 3 Blake Stone: Aliens of Gold and Blake Stone: Planet Strike 4 5 Copyright (c) 1992-2013 Apogee Entertainment, LLC 6 Copyright (c) 2013-2015 Boris I. Bendovsky (bibendovsky@hotmail.com) 7 8 This program is free software; you can redistribute it and/or 9 modify it under the terms of the GNU General Public License 10 as published by the Free Software Foundation; either version 2 11 of the License, or (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the 20 Free Software Foundation, Inc., 21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 22 */ 23 24 25 // 26 // Planet Strike fizzle effect. 27 // 28 29 30 #include <cstdint> 31 #include "bstone_fizzle_fx.h" 32 #include "id_vl.h" 33 34 35 namespace bstone 36 { 37 38 39 class PSFizzleFX : 40 public FizzleFX 41 { 42 public: 43 PSFizzleFX(); 44 45 PSFizzleFX( 46 const PSFizzleFX& that) = delete; 47 48 PSFizzleFX& operator=( 49 const PSFizzleFX& that) = delete; 50 51 ~PSFizzleFX() override; 52 53 54 // Initializes the effect. 55 void initialize() override; 56 57 58 protected: 59 // Clean-ups the effect. 60 void uninitialize() override; 61 62 // Returns true if the effect can be interrupted. 63 bool is_abortable() const override; 64 65 // Returns total frame count. 66 int get_frame_count() const override; 67 68 // Returns vertical offset of the effect beginning. 69 int get_y() const override; 70 71 // Returns total height of the effect. 72 int get_height() const override; 73 74 // Performs operation on one pixel. 75 void plot( 76 int x, 77 int y) override; 78 79 // Presents the final stage of the effect. 80 void skip_to_the_end() override; 81 82 83 private: 84 VgaBuffer buffer_; 85 }; // PSFizzleFX 86 87 88 } // bstone 89