ScummVM API documentation
base_frame.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /*
23  * This file is based on WME Lite.
24  * http://dead-code.org/redir.php?target=wmelite
25  * Copyright (c) 2011 Jan Nedoma
26  */
27 
28 #ifndef WINTERMUTE_BASE_FRAME_H
29 #define WINTERMUTE_BASE_FRAME_H
30 
31 #include "engines/wintermute/base/base_scriptable.h"
32 #include "engines/wintermute/coll_templ.h"
33 #include "graphics/transform_struct.h"
34 
35 namespace Wintermute {
36 class BaseSound;
37 class BaseSubFrame;
38 class BaseObject;
39 class ScScript;
40 class ScStack;
41 class BaseFrame: public BaseScriptable {
42 public:
43  bool _killSound;
44  void stopSound();
45  bool oneTimeDisplay(BaseObject *owner, bool muted = false);
46  DECLARE_PERSISTENT(BaseFrame, BaseScriptable)
47 
48  bool getBoundingRect(Rect32 *rect, int x, int y, float scaleX = 100, float scaleY = 100);
49  bool saveAsText(BaseDynamicBuffer *buffer, int indent) override;
50  int32 _moveY;
51  int32 _moveX;
52  uint32 _delay;
53  BaseArray<BaseSubFrame *> _subframes;
54  bool draw(int x, int y, BaseObject *registerOwner = nullptr, float zoomX = 100, float zoomY = 100, bool precise = true, uint32 alpha = 0xFFFFFFFF, bool allFrames = false, float rotate = 0.0f, Graphics::TSpriteBlendMode blendMode = Graphics::BLEND_NORMAL);
55  bool loadBuffer(char *buffer, int lifeTime, bool keepLoaded);
56 
57  BaseFrame(BaseGame *inGame);
58  ~BaseFrame() override;
59 
60  BaseArray<const char *> _applyEvent;
61 
62  // scripting interface
63  ScValue *scGetProperty(const Common::String &name) override;
64  bool scSetProperty(const char *name, ScValue *value) override;
65  bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override;
66  const char *scToString() override;
67  Common::String debuggerToString() const override;
68 
69 private:
70  bool _keyframe;
71  bool _editorExpanded;
72  BaseSound *_sound;
73 };
74 
75 } // End of namespace Wintermute
76 
77 #endif
Definition: script.h:44
Definition: base_game.h:75
Definition: script_value.h:42
Definition: str.h:59
Definition: coll_templ.h:115
Definition: base_dynamic_buffer.h:35
Definition: base_scriptable.h:41
Definition: rect32.h:60
Definition: script_stack.h:41
Definition: coll_templ.h:63
Definition: base_frame.h:41
Definition: base_sound.h:39
Definition: base_object.h:57
Definition: achievements_tables.h:27