Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
generated_registrations.h
Go to the documentation of this file.
1 #ifndef GENERATED_REGISTRATIONS_H
2  #define GENERATED_REGISTRATIONS_H
3  //THIS FILE WAS GENERATED BY nymph-generate
4  //DO NOT EDIT IT AS IT WILL BE OVERWRITTEN WHEN nymph-generate IS RUN AGAIN
5  #include <chaiscript/utility/utility.hpp>
6 #include <vector>
7 #include <map>
70 namespace generated {
71  using namespace Input;
72  using namespace Events;
73  using namespace Utility;
74  using namespace Script;
75  using namespace Game;
76  using namespace Graphics;
77  using namespace Graphics::UI;
78 
79 chaiscript::ModulePtr getEventTypeModule() {
80  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
81  std::vector<std::pair<unsigned int, std::string>> vec = {{ MOUSE_CURSOR, "EventType_MOUSE_CURSOR" },
82 { MOUSE_SCROLL, "EventType_MOUSE_SCROLL" },
83 { MOUSE_BUTTON_DOWN, "EventType_MOUSE_BUTTON_DOWN" },
84 { MOUSE_BUTTON_UP, "EventType_MOUSE_BUTTON_UP" },
85 { CURSOR_ENTER, "EventType_CURSOR_ENTER" },
86 { CURSOR_LEAVE, "EventType_CURSOR_LEAVE" },
87 { KEY_DOWN, "EventType_KEY_DOWN" },
88 { KEY_UP, "EventType_KEY_UP" },
89 { KEY_REPEAT, "EventType_KEY_REPEAT" },
90 { CHARACTER_TYPED, "EventType_CHARACTER_TYPED" },
91 { SPRITE_MOVE, "EventType_SPRITE_MOVE" },
92 { SET_SHADER, "EventType_SET_SHADER" },
93 { ADD_TEXTURE, "EventType_ADD_TEXTURE" },
94 { REMOVE_TEXTURE, "EventType_REMOVE_TEXTURE" },
95 { SET_ACTIVE, "EventType_SET_ACTIVE" },
96 { SET_ENTITY_ACTIVE, "EventType_SET_ENTITY_ACTIVE" },
97 { SET_UNIFORM, "EventType_SET_UNIFORM" },
98 { ANIMATION_TRIGGER, "EventType_ANIMATION_TRIGGER" },
99 { SUSPEND_KEY_INPUT, "EventType_SUSPEND_KEY_INPUT" },
100 { RESUME_KEY_INPUT, "EventType_RESUME_KEY_INPUT" },
101 { CHANGE_TEXT, "EventType_CHANGE_TEXT" },
102 { DEBUG_COMMAND, "EventType_DEBUG_COMMAND" },
103 { LOAD_MAP, "EventType_LOAD_MAP" },
104 { LOAD_CHARACTER, "EventType_LOAD_CHARACTER" },
105 { TOGGLE_FREE_CAMERA, "EventType_TOGGLE_FREE_CAMERA" },
106 { LIST_MAPS, "EventType_LIST_MAPS" },
107 { LIST_CHARACTERS, "EventType_LIST_CHARACTERS" },
108 { LIST_LAYERS, "EventType_LIST_LAYERS" },
109 { TOGGLE_LIGHTS, "EventType_TOGGLE_LIGHTS" },
110 { TOGGLE_LAYER, "EventType_TOGGLE_LAYER" },
111 { WINDOW_EXIT, "EventType_WINDOW_EXIT" },
112 };
113 chaiscript::utility::add_class<EventType>(*module, std::string("EventType"),
114 vec);
115 return module;
116 }
117 
118 
119 chaiscript::ModulePtr getLightTypeModule() {
120  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
121  std::vector<std::pair<unsigned int, std::string>> vec = {{ Light::POINT, "Light_Type_POINT" },
122 { Light::SPOT, "Light_Type_SPOT" },
123 };
124 chaiscript::utility::add_class<Light::Type>(*module, std::string("Light_Type"),
125 vec);
126 return module;
127 }
128 
129 
131  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
132  std::vector<std::pair<unsigned int, std::string>> vec = {{ WrappableText::LEFT, "WrappableText_HorizontalAlignment_LEFT" },
133 { WrappableText::HCENTER, "WrappableText_HorizontalAlignment_HCENTER" },
134 { WrappableText::RIGHT, "WrappableText_HorizontalAlignment_RIGHT" },
135 };
136 chaiscript::utility::add_class<WrappableText::HorizontalAlignment>(*module, std::string("WrappableText_HorizontalAlignment"),
137 vec);
138 return module;
139 }
140 
141 
143  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
144  std::vector<std::pair<unsigned int, std::string>> vec = {{ WrappableText::TOP, "WrappableText_VerticalAlignment_TOP" },
145 { WrappableText::VCENTER, "WrappableText_VerticalAlignment_VCENTER" },
146 { WrappableText::BOTTOM, "WrappableText_VerticalAlignment_BOTTOM" },
147 };
148 chaiscript::utility::add_class<WrappableText::VerticalAlignment>(*module, std::string("WrappableText_VerticalAlignment"),
149 vec);
150 return module;
151 }
152 
153 
154 chaiscript::ModulePtr getEntityModule() {
155  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
156 
157  chaiscript::utility::add_class<Entity>(*module, std::string("Entity"),
158  {
159 chaiscript::constructor<Entity()>(),
160 },
161 {
162 {chaiscript::fun(&Entity::addComponent), "addComponent"},
163 {chaiscript::fun(&Entity::removeComponent), "removeComponent"},
164 {chaiscript::fun(&Entity::getComponents), "getComponents"},
165 {chaiscript::fun(&Entity::getTransform), "getTransform"},
166 {chaiscript::fun(&Entity::setActive), "setActive"},
167 {chaiscript::fun(&Entity::isActive), "isActive"},
168 });
169 return module;
170 }
171 
172 
173 chaiscript::ModulePtr getComponentModule() {
174  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
175 
176  chaiscript::utility::add_class<Component>(*module, std::string("Component"),
177  {
178 },
179 {
180 {chaiscript::fun(&Component::setTransform), "setTransform"},
181 {chaiscript::fun(&Component::getTransform), "getTransform"},
182 {chaiscript::fun(&Component::setActive), "setActive"},
183 {chaiscript::fun(&Component::isActive), "isActive"},
184 {chaiscript::fun(&Component::getId), "getId"},
185 {chaiscript::fun(&Component::to_string), "to_string"},
186 {chaiscript::fun(&Component::className), "className"},
187 });
188  module->add(chaiscript::base_class<Subject, Component>());
189  module->add(chaiscript::base_class<Observer, Component>());
190 return module;
191 }
192 
193 
194 chaiscript::ModulePtr getTransformModule() {
195  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
196 
197  chaiscript::utility::add_class<Transform>(*module, std::string("Transform"),
198  {
199 chaiscript::constructor<Transform()>(),
200 },
201 {
202 {chaiscript::fun(&Transform::addChild), "addChild"},
203 {chaiscript::fun(&Transform::removeChild), "removeChild"},
204 {chaiscript::fun(&Transform::getChildren), "getChildren"},
205 {chaiscript::fun(&Transform::getParent), "getParent"},
206 {chaiscript::fun(&Transform::getTreeSize), "getTreeSize"},
207 {chaiscript::fun([](Transform& c, const float x, const float y) { c.translate(x, y); }), "translate"},
208 {chaiscript::fun([](Transform& c, const float x, const float y, const float z) { c.translate(x, y, z); }), "translate"},
209 {chaiscript::fun([](Transform& c, const glm::vec3& vec) { c.translate(vec); }), "translate"},
210 {chaiscript::fun([](Transform& c, const glm::vec2& vec) { c.translate(vec); }), "translate"},
211 {chaiscript::fun(&Transform::getAbsoluteTranslation), "getAbsoluteTranslation"},
212 {chaiscript::fun(&Transform::getLocalTranslation), "getLocalTranslation"},
213 {chaiscript::fun([](Transform& c, const float angle_x, const float angle_y, const float angle_z) { c.rotate(angle_x, angle_y, angle_z); }), "rotate"},
214 {chaiscript::fun([](Transform& c, const glm::vec3& euler_angles) { c.rotate(euler_angles); }), "rotate"},
215 {chaiscript::fun([](Transform& c, const glm::quat& quat) { c.rotate(quat); }), "rotate"},
216 {chaiscript::fun([](Transform& c, const float angle, const glm::vec3& axis) { c.rotate(angle, axis); }), "rotate"},
217 {chaiscript::fun(&Transform::getAbsoluteRotation), "getAbsoluteRotation"},
218 {chaiscript::fun(&Transform::getAbsoluteRotationAngle), "getAbsoluteRotationAngle"},
219 {chaiscript::fun(&Transform::getAbsoluteRotationAxis), "getAbsoluteRotationAxis"},
220 {chaiscript::fun(&Transform::getAbsoluteEulerAngles), "getAbsoluteEulerAngles"},
221 {chaiscript::fun(&Transform::getLocalRotation), "getLocalRotation"},
222 {chaiscript::fun(&Transform::getLocalRotationAngle), "getLocalRotationAngle"},
223 {chaiscript::fun(&Transform::getLocalRotationAxis), "getLocalRotationAxis"},
224 {chaiscript::fun(&Transform::getLocalEulerAngles), "getLocalEulerAngles"},
225 {chaiscript::fun([](Transform& c, const float x) { c.scale(x); }), "scale"},
226 {chaiscript::fun([](Transform& c, const float x, const float y) { c.scale(x, y); }), "scale"},
227 {chaiscript::fun([](Transform& c, const float x, const float y, const float z) { c.scale(x, y, z); }), "scale"},
228 {chaiscript::fun([](Transform& c, const glm::vec2& vec) { c.scale(vec); }), "scale"},
229 {chaiscript::fun([](Transform& c, const glm::vec3& vec) { c.scale(vec); }), "scale"},
230 {chaiscript::fun(&Transform::getAbsoluteScale), "getAbsoluteScale"},
231 {chaiscript::fun(&Transform::getLocalScale), "getLocalScale"},
232 {chaiscript::fun(&Transform::getAbsoluteTransformationMatrix), "getAbsoluteTransformationMatrix"},
233 {chaiscript::fun(&Transform::getLocalTransformationMatrix), "getLocalTransformationMatrix"},
234 {chaiscript::fun(&Transform::to_string), "to_string"},
235 });
236 return module;
237 }
238 
239 
240 chaiscript::ModulePtr getSetEntityActiveEventModule() {
241  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
242 
243  chaiscript::utility::add_class<SetEntityActiveEvent>(*module, std::string("SetEntityActiveEvent"),
244  {
245 chaiscript::constructor<SetEntityActiveEvent(const bool active)>(),
246 },
247 {
248 {chaiscript::fun(&SetEntityActiveEvent::create), "SetEntityActiveEvent_create"},
249 {chaiscript::fun(&SetEntityActiveEvent::getActive), "getActive"},
250 });
251  module->add(chaiscript::base_class<Event, SetEntityActiveEvent>());
252 return module;
253 }
254 
255 
256 chaiscript::ModulePtr getComponentManagerModule() {
257  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
258 
259  chaiscript::utility::add_class<ComponentManager>(*module, std::string("ComponentManager"),
260  {
261 },
262 {
263 {chaiscript::fun([](ComponentManager& c, std::shared_ptr<Component> component) { c.addComponent(component); }), "addComponent"},
264 {chaiscript::fun([](ComponentManager& c, std::vector<std::shared_ptr<Component>> components) { c.addComponents(components); }), "addComponents"},
265 {chaiscript::fun([](ComponentManager& c, std::list<std::shared_ptr<Component>> components) { c.addComponents(components); }), "addComponents"},
266 {chaiscript::fun(&ComponentManager::removeComponent), "removeComponent"},
267 {chaiscript::fun(&ComponentManager::removeComponents), "removeComponents"},
268 {chaiscript::fun(&ComponentManager::count), "count"},
269 });
270 return module;
271 }
272 
273 
274 chaiscript::ModulePtr getSetActiveEventModule() {
275  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
276 
277  chaiscript::utility::add_class<SetActiveEvent>(*module, std::string("SetActiveEvent"),
278  {
279 chaiscript::constructor<SetActiveEvent(const bool active)>(),
280 },
281 {
282 {chaiscript::fun(&SetActiveEvent::create), "SetActiveEvent_create"},
283 {chaiscript::fun(&SetActiveEvent::getActive), "getActive"},
284 });
285  module->add(chaiscript::base_class<Event, SetActiveEvent>());
286 return module;
287 }
288 
289 
290 chaiscript::ModulePtr getEngineModule() {
291  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
292 
293  chaiscript::utility::add_class<Engine>(*module, std::string("Engine"),
294  {
295 },
296 {
297 {chaiscript::fun(&Engine::addScene), "addScene"},
298 {chaiscript::fun(&Engine::findSceneByName), "findSceneByName"},
299 {chaiscript::fun(&Engine::getScenes), "getScenes"},
300 {chaiscript::fun(&Engine::activateScene), "activateScene"},
301 {chaiscript::fun(&Engine::deactivateScene), "deactivateScene"},
302 {chaiscript::fun(&Engine::getSceneNames), "getSceneNames"},
303 {chaiscript::fun(&Engine::getActiveSceneNames), "getActiveSceneNames"},
304 {chaiscript::fun(&Engine::timeToExit), "timeToExit"},
305 });
306 return module;
307 }
308 
309 
310 chaiscript::ModulePtr getInputSystemModule() {
311  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
312 
313  chaiscript::utility::add_class<InputSystem>(*module, std::string("InputSystem"),
314  {
315 },
316 {
317 {chaiscript::fun(&InputSystem::dummy), "dummy"},
318 });
319  module->add(chaiscript::base_class<Subject, InputSystem>());
320  module->add(chaiscript::base_class<Observer, InputSystem>());
321 return module;
322 }
323 
324 
325 chaiscript::ModulePtr getMouseScrollEventModule() {
326  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
327 
328  chaiscript::utility::add_class<MouseScrollEvent>(*module, std::string("MouseScrollEvent"),
329  {
330 chaiscript::constructor<MouseScrollEvent(const glm::dvec2& offset)>(),
331 },
332 {
333 {chaiscript::fun(&MouseScrollEvent::create), "MouseScrollEvent_create"},
334 {chaiscript::fun(&MouseScrollEvent::getPosition), "getPosition"},
335 });
336  module->add(chaiscript::base_class<Event, MouseScrollEvent>());
337 return module;
338 }
339 
340 
341 chaiscript::ModulePtr getMouseButtonUpEventModule() {
342  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
343 
344  chaiscript::utility::add_class<MouseButtonUpEvent>(*module, std::string("MouseButtonUpEvent"),
345  {
346 chaiscript::constructor<MouseButtonUpEvent(const int button)>(),
347 },
348 {
349 {chaiscript::fun(&MouseButtonUpEvent::create), "MouseButtonUpEvent_create"},
350 {chaiscript::fun(&MouseButtonUpEvent::getButton), "getButton"},
351 });
352  module->add(chaiscript::base_class<Event, MouseButtonUpEvent>());
353 return module;
354 }
355 
356 
357 chaiscript::ModulePtr getMouseCursorEventModule() {
358  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
359 
360  chaiscript::utility::add_class<MouseCursorEvent>(*module, std::string("MouseCursorEvent"),
361  {
362 chaiscript::constructor<MouseCursorEvent(const glm::dvec2& pos)>(),
363 },
364 {
365 {chaiscript::fun(&MouseCursorEvent::create), "MouseCursorEvent_create"},
366 {chaiscript::fun(&MouseCursorEvent::getPosition), "getPosition"},
367 });
368  module->add(chaiscript::base_class<Event, MouseCursorEvent>());
369 return module;
370 }
371 
372 
373 chaiscript::ModulePtr getCharacterTypedEventModule() {
374  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
375 
376  chaiscript::utility::add_class<CharacterTypedEvent>(*module, std::string("CharacterTypedEvent"),
377  {
378 chaiscript::constructor<CharacterTypedEvent(const unsigned char character)>(),
379 },
380 {
381 {chaiscript::fun(&CharacterTypedEvent::create), "CharacterTypedEvent_create"},
382 {chaiscript::fun(&CharacterTypedEvent::getCharacter), "getCharacter"},
383 });
384  module->add(chaiscript::base_class<Event, CharacterTypedEvent>());
385 return module;
386 }
387 
388 
389 chaiscript::ModulePtr getKeyUpEventModule() {
390  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
391 
392  chaiscript::utility::add_class<KeyUpEvent>(*module, std::string("KeyUpEvent"),
393  {
394 chaiscript::constructor<KeyUpEvent(const int key)>(),
395 },
396 {
397 {chaiscript::fun(&KeyUpEvent::create), "KeyUpEvent_create"},
398 {chaiscript::fun(&KeyUpEvent::getKey), "getKey"},
399 });
400  module->add(chaiscript::base_class<Event, KeyUpEvent>());
401 return module;
402 }
403 
404 
405 chaiscript::ModulePtr getKeyDownEventModule() {
406  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
407 
408  chaiscript::utility::add_class<KeyDownEvent>(*module, std::string("KeyDownEvent"),
409  {
410 chaiscript::constructor<KeyDownEvent(const int key)>(),
411 },
412 {
413 {chaiscript::fun(&KeyDownEvent::create), "KeyDownEvent_create"},
414 {chaiscript::fun(&KeyDownEvent::getKey), "getKey"},
415 });
416  module->add(chaiscript::base_class<Event, KeyDownEvent>());
417 return module;
418 }
419 
420 
421 chaiscript::ModulePtr getKeyRepeatEventModule() {
422  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
423 
424  chaiscript::utility::add_class<KeyRepeatEvent>(*module, std::string("KeyRepeatEvent"),
425  {
426 chaiscript::constructor<KeyRepeatEvent(const int key)>(),
427 },
428 {
429 {chaiscript::fun(&KeyRepeatEvent::create), "KeyRepeatEvent_create"},
430 {chaiscript::fun(&KeyRepeatEvent::getKey), "getKey"},
431 });
432  module->add(chaiscript::base_class<Event, KeyRepeatEvent>());
433 return module;
434 }
435 
436 
437 chaiscript::ModulePtr getCursorEnterEventModule() {
438  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
439 
440  chaiscript::utility::add_class<CursorEnterEvent>(*module, std::string("CursorEnterEvent"),
441  {
442 chaiscript::constructor<CursorEnterEvent()>(),
443 },
444 {
445 {chaiscript::fun(&CursorEnterEvent::create), "CursorEnterEvent_create"},
446 });
447  module->add(chaiscript::base_class<Event, CursorEnterEvent>());
448 return module;
449 }
450 
451 
452 chaiscript::ModulePtr getMouseButtonDownEventModule() {
453  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
454 
455  chaiscript::utility::add_class<MouseButtonDownEvent>(*module, std::string("MouseButtonDownEvent"),
456  {
457 chaiscript::constructor<MouseButtonDownEvent(const int button)>(),
458 },
459 {
460 {chaiscript::fun(&MouseButtonDownEvent::create), "MouseButtonDownEvent_create"},
461 {chaiscript::fun(&MouseButtonDownEvent::getButton), "getButton"},
462 });
463  module->add(chaiscript::base_class<Event, MouseButtonDownEvent>());
464 return module;
465 }
466 
467 
468 chaiscript::ModulePtr getCursorLeaveEventModule() {
469  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
470 
471  chaiscript::utility::add_class<CursorLeaveEvent>(*module, std::string("CursorLeaveEvent"),
472  {
473 chaiscript::constructor<CursorLeaveEvent()>(),
474 },
475 {
476 {chaiscript::fun(&CursorLeaveEvent::create), "CursorLeaveEvent_create"},
477 });
478  module->add(chaiscript::base_class<Event, CursorLeaveEvent>());
479 return module;
480 }
481 
482 
483 chaiscript::ModulePtr getSubjectModule() {
484  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
485 
486  chaiscript::utility::add_class<Subject>(*module, std::string("Subject"),
487  {
488 },
489 {
490 {chaiscript::fun(&Subject::notify), "notify"},
491 {chaiscript::fun(&Subject::notifyNow), "notifyNow"},
492 {chaiscript::fun(&Subject::addObserver), "addObserver"},
493 {chaiscript::fun(&Subject::removeObserver), "removeObserver"},
494 });
495 return module;
496 }
497 
498 
499 chaiscript::ModulePtr getEventModule() {
500  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
501 
502  chaiscript::utility::add_class<Event>(*module, std::string("Event"),
503  {
504 chaiscript::constructor<Event(const EventType& type)>(),
505 },
506 {
507 {chaiscript::fun(&Event::getEventType), "getEventType"},
508 });
509 return module;
510 }
511 
512 
513 chaiscript::ModulePtr getListLayersEventModule() {
514  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
515 
516  chaiscript::utility::add_class<ListLayersEvent>(*module, std::string("ListLayersEvent"),
517  {
518 chaiscript::constructor<ListLayersEvent()>(),
519 },
520 {
521 {chaiscript::fun(&ListLayersEvent::create), "ListLayersEvent_create"},
522 });
523  module->add(chaiscript::base_class<Event, ListLayersEvent>());
524 return module;
525 }
526 
527 
528 chaiscript::ModulePtr getLoadMapEventModule() {
529  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
530 
531  chaiscript::utility::add_class<LoadMapEvent>(*module, std::string("LoadMapEvent"),
532  {
533 chaiscript::constructor<LoadMapEvent(const std::string name)>(),
534 },
535 {
536 {chaiscript::fun(&LoadMapEvent::create), "LoadMapEvent_create"},
537 {chaiscript::fun(&LoadMapEvent::getName), "getName"},
538 });
539  module->add(chaiscript::base_class<Event, LoadMapEvent>());
540 return module;
541 }
542 
543 
544 chaiscript::ModulePtr getFPSCounterModule() {
545  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
546 
547  chaiscript::utility::add_class<FPSCounter>(*module, std::string("FPSCounter"),
548  {
549 },
550 {
551 {chaiscript::fun(&FPSCounter::getMaxFPS), "getMaxFPS"},
552 {chaiscript::fun(&FPSCounter::getCurrentFPS), "getCurrentFPS"},
553 {chaiscript::fun(&FPSCounter::getAverageFPS), "getAverageFPS"},
554 {chaiscript::fun(&FPSCounter::resetAverageFPS), "resetAverageFPS"},
555 });
556  module->add(chaiscript::base_class<Subject, FPSCounter>());
557 return module;
558 }
559 
560 
561 chaiscript::ModulePtr getToggleLayerEventModule() {
562  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
563 
564  chaiscript::utility::add_class<ToggleLayerEvent>(*module, std::string("ToggleLayerEvent"),
565  {
566 chaiscript::constructor<ToggleLayerEvent(const unsigned int layer_number, const bool on)>(),
567 },
568 {
569 {chaiscript::fun(&ToggleLayerEvent::create), "ToggleLayerEvent_create"},
570 {chaiscript::fun(&ToggleLayerEvent::turnOn), "turnOn"},
571 {chaiscript::fun(&ToggleLayerEvent::getLayerNumber), "getLayerNumber"},
572 });
573  module->add(chaiscript::base_class<Event, ToggleLayerEvent>());
574 return module;
575 }
576 
577 
578 chaiscript::ModulePtr getWindowExitEventModule() {
579  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
580 
581  chaiscript::utility::add_class<WindowExitEvent>(*module, std::string("WindowExitEvent"),
582  {
583 chaiscript::constructor<WindowExitEvent()>(),
584 },
585 {
586 {chaiscript::fun(&WindowExitEvent::create), "WindowExitEvent_create"},
587 });
588  module->add(chaiscript::base_class<Event, WindowExitEvent>());
589 return module;
590 }
591 
592 
593 chaiscript::ModulePtr getListCharactersEventModule() {
594  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
595 
596  chaiscript::utility::add_class<ListCharactersEvent>(*module, std::string("ListCharactersEvent"),
597  {
598 chaiscript::constructor<ListCharactersEvent()>(),
599 },
600 {
601 {chaiscript::fun(&ListCharactersEvent::create), "ListCharactersEvent_create"},
602 });
603  module->add(chaiscript::base_class<Event, ListCharactersEvent>());
604 return module;
605 }
606 
607 
608 chaiscript::ModulePtr getListMapsEventModule() {
609  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
610 
611  chaiscript::utility::add_class<ListMapsEvent>(*module, std::string("ListMapsEvent"),
612  {
613 chaiscript::constructor<ListMapsEvent()>(),
614 },
615 {
616 {chaiscript::fun(&ListMapsEvent::create), "ListMapsEvent_create"},
617 });
618  module->add(chaiscript::base_class<Event, ListMapsEvent>());
619 return module;
620 }
621 
622 
623 chaiscript::ModulePtr getConfigManagerModule() {
624  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
625 
626  chaiscript::utility::add_class<ConfigManager>(*module, std::string("ConfigManager"),
627  {
628 },
629 {
630 {chaiscript::fun(&ConfigManager::getInt), "getInt"},
631 {chaiscript::fun(&ConfigManager::getUnsignedInt), "getUnsignedInt"},
632 {chaiscript::fun(&ConfigManager::getString), "getString"},
633 {chaiscript::fun(&ConfigManager::getFloat), "getFloat"},
634 {chaiscript::fun(&ConfigManager::getDouble), "getDouble"},
635 {chaiscript::fun(&ConfigManager::getBool), "getBool"},
636 {chaiscript::fun(&ConfigManager::getStringVector), "getStringVector"},
637 {chaiscript::fun(&ConfigManager::getUnsignedIntVector), "getUnsignedIntVector"},
638 });
639 return module;
640 }
641 
642 
643 chaiscript::ModulePtr getLoadCharacterEventModule() {
644  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
645 
646  chaiscript::utility::add_class<LoadCharacterEvent>(*module, std::string("LoadCharacterEvent"),
647  {
648 chaiscript::constructor<LoadCharacterEvent(const std::string name)>(),
649 },
650 {
651 {chaiscript::fun(&LoadCharacterEvent::create), "LoadCharacterEvent_create"},
652 {chaiscript::fun(&LoadCharacterEvent::getName), "getName"},
653 });
654  module->add(chaiscript::base_class<Event, LoadCharacterEvent>());
655 return module;
656 }
657 
658 
659 chaiscript::ModulePtr getDebugParserModule() {
660  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
661 
662  chaiscript::utility::add_class<DebugParser>(*module, std::string("DebugParser"),
663  {
664 chaiscript::constructor<DebugParser()>(),
665 },
666 {
667 {chaiscript::fun(&DebugParser::parseCommand), "parseCommand"},
668 {chaiscript::fun(&DebugParser::handleEvents), "handleEvents"},
669 });
670  module->add(chaiscript::base_class<Subject, DebugParser>());
671  module->add(chaiscript::base_class<Observer, DebugParser>());
672 return module;
673 }
674 
675 
676 chaiscript::ModulePtr getToggleLightsEventModule() {
677  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
678 
679  chaiscript::utility::add_class<ToggleLightsEvent>(*module, std::string("ToggleLightsEvent"),
680  {
681 chaiscript::constructor<ToggleLightsEvent(const bool on)>(),
682 },
683 {
684 {chaiscript::fun(&ToggleLightsEvent::create), "ToggleLightsEvent_create"},
685 {chaiscript::fun(&ToggleLightsEvent::turnOn), "turnOn"},
686 });
687  module->add(chaiscript::base_class<Event, ToggleLightsEvent>());
688 return module;
689 }
690 
691 
692 chaiscript::ModulePtr getToggleFreeCameraEventModule() {
693  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
694 
695  chaiscript::utility::add_class<ToggleFreeCameraEvent>(*module, std::string("ToggleFreeCameraEvent"),
696  {
697 chaiscript::constructor<ToggleFreeCameraEvent()>(),
698 },
699 {
700 {chaiscript::fun(&ToggleFreeCameraEvent::create), "ToggleFreeCameraEvent_create"},
701 });
702  module->add(chaiscript::base_class<Event, ToggleFreeCameraEvent>());
703 return module;
704 }
705 
706 
707 chaiscript::ModulePtr getScriptObjectModule() {
708  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
709 
710  chaiscript::utility::add_class<ScriptObject>(*module, std::string("ScriptObject"),
711  {
712 },
713 {
714 {chaiscript::fun(&ScriptObject::setClassName), "setClassName"},
715 {chaiscript::fun(&ScriptObject::getClassName), "getClassName"},
716 });
717  module->add(chaiscript::base_class<Subject, ScriptObject>());
718  module->add(chaiscript::base_class<Observer, ScriptObject>());
719 return module;
720 }
721 
722 
723 chaiscript::ModulePtr getSceneModule() {
724  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
725 
726  chaiscript::utility::add_class<Scene>(*module, std::string("Scene"),
727  {
728 chaiscript::constructor<Scene(const std::string scene_name)>(),
729 },
730 {
731 {chaiscript::fun(&Scene::setTransform), "setTransform"},
732 {chaiscript::fun(&Scene::getTransform), "getTransform"},
733 {chaiscript::fun([](Scene& c, std::shared_ptr<Component> component) { c.addComponent(component); }), "addComponent"},
734 {chaiscript::fun([](Scene& c, std::shared_ptr<Physics::CollisionData> collision_data) { c.addComponent(collision_data); }), "addComponent"},
735 {chaiscript::fun(&Scene::addComponents), "addComponents"},
736 {chaiscript::fun(&Scene::getComponents), "getComponents"},
737 {chaiscript::fun(&Scene::getCollisionData), "getCollisionData"},
738 {chaiscript::fun(&Scene::addEntity), "addEntity"},
739 {chaiscript::fun(&Scene::addEntities), "addEntities"},
740 {chaiscript::fun(&Scene::getEntities), "getEntities"},
741 {chaiscript::fun(&Scene::setName), "setName"},
742 {chaiscript::fun(&Scene::getName), "getName"},
743 {chaiscript::fun(&Scene::to_string), "to_string"},
744 });
745 return module;
746 }
747 
748 
749 chaiscript::ModulePtr getSceneGeneratorModule() {
750  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
751 
752  chaiscript::utility::add_class<SceneGenerator>(*module, std::string("SceneGenerator"),
753  {
754 chaiscript::constructor<SceneGenerator(const Map& animation_index, std::shared_ptr<Graphics::TextureManager> texture_manager, std::shared_ptr<Graphics::ShaderManager> shader_manager, const unsigned int ui_z_slots)>(),
755 chaiscript::constructor<SceneGenerator(const SceneGenerator& s)>(),
756 },
757 {
758 {chaiscript::fun(&SceneGenerator::createSceneFromMap), "createSceneFromMap"},
759 {chaiscript::fun(&SceneGenerator::getDynamicEntityByName), "getDynamicEntityByName"},
760 {chaiscript::fun(&SceneGenerator::getDynamicEntityNames), "getDynamicEntityNames"},
761 {chaiscript::fun(&SceneGenerator::getStrippedMapName), "getStrippedMapName"},
762 });
763 return module;
764 }
765 
766 
767 chaiscript::ModulePtr getSpriteMovementModule() {
768  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
769 
770  chaiscript::utility::add_class<SpriteMovement>(*module, std::string("SpriteMovement"),
771  {
772 chaiscript::constructor<SpriteMovement()>(),
773 },
774 {
775 {chaiscript::fun(&SpriteMovement::addCollisionData), "addCollisionData"},
776 {chaiscript::fun(&SpriteMovement::setMovingSpeed), "setMovingSpeed"},
777 {chaiscript::fun(&SpriteMovement::setMoveQuantization), "setMoveQuantization"},
778 {chaiscript::fun(&SpriteMovement::className), "className"},
779 {chaiscript::fun(&SpriteMovement::to_string), "to_string"},
780 });
781  module->add(chaiscript::base_class<Component, SpriteMovement>());
782  module->add(chaiscript::base_class<Subject, SpriteMovement>());
783  module->add(chaiscript::base_class<Observer, SpriteMovement>());
784 return module;
785 }
786 
787 
788 chaiscript::ModulePtr getMapModule() {
789  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
790 
791  chaiscript::utility::add_class<Map>(*module, std::string("Map"),
792  {
793 chaiscript::constructor<Map(const std::string& path)>(),
794 chaiscript::constructor<Map(const Map& map)>(),
795 },
796 {
797 {chaiscript::fun(&Map::getPath), "getPath"},
798 });
799 return module;
800 }
801 
802 
803 chaiscript::ModulePtr getSpriteMoveEventModule() {
804  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
805 
806  chaiscript::utility::add_class<SpriteMoveEvent>(*module, std::string("SpriteMoveEvent"),
807  {
808 chaiscript::constructor<SpriteMoveEvent(const glm::vec2& velocity, const glm::vec2& next_position)>(),
809 },
810 {
811 {chaiscript::fun(&SpriteMoveEvent::create), "SpriteMoveEvent_create"},
812 {chaiscript::fun(&SpriteMoveEvent::getVelocity), "getVelocity"},
813 {chaiscript::fun(&SpriteMoveEvent::getNextPosition), "getNextPosition"},
814 });
815  module->add(chaiscript::base_class<Event, SpriteMoveEvent>());
816 return module;
817 }
818 
819 
820 chaiscript::ModulePtr getGraphicsSystemModule() {
821  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
822 
823  chaiscript::utility::add_class<GraphicsSystem>(*module, std::string("GraphicsSystem"),
824  {
825 },
826 {
827 {chaiscript::fun(&GraphicsSystem::windowHeight), "windowHeight"},
828 {chaiscript::fun(&GraphicsSystem::windowWidth), "windowWidth"},
829 {chaiscript::fun(&GraphicsSystem::windowName), "windowName"},
830 {chaiscript::fun(&GraphicsSystem::setWindowName), "setWindowName"},
831 {chaiscript::fun(&GraphicsSystem::addRenderable), "addRenderable"},
832 {chaiscript::fun(&GraphicsSystem::removeRenderable), "removeRenderable"},
833 {chaiscript::fun(&GraphicsSystem::renderablesCount), "renderablesCount"},
834 {chaiscript::fun(&GraphicsSystem::setMaxInfluenceLights), "setMaxInfluenceLights"},
835 {chaiscript::fun(&GraphicsSystem::getMaxInfluenceLights), "getMaxInfluenceLights"},
836 {chaiscript::fun(&GraphicsSystem::addLight), "addLight"},
837 {chaiscript::fun(&GraphicsSystem::removeLight), "removeLight"},
838 });
839 return module;
840 }
841 
842 
843 chaiscript::ModulePtr getTextureManagerModule() {
844  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
845 
846  chaiscript::utility::add_class<TextureManager>(*module, std::string("TextureManager"),
847  {
848 },
849 {
850 {chaiscript::fun(&TextureManager::loadTexture), "loadTexture"},
851 {chaiscript::fun(&TextureManager::getTexture), "getTexture"},
852 {chaiscript::fun(&TextureManager::textureExists), "textureExists"},
853 });
854 return module;
855 }
856 
857 
858 chaiscript::ModulePtr getSetUniformEventModule() {
859  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
860 
861  chaiscript::utility::add_class<SetUniformEvent>(*module, std::string("SetUniformEvent"),
862  {
863 chaiscript::constructor<SetUniformEvent(const Uniform& uniform)>(),
864 },
865 {
866 {chaiscript::fun(&SetUniformEvent::create), "SetUniformEvent_create"},
867 {chaiscript::fun(&SetUniformEvent::getUniform), "getUniform"},
868 });
869  module->add(chaiscript::base_class<Event, SetUniformEvent>());
870 return module;
871 }
872 
873 
874 chaiscript::ModulePtr getRenderableModule() {
875  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
876 
877  chaiscript::utility::add_class<Renderable>(*module, std::string("Renderable"),
878  {
879 },
880 {
881 {chaiscript::fun(&Renderable::setShader), "setShader"},
882 {chaiscript::fun(&Renderable::getShader), "getShader"},
883 {chaiscript::fun(&Renderable::addTexture), "addTexture"},
884 {chaiscript::fun(&Renderable::removeTexture), "removeTexture"},
885 {chaiscript::fun(&Renderable::getTextures), "getTextures"},
886 {chaiscript::fun(&Renderable::setLightReactive), "setLightReactive"},
887 {chaiscript::fun(&Renderable::isLightReactive), "isLightReactive"},
888 {chaiscript::fun(&Renderable::setAmbientLight), "setAmbientLight"},
889 {chaiscript::fun(&Renderable::getAmbientLight), "getAmbientLight"},
890 {chaiscript::fun(&Renderable::setAmbientIntensity), "setAmbientIntensity"},
891 {chaiscript::fun(&Renderable::getAmbientIntensity), "getAmbientIntensity"},
892 {chaiscript::fun(&Renderable::addInfluencingLight), "addInfluencingLight"},
893 {chaiscript::fun(&Renderable::clearInfluencingLights), "clearInfluencingLights"},
894 {chaiscript::fun(&Renderable::to_string), "to_string"},
895 {chaiscript::fun(&Renderable::className), "className"},
896 });
897  module->add(chaiscript::base_class<Component, Renderable>());
898  module->add(chaiscript::base_class<Subject, Renderable>());
899  module->add(chaiscript::base_class<Observer, Renderable>());
900 return module;
901 }
902 
903 
904 chaiscript::ModulePtr getCameraModule() {
905  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
906 
907  chaiscript::utility::add_class<Camera>(*module, std::string("Camera"),
908  {
909 },
910 {
911 {chaiscript::fun(&Camera::setScreenPaddingInTiles), "setScreenPaddingInTiles"},
912 {chaiscript::fun(&Camera::getScreenPaddingInTiles), "getScreenPaddingInTiles"},
913 {chaiscript::fun(&Camera::setWidth), "setWidth"},
914 {chaiscript::fun(&Camera::getWidth), "getWidth"},
915 {chaiscript::fun(&Camera::setHeight), "setHeight"},
916 {chaiscript::fun(&Camera::getHeight), "getHeight"},
917 {chaiscript::fun(&Camera::setNear), "setNear"},
918 {chaiscript::fun(&Camera::getNear), "getNear"},
919 {chaiscript::fun(&Camera::setFar), "setFar"},
920 {chaiscript::fun(&Camera::getFar), "getFar"},
921 {chaiscript::fun(&Camera::setFreeCameraSpeed), "setFreeCameraSpeed"},
922 {chaiscript::fun(&Camera::getFreeCameraSpeed), "getFreeCameraSpeed"},
923 {chaiscript::fun(&Camera::getProjectionMatrix), "getProjectionMatrix"},
924 {chaiscript::fun(&Camera::isComponentWithin), "isComponentWithin"},
925 {chaiscript::fun(&Camera::className), "className"},
926 });
927  module->add(chaiscript::base_class<Component, Camera>());
928  module->add(chaiscript::base_class<Subject, Camera>());
929  module->add(chaiscript::base_class<Observer, Camera>());
930 return module;
931 }
932 
933 
934 chaiscript::ModulePtr getLightModule() {
935  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
936 
937  chaiscript::utility::add_class<Light>(*module, std::string("Light"),
938  {
939 chaiscript::constructor<Light(const Light::Type& type)>(),
940 },
941 {
942 {chaiscript::fun(&Light::setColor), "setColor"},
943 {chaiscript::fun(&Light::getColor), "getColor"},
944 {chaiscript::fun(&Light::setIntensity), "setIntensity"},
945 {chaiscript::fun(&Light::getIntensity), "getIntensity"},
946 {chaiscript::fun(&Light::setLinearAttenuation), "setLinearAttenuation"},
947 {chaiscript::fun(&Light::getLinearAttenuation), "getLinearAttenuation"},
948 {chaiscript::fun(&Light::setQuadraticAttenuation), "setQuadraticAttenuation"},
949 {chaiscript::fun(&Light::getQuadraticAttenuation), "getQuadraticAttenuation"},
950 {chaiscript::fun(&Light::castsQuantizedBands), "castsQuantizedBands"},
951 {chaiscript::fun(&Light::setNumberOfQuantizedBands), "setNumberOfQuantizedBands"},
952 {chaiscript::fun(&Light::getNumberOfQuantizedBands), "getNumberOfQuantizedBands"},
953 {chaiscript::fun(&Light::setConeAngle), "setConeAngle"},
954 {chaiscript::fun(&Light::getConeAngle), "getConeAngle"},
955 {chaiscript::fun(&Light::setConeDirection), "setConeDirection"},
956 {chaiscript::fun(&Light::getConeDirection), "getConeDirection"},
957 {chaiscript::fun(&Light::getType), "getType"},
958 {chaiscript::fun(&Light::influenceOnComponent), "influenceOnComponent"},
959 {chaiscript::fun(&Light::className), "className"},
960 });
961  module->add(chaiscript::base_class<Component, Light>());
962  module->add(chaiscript::base_class<Subject, Light>());
963  module->add(chaiscript::base_class<Observer, Light>());
964 return module;
965 }
966 
967 
968 chaiscript::ModulePtr getShaderModule() {
969  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
970 
971  chaiscript::utility::add_class<Shader>(*module, std::string("Shader"),
972  {
973 },
974 {
975 {chaiscript::fun(&Shader::getUniformNames), "getUniformNames"},
976 {chaiscript::fun([](Shader& c, const Uniform& uniform) { c.setUniform(uniform); }), "setUniform"},
977 {chaiscript::fun(&Shader::setName), "setName"},
978 {chaiscript::fun(&Shader::getName), "getName"},
979 {chaiscript::fun(&Shader::to_string), "to_string"},
980 });
981 return module;
982 }
983 
984 
985 chaiscript::ModulePtr getBaseTextureModule() {
986  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
987 
988  chaiscript::utility::add_class<BaseTexture>(*module, std::string("BaseTexture"),
989  {
990 chaiscript::constructor<BaseTexture(const GLenum texture_type)>(),
991 },
992 {
993 {chaiscript::fun(&BaseTexture::getWidth), "getWidth"},
994 {chaiscript::fun(&BaseTexture::getHeight), "getHeight"},
995 {chaiscript::fun(&BaseTexture::load), "load"},
996 {chaiscript::fun(&BaseTexture::bind), "bind"},
997 {chaiscript::fun(&BaseTexture::isLoaded), "isLoaded"},
998 {chaiscript::fun(&BaseTexture::setName), "setName"},
999 {chaiscript::fun(&BaseTexture::getName), "getName"},
1000 {chaiscript::fun(&BaseTexture::to_string), "to_string"},
1001 });
1002 return module;
1003 }
1004 
1005 
1006 chaiscript::ModulePtr getShaderManagerModule() {
1007  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1008 
1009  chaiscript::utility::add_class<ShaderManager>(*module, std::string("ShaderManager"),
1010  {
1011 },
1012 {
1013 {chaiscript::fun([](ShaderManager& c, const std::string& name, const bool geometry_shader) { c.loadShader(name, geometry_shader); }), "loadShader"},
1014 {chaiscript::fun([](ShaderManager& c, const std::string& name, const std::string& vertex_filename, const std::string& fragment_filename, const std::string& geometry_filename) { c.loadShader(name, vertex_filename, fragment_filename, geometry_filename); }), "loadShader"},
1015 {chaiscript::fun(&ShaderManager::getShader), "getShader"},
1016 {chaiscript::fun([](ShaderManager& c, const Uniform& u) { c.setUniformForAllPrograms(u); }), "setUniformForAllPrograms"},
1017 });
1018 return module;
1019 }
1020 
1021 
1022 chaiscript::ModulePtr getAreaModule() {
1023  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1024 
1025  chaiscript::utility::add_class<Area>(*module, std::string("Area"),
1026  {
1027 chaiscript::constructor<Area(VertexData vertex_data, std::shared_ptr<Skin> skin, const unsigned int layer)>(),
1028 },
1029 {
1030 {chaiscript::fun(&Area::create), "Area_create"},
1031 {chaiscript::fun(&Area::onLeftClick), "onLeftClick"},
1032 {chaiscript::fun(&Area::onRightClick), "onRightClick"},
1033 {chaiscript::fun(&Area::onLeftClickRelease), "onLeftClickRelease"},
1034 {chaiscript::fun(&Area::onRightClickRelease), "onRightClickRelease"},
1035 {chaiscript::fun(&Area::onCursorEnter), "onCursorEnter"},
1036 {chaiscript::fun(&Area::onCursorLeave), "onCursorLeave"},
1037 {chaiscript::fun(&Area::onKeyDown), "onKeyDown"},
1038 {chaiscript::fun(&Area::onKeyUp), "onKeyUp"},
1039 {chaiscript::fun(&Area::onKeyRepeat), "onKeyRepeat"},
1040 {chaiscript::fun(&Area::onScroll), "onScroll"},
1041 {chaiscript::fun(&Area::to_string), "to_string"},
1042 {chaiscript::fun(&Area::className), "className"},
1043 });
1044  module->add(chaiscript::base_class<Element, Area>());
1045  module->add(chaiscript::base_class<Renderable, Area>());
1046  module->add(chaiscript::base_class<Component, Area>());
1047  module->add(chaiscript::base_class<Subject, Area>());
1048  module->add(chaiscript::base_class<Observer, Area>());
1049 return module;
1050 }
1051 
1052 
1053 chaiscript::ModulePtr getChangeTextEventModule() {
1054  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1055 
1056  chaiscript::utility::add_class<ChangeTextEvent>(*module, std::string("ChangeTextEvent"),
1057  {
1058 chaiscript::constructor<ChangeTextEvent(const std::string& text)>(),
1059 },
1060 {
1061 {chaiscript::fun(&ChangeTextEvent::create), "ChangeTextEvent_create"},
1062 {chaiscript::fun(&ChangeTextEvent::getText), "getText"},
1063 });
1064  module->add(chaiscript::base_class<Event, ChangeTextEvent>());
1065 return module;
1066 }
1067 
1068 
1069 chaiscript::ModulePtr getTextAreaModule() {
1070  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1071 
1072  chaiscript::utility::add_class<TextArea>(*module, std::string("TextArea"),
1073  {
1074 chaiscript::constructor<TextArea(std::shared_ptr<WrappableText> text, VertexData vertex_data, std::shared_ptr<Skin> skin, const unsigned int layer)>(),
1075 },
1076 {
1077 {chaiscript::fun(&TextArea::create), "TextArea_create"},
1078 {chaiscript::fun(&TextArea::setText), "setText"},
1079 {chaiscript::fun(&TextArea::getText), "getText"},
1080 {chaiscript::fun(&TextArea::onLeftClick), "onLeftClick"},
1081 {chaiscript::fun(&TextArea::onRightClick), "onRightClick"},
1082 {chaiscript::fun(&TextArea::onLeftClickRelease), "onLeftClickRelease"},
1083 {chaiscript::fun(&TextArea::onRightClickRelease), "onRightClickRelease"},
1084 {chaiscript::fun(&TextArea::onCursorEnter), "onCursorEnter"},
1085 {chaiscript::fun(&TextArea::onCursorLeave), "onCursorLeave"},
1086 {chaiscript::fun(&TextArea::onKeyDown), "onKeyDown"},
1087 {chaiscript::fun(&TextArea::onKeyUp), "onKeyUp"},
1088 {chaiscript::fun(&TextArea::onKeyRepeat), "onKeyRepeat"},
1089 {chaiscript::fun(&TextArea::onScroll), "onScroll"},
1090 {chaiscript::fun(&TextArea::onDestroy), "onDestroy"},
1091 {chaiscript::fun(&TextArea::onStart), "onStart"},
1092 {chaiscript::fun(&TextArea::onUpdate), "onUpdate"},
1093 {chaiscript::fun(&TextArea::to_string), "to_string"},
1094 {chaiscript::fun(&TextArea::className), "className"},
1095 });
1096  module->add(chaiscript::base_class<Area, TextArea>());
1097  module->add(chaiscript::base_class<Element, TextArea>());
1098  module->add(chaiscript::base_class<Renderable, TextArea>());
1099  module->add(chaiscript::base_class<Component, TextArea>());
1100  module->add(chaiscript::base_class<Subject, TextArea>());
1101  module->add(chaiscript::base_class<Observer, TextArea>());
1102 return module;
1103 }
1104 
1105 
1106 chaiscript::ModulePtr getTextFieldModule() {
1107  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1108 
1109  chaiscript::utility::add_class<TextField>(*module, std::string("TextField"),
1110  {
1111 chaiscript::constructor<TextField(std::shared_ptr<WrappableText> default_text, std::shared_ptr<WrappableText> typed_text, VertexData vertex_data, std::shared_ptr<Skin> skin, const unsigned int layer)>(),
1112 },
1113 {
1114 {chaiscript::fun(&TextField::create), "TextField_create"},
1115 {chaiscript::fun(&TextField::onLeftClick), "onLeftClick"},
1116 {chaiscript::fun(&TextField::onRightClick), "onRightClick"},
1117 {chaiscript::fun(&TextField::onLeftClickRelease), "onLeftClickRelease"},
1118 {chaiscript::fun(&TextField::onRightClickRelease), "onRightClickRelease"},
1119 {chaiscript::fun(&TextField::onCursorEnter), "onCursorEnter"},
1120 {chaiscript::fun(&TextField::onCursorLeave), "onCursorLeave"},
1121 {chaiscript::fun(&TextField::onKeyDown), "onKeyDown"},
1122 {chaiscript::fun(&TextField::onKeyUp), "onKeyUp"},
1123 {chaiscript::fun(&TextField::onKeyRepeat), "onKeyRepeat"},
1124 {chaiscript::fun(&TextField::onScroll), "onScroll"},
1125 {chaiscript::fun(&TextField::onCharacterTyped), "onCharacterTyped"},
1126 {chaiscript::fun(&TextField::to_string), "to_string"},
1127 {chaiscript::fun(&TextField::className), "className"},
1128 });
1129  module->add(chaiscript::base_class<TextArea, TextField>());
1130  module->add(chaiscript::base_class<Area, TextField>());
1131  module->add(chaiscript::base_class<Element, TextField>());
1132  module->add(chaiscript::base_class<Renderable, TextField>());
1133  module->add(chaiscript::base_class<Component, TextField>());
1134  module->add(chaiscript::base_class<Subject, TextField>());
1135  module->add(chaiscript::base_class<Observer, TextField>());
1136 return module;
1137 }
1138 
1139 
1140 chaiscript::ModulePtr getWrappableTextModule() {
1141  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1142 
1143  chaiscript::utility::add_class<WrappableText>(*module, std::string("WrappableText"),
1144  {
1145 chaiscript::constructor<WrappableText()>(),
1146 },
1147 {
1148 {chaiscript::fun(&WrappableText::setSize), "setSize"},
1149 {chaiscript::fun(&WrappableText::setLineSpacing), "setLineSpacing"},
1150 {chaiscript::fun(&WrappableText::setHorizontalAlignment), "setHorizontalAlignment"},
1151 {chaiscript::fun(&WrappableText::setVerticalAlignment), "setVerticalAlignment"},
1152 {chaiscript::fun(&WrappableText::setText), "setText"},
1153 {chaiscript::fun(&WrappableText::to_string), "to_string"},
1154 {chaiscript::fun(&WrappableText::className), "className"},
1155 });
1156  module->add(chaiscript::base_class<Text, WrappableText>());
1157  module->add(chaiscript::base_class<Component, WrappableText>());
1158  module->add(chaiscript::base_class<Subject, WrappableText>());
1159  module->add(chaiscript::base_class<Observer, WrappableText>());
1160 return module;
1161 }
1162 
1163 
1164 chaiscript::ModulePtr getSkinModule() {
1165  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1166 
1167  chaiscript::utility::add_class<Skin>(*module, std::string("Skin"),
1168  {
1169 chaiscript::constructor<Skin(std::shared_ptr<BaseTexture> texture, std::shared_ptr<Shader> shader)>(),
1170 },
1171 {
1172 {chaiscript::fun(&Skin::setTexture), "setTexture"},
1173 {chaiscript::fun(&Skin::setShader), "setShader"},
1174 {chaiscript::fun(&Skin::getTexture), "getTexture"},
1175 {chaiscript::fun(&Skin::getShader), "getShader"},
1176 });
1177 return module;
1178 }
1179 
1180 
1181 chaiscript::ModulePtr getElementModule() {
1182  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1183 
1184  chaiscript::utility::add_class<Element>(*module, std::string("Element"),
1185  {
1186 },
1187 {
1188 {chaiscript::fun(&Element::getSkin), "getSkin"},
1189 {chaiscript::fun(&Element::setSkin), "setSkin"},
1190 {chaiscript::fun(&Element::getAnchorPoint), "getAnchorPoint"},
1191 {chaiscript::fun(&Element::setAnchorPoint), "setAnchorPoint"},
1192 {chaiscript::fun(&Element::getWidth), "getWidth"},
1193 {chaiscript::fun(&Element::getHeight), "getHeight"},
1194 {chaiscript::fun(&Element::setWidth), "setWidth"},
1195 {chaiscript::fun(&Element::setHeight), "setHeight"},
1196 {chaiscript::fun(&Element::getTextPadding), "getTextPadding"},
1197 {chaiscript::fun(&Element::setTextPadding), "setTextPadding"},
1198 {chaiscript::fun(&Element::getColor), "getColor"},
1199 {chaiscript::fun(&Element::setColor), "setColor"},
1200 {chaiscript::fun(&Element::to_string), "to_string"},
1201 {chaiscript::fun(&Element::isPointWithin), "isPointWithin"},
1202 {chaiscript::fun(&Element::className), "className"},
1203 });
1204  module->add(chaiscript::base_class<Renderable, Element>());
1205  module->add(chaiscript::base_class<Component, Element>());
1206  module->add(chaiscript::base_class<Subject, Element>());
1207  module->add(chaiscript::base_class<Observer, Element>());
1208 return module;
1209 }
1210 
1211 
1212 chaiscript::ModulePtr getSuspendKeyInputEventModule() {
1213  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1214 
1215  chaiscript::utility::add_class<SuspendKeyInputEvent>(*module, std::string("SuspendKeyInputEvent"),
1216  {
1217 chaiscript::constructor<SuspendKeyInputEvent()>(),
1218 },
1219 {
1220 {chaiscript::fun(&SuspendKeyInputEvent::create), "SuspendKeyInputEvent_create"},
1221 });
1222  module->add(chaiscript::base_class<Event, SuspendKeyInputEvent>());
1223 return module;
1224 }
1225 
1226 
1227 chaiscript::ModulePtr getFontModule() {
1228  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1229 
1230  chaiscript::utility::add_class<Font>(*module, std::string("Font"),
1231  {
1232 },
1233 {
1234 {chaiscript::fun(&Font::addCharacter), "addCharacter"},
1235 {chaiscript::fun(&Font::getCharacter), "getCharacter"},
1236 {chaiscript::fun(&Font::getCharacters), "getCharacters"},
1237 {chaiscript::fun(&Font::getSize), "getSize"},
1238 {chaiscript::fun(&Font::getOpenGLSize), "getOpenGLSize"},
1239 });
1240 return module;
1241 }
1242 
1243 
1244 chaiscript::ModulePtr getFontGeneratorModule() {
1245  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1246 
1247  chaiscript::utility::add_class<FontGenerator>(*module, std::string("FontGenerator"),
1248  {
1249 },
1250 {
1251 {chaiscript::fun(&FontGenerator::setFontPath), "setFontPath"},
1252 {chaiscript::fun(&FontGenerator::getFontPath), "getFontPath"},
1253 {chaiscript::fun(&FontGenerator::loadFont), "loadFont"},
1254 {chaiscript::fun(&FontGenerator::getFont), "getFont"},
1255 });
1256 return module;
1257 }
1258 
1259 
1260 chaiscript::ModulePtr getQuitButtonModule() {
1261  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1262 
1263  chaiscript::utility::add_class<QuitButton>(*module, std::string("QuitButton"),
1264  {
1265 chaiscript::constructor<QuitButton(std::shared_ptr<WrappableText> text, VertexData vertex_data, std::shared_ptr<Skin> skin, const unsigned int layer)>(),
1266 },
1267 {
1268 {chaiscript::fun(&QuitButton::create), "QuitButton_create"},
1269 {chaiscript::fun(&QuitButton::onLeftClick), "onLeftClick"},
1270 {chaiscript::fun(&QuitButton::className), "className"},
1271 });
1272  module->add(chaiscript::base_class<Button, QuitButton>());
1273  module->add(chaiscript::base_class<TextArea, QuitButton>());
1274  module->add(chaiscript::base_class<Area, QuitButton>());
1275  module->add(chaiscript::base_class<Element, QuitButton>());
1276  module->add(chaiscript::base_class<Renderable, QuitButton>());
1277  module->add(chaiscript::base_class<Component, QuitButton>());
1278  module->add(chaiscript::base_class<Subject, QuitButton>());
1279  module->add(chaiscript::base_class<Observer, QuitButton>());
1280 return module;
1281 }
1282 
1283 
1284 chaiscript::ModulePtr getResumeKeyInputEventModule() {
1285  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1286 
1287  chaiscript::utility::add_class<ResumeKeyInputEvent>(*module, std::string("ResumeKeyInputEvent"),
1288  {
1289 chaiscript::constructor<ResumeKeyInputEvent()>(),
1290 },
1291 {
1292 {chaiscript::fun(&ResumeKeyInputEvent::create), "ResumeKeyInputEvent_create"},
1293 });
1294  module->add(chaiscript::base_class<Event, ResumeKeyInputEvent>());
1295 return module;
1296 }
1297 
1298 
1299 chaiscript::ModulePtr getTextModule() {
1300  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1301 
1302  chaiscript::utility::add_class<Text>(*module, std::string("Text"),
1303  {
1304 chaiscript::constructor<Text()>(),
1305 },
1306 {
1307 {chaiscript::fun(&Text::setFont), "setFont"},
1308 {chaiscript::fun(&Text::setText), "setText"},
1309 {chaiscript::fun(&Text::getText), "getText"},
1310 {chaiscript::fun(&Text::setColor), "setColor"},
1311 {chaiscript::fun(&Text::getColor), "getColor"},
1312 {chaiscript::fun(&Text::setShader), "setShader"},
1313 {chaiscript::fun(&Text::setKerning), "setKerning"},
1314 {chaiscript::fun(&Text::getKerning), "getKerning"},
1315 {chaiscript::fun(&Text::to_string), "to_string"},
1316 {chaiscript::fun(&Text::className), "className"},
1317 });
1318  module->add(chaiscript::base_class<Component, Text>());
1319  module->add(chaiscript::base_class<Subject, Text>());
1320  module->add(chaiscript::base_class<Observer, Text>());
1321 return module;
1322 }
1323 
1324 
1325 chaiscript::ModulePtr getButtonModule() {
1326  chaiscript::ModulePtr module = std::make_shared<chaiscript::Module>();
1327 
1328  chaiscript::utility::add_class<Button>(*module, std::string("Button"),
1329  {
1330 chaiscript::constructor<Button(std::shared_ptr<WrappableText> text, VertexData vertex_data, std::shared_ptr<Skin> skin, const unsigned int layer)>(),
1331 },
1332 {
1333 {chaiscript::fun(&Button::create), "Button_create"},
1334 {chaiscript::fun(&Button::onLeftClick), "onLeftClick"},
1335 {chaiscript::fun(&Button::onRightClick), "onRightClick"},
1336 {chaiscript::fun(&Button::onLeftClickRelease), "onLeftClickRelease"},
1337 {chaiscript::fun(&Button::onRightClickRelease), "onRightClickRelease"},
1338 {chaiscript::fun(&Button::onCursorEnter), "onCursorEnter"},
1339 {chaiscript::fun(&Button::onCursorLeave), "onCursorLeave"},
1340 {chaiscript::fun(&Button::onKeyDown), "onKeyDown"},
1341 {chaiscript::fun(&Button::onKeyUp), "onKeyUp"},
1342 {chaiscript::fun(&Button::onKeyRepeat), "onKeyRepeat"},
1343 {chaiscript::fun(&Button::onScroll), "onScroll"},
1344 {chaiscript::fun(&Button::className), "className"},
1345 });
1346  module->add(chaiscript::base_class<TextArea, Button>());
1347  module->add(chaiscript::base_class<Area, Button>());
1348  module->add(chaiscript::base_class<Element, Button>());
1349  module->add(chaiscript::base_class<Renderable, Button>());
1350  module->add(chaiscript::base_class<Component, Button>());
1351  module->add(chaiscript::base_class<Subject, Button>());
1352  module->add(chaiscript::base_class<Observer, Button>());
1353 return module;
1354 }
1355 
1356 void registerModules(std::shared_ptr<chaiscript::ChaiScript> chai) {
1357 chai->add(getEventTypeModule());
1358 chai->add(getLightTypeModule());
1361 chai->add(getEntityModule());
1362 chai->add(getComponentModule());
1363 chai->add(getTransformModule());
1364 chai->add(getSetEntityActiveEventModule());
1365 chai->add(getComponentManagerModule());
1366 chai->add(getSetActiveEventModule());
1367 chai->add(getEngineModule());
1368 chai->add(getInputSystemModule());
1369 chai->add(getMouseScrollEventModule());
1370 chai->add(getMouseButtonUpEventModule());
1371 chai->add(getMouseCursorEventModule());
1372 chai->add(getCharacterTypedEventModule());
1373 chai->add(getKeyUpEventModule());
1374 chai->add(getKeyDownEventModule());
1375 chai->add(getKeyRepeatEventModule());
1376 chai->add(getCursorEnterEventModule());
1377 chai->add(getMouseButtonDownEventModule());
1378 chai->add(getCursorLeaveEventModule());
1379 chai->add(getSubjectModule());
1380 chai->add(getEventModule());
1381 chai->add(getListLayersEventModule());
1382 chai->add(getLoadMapEventModule());
1383 chai->add(getFPSCounterModule());
1384 chai->add(getToggleLayerEventModule());
1385 chai->add(getWindowExitEventModule());
1386 chai->add(getListCharactersEventModule());
1387 chai->add(getListMapsEventModule());
1388 chai->add(getConfigManagerModule());
1389 chai->add(getLoadCharacterEventModule());
1390 chai->add(getDebugParserModule());
1391 chai->add(getToggleLightsEventModule());
1392 chai->add(getToggleFreeCameraEventModule());
1393 chai->add(getScriptObjectModule());
1394 chai->add(getSceneModule());
1395 chai->add(getSceneGeneratorModule());
1396 chai->add(getSpriteMovementModule());
1397 chai->add(getMapModule());
1398 chai->add(getSpriteMoveEventModule());
1399 chai->add(getGraphicsSystemModule());
1400 chai->add(getTextureManagerModule());
1401 chai->add(getSetUniformEventModule());
1402 chai->add(getRenderableModule());
1403 chai->add(getCameraModule());
1404 chai->add(getLightModule());
1405 chai->add(getShaderModule());
1406 chai->add(getBaseTextureModule());
1407 chai->add(getShaderManagerModule());
1408 chai->add(getAreaModule());
1409 chai->add(getChangeTextEventModule());
1410 chai->add(getTextAreaModule());
1411 chai->add(getTextFieldModule());
1412 chai->add(getWrappableTextModule());
1413 chai->add(getSkinModule());
1414 chai->add(getElementModule());
1415 chai->add(getSuspendKeyInputEventModule());
1416 chai->add(getFontModule());
1417 chai->add(getFontGeneratorModule());
1418 chai->add(getQuitButtonModule());
1419 chai->add(getResumeKeyInputEventModule());
1420 chai->add(getTextModule());
1421 chai->add(getButtonModule());
1422 }
1423 }
1424 #endif
chaiscript::ModulePtr getSkinModule()
Definition: generated_registrations.h:1164
void setNumberOfQuantizedBands(const int bands) noexcept
Sets the number of quantized bands.
Definition: light.cpp:65
bool castsQuantizedBands() const noexcept
Function to see if lights cast quantized bands or are smooth.
Definition: light.cpp:61
Definition: event_type.h:19
std::string getName() const noexcept
Gets the name.
Definition: scene.cpp:65
float getIntensity() const noexcept
Gets the intensity.
Definition: light.cpp:41
glm::vec2 getNextPosition() const noexcept
Gets the next position.
Definition: sprite_move_event.h:47
void setColor(const glm::vec3 color) noexcept
Sets the color.
Definition: light.cpp:29
std::vector< std::shared_ptr< Component > > getComponents() const noexcept
Gets all components.
Definition: scene.cpp:31
chaiscript::ModulePtr getKeyRepeatEventModule()
Definition: generated_registrations.h:421
void deactivateScene(const std::string &name)
Deactivates a scene by name.
Definition: engine.cpp:74
unsigned int getId() const noexcept
Gets the identifier.
Definition: component.cpp:55
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: renderable.cpp:255
unsigned char getCharacter() const noexcept
Gets the character.
Definition: character_typed_event.h:38
Class for shader.
Definition: shader.h:17
void setIntensity(const float intensity) noexcept
Sets the intensity.
Definition: light.cpp:37
virtual bool onUpdate(const double delta) override
Called every engine loop.
Definition: text_area.cpp:47
std::vector< std::string > getSceneNames() const noexcept
Gets the scene names.
Definition: engine.cpp:83
chaiscript::ModulePtr getMouseCursorEventModule()
Definition: generated_registrations.h:357
void setLinearAttenuation(const float linear) noexcept
Sets the linear attenuation.
Definition: light.cpp:45
chaiscript::ModulePtr getMapModule()
Definition: generated_registrations.h:788
chaiscript::ModulePtr getButtonModule()
Definition: generated_registrations.h:1325
float getConeAngle() const noexcept
Gets the cone angle.
Definition: light.cpp:77
static std::shared_ptr< CursorLeaveEvent > create()
Factory function.
Definition: cursor_leave_event.h:26
chaiscript::ModulePtr getQuitButtonModule()
Definition: generated_registrations.h:1260
chaiscript::ModulePtr getResumeKeyInputEventModule()
Definition: generated_registrations.h:1284
glm::dvec2 getPosition() const noexcept
Gets the position.
Definition: mouse_scroll_event.h:38
bool getBool(const std::string &key)
Gets a bool from config.
Definition: config_manager.cpp:80
void setSkin(std::shared_ptr< Skin > skin) noexcept
Sets the UI skin.
Definition: element.cpp:56
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: area.cpp:78
static std::shared_ptr< KeyDownEvent > create(const int key)
Factory function.
Definition: key_down_event.h:32
float getCurrentFPS() const noexcept
Gets the current fps.
Definition: fps_counter.cpp:21
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: transform.cpp:206
std::string to_string() const noexcept
Returns a string representation of the object, mostly for use in chaiscript.
Definition: scene.cpp:69
glm::quat getAbsoluteRotation() const noexcept
Gets the absolute rotation.
Definition: transform.cpp:102
virtual void onLeftClickRelease() override
Called when element has left click released over it.
Definition: area.cpp:52
std::shared_ptr< Transform > getParent() const
Gets the parent.
Definition: transform.cpp:197
std::vector< std::string > getUniformNames() const noexcept
Gets the uniform names.
Definition: shader.cpp:74
Class for component manager.
Definition: component_manager.h:14
static std::shared_ptr< LoadCharacterEvent > create(const std::string name)
Factory function.
Definition: load_character_event.h:32
Definition: event_type.h:35
void addTexture(const unsigned int unit, const std::string uniform_name, std::shared_ptr< BaseTexture > texture_object) noexcept
Adds a texture.
Definition: renderable.cpp:63
chaiscript::ModulePtr getFontModule()
Definition: generated_registrations.h:1227
static std::shared_ptr< MouseScrollEvent > create(const glm::dvec2 &offset)
Factory function.
Definition: mouse_scroll_event.h:32
virtual void notify(std::shared_ptr< Event > event)
notify is used to tell observers of an event.
Definition: subject.cpp:13
void addEntity(std::shared_ptr< Entity > entity) noexcept
Adds an entity.
Definition: scene.cpp:39
Definition: event_type.h:29
float getHeight() const noexcept
Gets the height.
Definition: element.cpp:79
void addComponents(std::vector< std::shared_ptr< Component >> components)
Adds components.
Definition: component_manager.cpp:19
void addCharacter(const char text_char, const Character &character)
Adds a character.
Definition: font.cpp:9
void setFont(const std::shared_ptr< Font > font)
Sets the font.
Definition: text.cpp:13
chaiscript::ModulePtr getSetActiveEventModule()
Definition: generated_registrations.h:274
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: text_area.cpp:99
unsigned int count() const noexcept
Gets the number of components.
Definition: component_manager.cpp:45
void setAmbientIntensity(const float intensity) noexcept
Sets the ambient intensity.
Definition: renderable.cpp:95
void setKerning(const float amount) noexcept
Sets the kerning.
Definition: text.cpp:37
static std::shared_ptr< KeyRepeatEvent > create(const int key)
Factory function.
Definition: key_repeat_event.h:32
virtual void onKeyRepeat(const int key) override
Called when a key is repeated while element is in focus.
Definition: text_field.cpp:134
static std::shared_ptr< SpriteMoveEvent > create(glm::vec2 &velocity, const glm::vec2 &next_position)
SpriteMoveEvent factory function.
Definition: sprite_move_event.h:35
Definition: event_type.h:38
virtual void onRightClickRelease() override
Called when element has right click released over it.
Definition: button.cpp:49
Definition: event_type.h:15
static std::shared_ptr< LoadMapEvent > create(const std::string name)
Factory Function.
Definition: load_map_event.h:33
chaiscript::ModulePtr getKeyDownEventModule()
Definition: generated_registrations.h:405
Definition: event_type.h:36
unsigned int getUnsignedInt(const std::string &key)
Gets an unsigned int from config.
Definition: config_manager.cpp:56
std::shared_ptr< Physics::CollisionData > getCollisionData() const noexcept
Gets the collision data.
Definition: scene.cpp:35
bool turnOn() const noexcept
Turn the lights on?
Definition: toggle_lights_event.h:36
chaiscript::ModulePtr getTextureManagerModule()
Definition: generated_registrations.h:843
float getLocalRotationAngle() const noexcept
Gets the local rotation angle.
Definition: transform.cpp:125
void setLineSpacing(float spacing)
Sets the line spacing.
Definition: wrappable_text.cpp:24
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: element.cpp:213
Class for shader uniform.
Definition: uniform.h:10
virtual void onKeyDown(const int key) override
Called when a key is pressed while element is in focus.
Definition: area.cpp:66
unsigned int getTreeSize() const
Gets the tree size.
Definition: transform.cpp:49
glm::vec3 getAbsoluteRotationAxis() const noexcept
Gets the absolute rotation axis.
Definition: transform.cpp:113
int renderablesCount()
Returns the number of renderables currently in the system.
Definition: graphics_system.cpp:139
int addRenderable(std::shared_ptr< Graphics::Renderable > renderable)
Adds a renderable to the renderable pool.
Definition: graphics_system.cpp:120
virtual void setText(const std::string &text)
Sets the text string.
Definition: text.cpp:17
Definition: event_type.h:25
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: light.cpp:104
unsigned int getMaxInfluenceLights() const noexcept
Gets the maximum number of influencing lights.
Definition: graphics_system.cpp:220
void setVerticalAlignment(const VerticalAlignment &alignment)
Sets the vertical alignment.
Definition: wrappable_text.cpp:15
double getDouble(const std::string &key)
Gets a double from config.
Definition: config_manager.cpp:74
chaiscript::ModulePtr getWrappableTextVerticalAlignmentModule()
Definition: generated_registrations.h:142
static std::shared_ptr< ToggleFreeCameraEvent > create()
Factory function.
Definition: toggle_free_camera_event.h:27
glm::vec3 getAbsoluteTranslation() const noexcept
Gets the absolute translation.
Definition: transform.cpp:72
glm::mat4 getProjectionMatrix() const noexcept
Gets the projection matrix.
Definition: camera.cpp:222
void setLightReactive(const bool reactive) noexcept
Sets if the renderable should be light reactive.
Definition: renderable.cpp:79
glm::vec2 getAnchorPoint() const noexcept
Gets the anchor point.
Definition: element.cpp:60
chaiscript::ModulePtr getLightModule()
Definition: generated_registrations.h:934
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: wrappable_text.cpp:180
virtual void addObserver(std::shared_ptr< Observer > observer)
Adds an observer.
Definition: subject.cpp:5
virtual void onCharacterTyped(const unsigned char character)
Definition: text_field.cpp:145
std::shared_ptr< BaseTexture > getTexture()
Gets the texture.
Definition: skin.cpp:18
Light::Type getType() const noexcept
Gets the type.
Definition: light.cpp:89
std::string getText() const noexcept
Gets the text.
Definition: change_text_event.h:39
static std::shared_ptr< Area > create(std::shared_ptr< Skin > skin, glm::vec4 color, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
Area factory function.
Definition: area.cpp:10
float getAmbientIntensity() const noexcept
Gets the ambient intensity.
Definition: renderable.cpp:99
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: sprite_movement.cpp:91
Character getCharacter(const char text_char)
Gets the character.
Definition: font.cpp:13
std::string getPath() const noexcept
Gets the path.
Definition: map.cpp:13
Definition: event_type.h:40
float getWidth() const noexcept
Gets the width.
Definition: element.cpp:75
std::string getText() const noexcept
Gets the text string.
Definition: text.cpp:21
chaiscript::ModulePtr getChangeTextEventModule()
Definition: generated_registrations.h:1053
std::shared_ptr< Shader > getShader()
Gets the shader.
Definition: skin.cpp:22
chaiscript::ModulePtr getCameraModule()
Definition: generated_registrations.h:904
glm::vec3 getConeDirection() const noexcept
Gets the cone direction.
Definition: light.cpp:85
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: button.cpp:79
std::string getName() const noexcept
Gets the name.
Definition: base_texture.cpp:90
chaiscript::ModulePtr getShaderManagerModule()
Definition: generated_registrations.h:1006
int getInt(const std::string &key)
Gets an int from config.
Definition: config_manager.cpp:50
std::string getFontPath() const noexcept
Gets the font path.
Definition: font_generator.cpp:27
bool isPointWithin(glm::vec2 point) noexcept
Determines if point is within element.
Definition: element.cpp:111
glm::vec3 getAbsoluteEulerAngles() const noexcept
Gets the absolute euler angles.
Definition: transform.cpp:117
virtual void onLeftClickRelease() override
Called when element has left click released over it.
Definition: text_area.cpp:73
static std::shared_ptr< CharacterTypedEvent > create(const unsigned char character)
Factory function.
Definition: character_typed_event.h:32
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: camera.cpp:257
float getTextPadding() const noexcept
Gets the text padding.
Definition: element.cpp:91
float getKerning() const noexcept
Gets the kerning.
Definition: text.cpp:41
void resetAverageFPS() noexcept
Resets FPS Average.
Definition: fps_counter.cpp:32
virtual void onKeyRepeat(const int key) override
Called when a key is repeated while element is in focus.
Definition: text_area.cpp:93
void setShader(std::shared_ptr< Shader > shader)
Sets the shader.
Definition: text.cpp:33
chaiscript::ModulePtr getEngineModule()
Definition: generated_registrations.h:290
Definition: event_type.h:33
void activateScene(const std::string &name)
Activates a scene by name.
Definition: engine.cpp:62
virtual void onLeftClick() override
Called when element is left clicked.
Definition: quit_button.cpp:33
virtual void onScroll(const glm::dvec2 position_change) override
Called when the mouse wheel is scrolled while element is in focus.
Definition: area.cpp:75
virtual void onKeyUp(const int key) override
Called when a key is released while element is in focus.
Definition: text_field.cpp:131
virtual void onCursorEnter() override
Called when the mosue cursor goes over the element.
Definition: text_field.cpp:98
chaiscript::ModulePtr getComponentModule()
Definition: generated_registrations.h:173
virtual bool load(const std::string &filename)
Loads the texture.
Definition: base_texture.cpp:24
glm::vec3 getLocalTranslation() const noexcept
Gets the local translation.
Definition: transform.cpp:79
Definition: event_type.h:39
void addScene(std::shared_ptr< Game::Scene > scene) noexcept
Adds a scene to the engine.
Definition: engine.cpp:30
chaiscript::ModulePtr getKeyUpEventModule()
Definition: generated_registrations.h:389
static std::shared_ptr< Button > create(std::shared_ptr< Skin > skin, std::shared_ptr< WrappableText > text, glm::vec4 color, glm::vec4 text_color, float padding, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
Factory function for Button.
Definition: button.cpp:10
glm::vec4 getColor() const noexcept
Gets the color.
Definition: text.cpp:29
chaiscript::ModulePtr getLoadMapEventModule()
Definition: generated_registrations.h:528
bool isLightReactive() const noexcept
Determines if light reactive.
Definition: renderable.cpp:83
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: text_area.cpp:103
Definition: event_type.h:42
void setWindowName(const std::string &name)
Sets the window name.
Definition: graphics_system.cpp:116
chaiscript::ModulePtr getSuspendKeyInputEventModule()
Definition: generated_registrations.h:1212
static std::shared_ptr< TextArea > create(std::shared_ptr< Skin > skin, std::shared_ptr< WrappableText > text, glm::vec4 color, glm::vec4 text_color, float padding, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
TextArea factory function.
Definition: text_area.cpp:12
virtual void onLeftClick() override
Called when element is left clicked.
Definition: text_field.cpp:76
bool getActive() const noexcept
Gets active.
Definition: set_entity_active_event.h:38
chaiscript::ModulePtr getListCharactersEventModule()
Definition: generated_registrations.h:593
void setMaxInfluenceLights(const unsigned int number) noexcept
Sets the maximum number influencing lights.
Definition: graphics_system.cpp:216
chaiscript::ModulePtr getCursorEnterEventModule()
Definition: generated_registrations.h:437
chaiscript::ModulePtr getSceneGeneratorModule()
Definition: generated_registrations.h:749
chaiscript::ModulePtr getShaderModule()
Definition: generated_registrations.h:968
chaiscript::ModulePtr getSceneModule()
Definition: generated_registrations.h:723
float getNear() const noexcept
Gets the near z plane.
Definition: camera.cpp:202
static std::shared_ptr< ToggleLightsEvent > create(const bool on)
Factory function.
Definition: toggle_lights_event.h:30
void rotate(const float angle_x, const float angle_y, const float angle_z) noexcept
Rotates this transform using yaw roll pitch/euler angles.
Definition: transform.cpp:88
Definition: event_type.h:20
void removeChild(std::shared_ptr< Transform > transform)
Removes a child.
Definition: transform.cpp:188
Definition: event_type.h:43
void scale(const float x) noexcept
Scales transform in all 3 directions by x.
Definition: transform.cpp:145
void setWidth(const float width) noexcept
Sets the width.
Definition: camera.cpp:182
virtual void onDestroy() override
Called when the engine is shutting down.
Definition: text_area.cpp:38
virtual void onLeftClick() override
Called when element is left clicked.
Definition: text_area.cpp:67
static std::shared_ptr< WindowExitEvent > create()
Factory Function.
Definition: window_exit_event.h:27
chaiscript::ModulePtr getWindowExitEventModule()
Definition: generated_registrations.h:578
unsigned int getHeight() const noexcept
Gets the height.
Definition: base_texture.cpp:20
Definition: event_type.h:32
Definition: event_type.h:22
void removeComponents(std::vector< std::shared_ptr< Component >> components)
Removes components.
Definition: component_manager.cpp:40
void setTransform(std::shared_ptr< Transform > transform)
Sets the transform.
Definition: component.cpp:39
glm::vec3 getLocalEulerAngles() const noexcept
Gets the local euler angles.
Definition: transform.cpp:133
chaiscript::ModulePtr getSetEntityActiveEventModule()
Definition: generated_registrations.h:240
void removeLight(std::shared_ptr< Light > light)
Removes a light.
Definition: graphics_system.cpp:228
void setAmbientLight(const glm::vec3 color) noexcept
Sets the ambient light.
Definition: renderable.cpp:87
unsigned int getLayerNumber() const noexcept
Gets the layer number.
Definition: toggle_layer_event.h:48
Definition: event_type.h:31
Class for transform.
Definition: transform.h:13
std::shared_ptr< Skin > getSkin() const noexcept
Gets the UI skin.
Definition: element.cpp:52
void clearInfluencingLights()
Clears all influencing lights.
Definition: renderable.cpp:107
Definition: event_type.h:13
Class for shader manager.
Definition: shader_manager.h:15
chaiscript::ModulePtr getSpriteMoveEventModule()
Definition: generated_registrations.h:803
chaiscript::ModulePtr getEventTypeModule()
Definition: generated_registrations.h:79
Class for vertex data.
Definition: vertex_data.h:17
std::shared_ptr< Transform > getTransform() const noexcept
Gets the transform.
Definition: scene.cpp:14
static std::shared_ptr< ListLayersEvent > create()
Factory function.
Definition: list_layers_event.h:26
static std::shared_ptr< SuspendKeyInputEvent > create()
Factory function for SuspendKeyInputEvent.
Definition: suspend_key_input_event.h:26
virtual void onLeftClickRelease() override
Called when element has left click released over it.
Definition: button.cpp:45
bool getActive() const noexcept
Gets active.
Definition: set_active_event.h:38
bool textureExists(const std::string &name) const noexcept
Function to see if texture with name exists.
Definition: texture_manager.cpp:45
glm::vec3 getAmbientLight() const noexcept
Gets the ambient light.
Definition: renderable.cpp:91
void setActive(const bool active) noexcept
Sets the component active or inactive.
Definition: component.cpp:47
int getScreenPaddingInTiles() const noexcept
Gets the screen padding in tiles.
Definition: camera.cpp:178
virtual void onLeftClick() override
Called when element is left clicked.
Definition: area.cpp:44
bool isActive() const noexcept
Determines if active.
Definition: entity.cpp:48
Definition: event_type.h:17
chaiscript::ModulePtr getMouseScrollEventModule()
Definition: generated_registrations.h:325
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: sprite_movement.cpp:95
Definition: event_type.h:26
float getWidth() const noexcept
Gets the width.
Definition: camera.cpp:186
chaiscript::ModulePtr getLoadCharacterEventModule()
Definition: generated_registrations.h:643
chaiscript::ModulePtr getDebugParserModule()
Definition: generated_registrations.h:659
virtual void onKeyUp(const int key) override
Called when a key is released while element is in focus.
Definition: area.cpp:69
void setNear(const float near) noexcept
Sets the near z plane.
Definition: camera.cpp:198
bool loadTexture(const std::string &path)
Loads a texture.
Definition: texture_manager.cpp:21
virtual void setText(const std::string &text) override
Sets the text string.
Definition: wrappable_text.cpp:54
virtual void onRightClickRelease() override
Called when element has right click released over it.
Definition: text_area.cpp:77
chaiscript::ModulePtr getListMapsEventModule()
Definition: generated_registrations.h:608
glm::vec3 getAbsoluteScale() const noexcept
Gets the absolute scale.
Definition: transform.cpp:157
Definition: event_type.h:27
Definition: event_type.h:24
A container holding a base transform, a vector of components, and a vector of entities.
Definition: scene.h:16
std::shared_ptr< Transform > getTransform() const noexcept
Gets the transform.
Definition: component.cpp:43
glm::vec2 getVelocity() const noexcept
Gets the velocity.
Definition: sprite_move_event.h:41
Definition: light.h:21
void setColor(const glm::vec4 color) noexcept
Sets the color.
Definition: element.cpp:103
std::string getStrippedMapName(const std::string path)
Strips path specification from map name.
Definition: scene_generator.cpp:668
static std::shared_ptr< QuitButton > create(std::shared_ptr< Skin > skin, std::shared_ptr< WrappableText > text, glm::vec4 color, glm::vec4 text_color, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
Quit Button factory function.
Definition: quit_button.cpp:12
void setAnchorPoint(const glm::vec2 anchor_point)
Sets the anchor point.
Definition: element.cpp:64
std::map< unsigned int, std::shared_ptr< BaseTexture > > getTextures() const noexcept
Gets the textures.
Definition: renderable.cpp:75
Definition: wrappable_text.h:25
void addChild(std::shared_ptr< Transform > transform)
Adds a child.
Definition: transform.cpp:182
void setText(std::shared_ptr< WrappableText > text)
Sets the text.
Definition: text_area.cpp:30
virtual void onCursorLeave() override
Called when the mouse cursor goes off the element.
Definition: text_area.cpp:84
void setConeDirection(const glm::vec3 direction) noexcept
Sets the cone direction.
Definition: light.cpp:81
float getLinearAttenuation() const noexcept
Gets the linear attenuation.
Definition: light.cpp:49
std::shared_ptr< Entity > getDynamicEntityByName(const std::string &name)
Gets a dynamic entity by name.
Definition: scene_generator.cpp:310
chaiscript::ModulePtr getWrappableTextModule()
Definition: generated_registrations.h:1140
Definition: event_type.h:16
void addCollisionData(std::shared_ptr< Physics::CollisionData > collision_data)
Adds a collision data.
Definition: sprite_movement.cpp:19
void addComponents(std::vector< std::shared_ptr< Component >> components)
Adds components.
Definition: scene.cpp:27
virtual void onRightClick() override
Called when element is right clicked.
Definition: text_area.cpp:70
virtual void bind(const unsigned int texture_unit)
Binds texture to opengl on the texture unit.
Definition: base_texture.cpp:69
unsigned int getWidth() const noexcept
Gets the width.
Definition: base_texture.cpp:16
virtual void onRightClickRelease() override
Called when element has right click released over it.
Definition: text_field.cpp:94
float getAbsoluteRotationAngle() const noexcept
Gets the absolute rotation angle.
Definition: transform.cpp:109
void setQuadraticAttenuation(const float quadratic) noexcept
Sets the quadratic attenuation.
Definition: light.cpp:53
chaiscript::ModulePtr getLightTypeModule()
Definition: generated_registrations.h:119
virtual void onRightClick() override
Called when element is right clicked.
Definition: area.cpp:48
Definition: event_type.h:30
float getQuadraticAttenuation() const noexcept
Gets the quadratic attenuation.
Definition: light.cpp:57
std::vector< std::string > getActiveSceneNames() const noexcept
Gets the active scene names.
Definition: engine.cpp:92
virtual void onCursorEnter() override
Called when the mosue cursor goes over the element.
Definition: text_area.cpp:81
static std::shared_ptr< MouseButtonDownEvent > create(const int button)
Factory function.
Definition: mouse_button_down_event.h:32
chaiscript::ModulePtr getInputSystemModule()
Definition: generated_registrations.h:310
virtual void onKeyRepeat(const int key) override
Called when a key is repeated while element is in focus.
Definition: button.cpp:71
std::string getClassName() const noexcept
Definition: script_object.cpp:20
void setFreeCameraSpeed(const float speed) noexcept
Sets the free camera speed when in free camera mode.
Definition: camera.cpp:214
static std::shared_ptr< MouseButtonUpEvent > create(const int button)
Factory function.
Definition: mouse_button_up_event.h:32
static std::shared_ptr< KeyUpEvent > create(const int key)
Factory function.
Definition: key_up_event.h:32
chaiscript::ModulePtr getRenderableModule()
Definition: generated_registrations.h:874
void setShader(std::shared_ptr< Shader > shader_object) noexcept
Sets the shader.
Definition: renderable.cpp:55
Definition: event_type.h:41
std::vector< std::string > getDynamicEntityNames() const noexcept
Gets all dynamic entity names.
Definition: scene_generator.cpp:319
virtual void onCursorLeave() override
Called when the mouse cursor goes off the element.
Definition: button.cpp:58
bool turnOn() const noexcept
Turn the layer on?
Definition: toggle_layer_event.h:42
chaiscript::ModulePtr getFontGeneratorModule()
Definition: generated_registrations.h:1244
int getKey() const noexcept
Gets the key.
Definition: key_repeat_event.h:38
virtual void onScroll(const glm::dvec2 position_change) override
Called when the mouse wheel is scrolled while element is in focus.
Definition: text_field.cpp:142
float getAverageFPS() const noexcept
Gets the average fps.
Definition: fps_counter.cpp:25
virtual void notifyNow(std::shared_ptr< Event > event)
notifyNow is used to tell observers of an event as an interrupt.
Definition: subject.cpp:19
void setName(const std::string name) noexcept
Sets the name.
Definition: scene.cpp:61
virtual void onKeyDown(const int key) override
Called when a key is pressed while element is in focus.
Definition: text_field.cpp:106
void setHeight(const float height) noexcept
Sets the height.
Definition: element.cpp:87
virtual void onKeyUp(const int key) override
Called when a key is released while element is in focus.
Definition: button.cpp:67
chaiscript::ModulePtr getListLayersEventModule()
Definition: generated_registrations.h:513
std::shared_ptr< Transform > getTransform() const noexcept
Gets the transform.
Definition: entity.cpp:37
Definition: wrappable_text.h:25
Definition: wrappable_text.h:25
void setMoveQuantization(const float number_of_tiles)
Sets the move quantization.
Definition: sprite_movement.cpp:83
chaiscript::ModulePtr getBaseTextureModule()
Definition: generated_registrations.h:985
void setName(const std::string name) noexcept
Sets the name.
Definition: base_texture.cpp:86
bool loadShader(const std::string &name, const bool geometry_shader=false)
Loads a shader.
Definition: shader_manager.cpp:28
void timeToExit() noexcept
This is to signal the engine that it is time to shut down.
Definition: engine.cpp:26
void setUniform(const Uniform &uniform)
Sets the uniform.
Definition: shader.cpp:411
glm::quat getLocalRotation() const noexcept
Gets the local rotation.
Definition: transform.cpp:121
Definition: wrappable_text.h:20
std::list< std::shared_ptr< Component > > & getComponents() noexcept
Gets the components.
Definition: entity.cpp:33
glm::mat4 getLocalTransformationMatrix() const noexcept
Gets the local transformation matrix.
Definition: transform.cpp:175
float getFloat(const std::string &key)
Gets a float from config.
Definition: config_manager.cpp:68
int windowWidth()
Getter for the window height.
Definition: graphics_system.cpp:90
std::shared_ptr< WrappableText > getText() const noexcept
Gets the text.
Definition: text_area.cpp:34
std::map< char, Character > getCharacters() const
Gets the characters.
Definition: font.cpp:17
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: wrappable_text.cpp:184
virtual void onKeyDown(const int key) override
Called when a key is pressed while element is in focus.
Definition: button.cpp:63
void setConeAngle(const float angle) noexcept
Sets the cone angle.
Definition: light.cpp:73
virtual void onRightClick() override
Called when element is right clicked.
Definition: text_field.cpp:87
void setName(const std::string &name)
Sets the name.
Definition: shader.cpp:493
virtual void onRightClickRelease() override
Called when element has right click released over it.
Definition: area.cpp:56
chaiscript::ModulePtr getCursorLeaveEventModule()
Definition: generated_registrations.h:468
virtual void onCursorLeave() override
Called when the mouse cursor goes off the element.
Definition: text_field.cpp:102
glm::vec3 getColor() const noexcept
Gets the color.
Definition: light.cpp:33
std::shared_ptr< Game::Scene > findSceneByName(const std::string &name) noexcept
Finds a scene by name.
Definition: engine.cpp:34
void setTexture(const std::shared_ptr< BaseTexture > &texture)
Sets the texture.
Definition: skin.cpp:10
chaiscript::ModulePtr getAreaModule()
Definition: generated_registrations.h:1022
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: shader.cpp:500
void setHeight(const float height) noexcept
Sets the height.
Definition: camera.cpp:190
std::vector< std::shared_ptr< Entity > > getEntities() const noexcept
Gets all entities.
Definition: scene.cpp:57
virtual void onCursorLeave() override
Called when the mouse cursor goes off the element.
Definition: area.cpp:63
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: element.cpp:217
chaiscript::ModulePtr getTextAreaModule()
Definition: generated_registrations.h:1069
chaiscript::ModulePtr getCharacterTypedEventModule()
Definition: generated_registrations.h:373
float getMaxFPS() const noexcept
Gets the maximum fps.
Definition: fps_counter.cpp:17
chaiscript::ModulePtr getScriptObjectModule()
Definition: generated_registrations.h:707
Class wrapper for Tmx::Map.
Definition: map.h:11
void removeComponent(std::shared_ptr< Component > component)
Removes a component.
Definition: component_manager.cpp:31
int getKey() const noexcept
Gets the key.
Definition: key_down_event.h:38
chaiscript::ModulePtr getTextFieldModule()
Definition: generated_registrations.h:1106
std::string windowName() const noexcept
Getter for the window name.
Definition: graphics_system.cpp:110
float influenceOnComponent(const Component &component) const
Calculates a light's influence on a given component.
Definition: light.cpp:93
std::vector< std::string > getStringVector(const std::string &key)
Gets a string vector from config.
Definition: config_manager.cpp:22
void removeTexture(const unsigned int unit)
Removes a texture.
Definition: renderable.cpp:71
std::string getString(const std::string &key)
Gets a string from config.
Definition: config_manager.cpp:62
virtual void onKeyRepeat(const int key) override
Called when a key is repeated while element is in focus.
Definition: area.cpp:72
int getNumberOfQuantizedBands() const noexcept
Gets the number of quantized bands.
Definition: light.cpp:69
void setSize(float width, float height)
Sets the size.
Definition: wrappable_text.cpp:19
glm::vec4 getColor() const noexcept
Gets the color.
Definition: element.cpp:99
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: text.cpp:45
static std::shared_ptr< TextField > create(std::shared_ptr< Skin > skin, std::shared_ptr< WrappableText > default_text, std::shared_ptr< WrappableText > typed_text, glm::vec4 background_color, float padding, float screen_width, float screen_height, float x_pos, float y_pos, float width, float height, const unsigned int layer)
TextField factory function.
Definition: text_field.cpp:19
void setScreenPaddingInTiles(const int padding) noexcept
Sets the screen padding in tiles.
Definition: camera.cpp:174
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: quit_button.cpp:37
virtual void onStart() override
Called when the engine starts and when a new scene is loaded.
Definition: text_area.cpp:42
std::shared_ptr< Shader > getShader() const noexcept
Gets the shader.
Definition: renderable.cpp:59
unsigned int getSize() const noexcept
Gets the size.
Definition: font.cpp:21
Definition: light.h:21
std::string to_string() const noexcept
Returns a string representation of the object.
Definition: base_texture.cpp:94
int getButton() const noexcept
Gets the button.
Definition: mouse_button_down_event.h:38
static std::shared_ptr< MouseCursorEvent > create(const glm::dvec2 &pos)
Factory function.
Definition: mouse_cursor_event.h:32
chaiscript::ModulePtr getSubjectModule()
Definition: generated_registrations.h:483
chaiscript::ModulePtr getWrappableTextHorizontalAlignmentModule()
Definition: generated_registrations.h:130
glm::vec3 getLocalScale() const noexcept
Gets the local scale.
Definition: transform.cpp:164
bool isActive() const noexcept
Determines if active.
Definition: component.cpp:51
std::vector< unsigned int > getUnsignedIntVector(const std::string &key)
Gets an unsigned int vector from config.
Definition: config_manager.cpp:35
Definition: event_type.h:18
Definition: wrappable_text.h:20
chaiscript::ModulePtr getToggleLightsEventModule()
Definition: generated_registrations.h:676
chaiscript::ModulePtr getEventModule()
Definition: generated_registrations.h:499
std::shared_ptr< BaseTexture > getTexture(const std::string &name) const
Gets the texture.
Definition: texture_manager.cpp:38
chaiscript::ModulePtr getConfigManagerModule()
Definition: generated_registrations.h:623
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: scene.cpp:18
void handleEvents()
Handles queued debug parser events.
Definition: debug_parser.cpp:31
virtual bool isLoaded() const noexcept
Determines if loaded.
Definition: base_texture.cpp:82
EventType getEventType() const
Gets the event type.
Definition: event.h:27
static std::shared_ptr< SetEntityActiveEvent > create(const bool active)
Factory function.
Definition: set_entity_active_event.h:32
Definition: event_type.h:28
virtual void onCursorEnter() override
Called when the mosue cursor goes over the element.
Definition: button.cpp:53
Definition: event_type.h:14
void setShader(const std::shared_ptr< Shader > &shader)
Sets the shader.
Definition: skin.cpp:14
void addLight(std::shared_ptr< Light > light) noexcept
Adds a light.
Definition: graphics_system.cpp:224
Definition: event_type.h:21
void addEntities(std::vector< std::shared_ptr< Entity >> entities) noexcept
Adds entities.
Definition: scene.cpp:47
virtual void onKeyUp(const int key) override
Called when a key is released while element is in focus.
Definition: text_area.cpp:90
float getOpenGLSize() const noexcept
Gets the open gl size.
Definition: font.cpp:25
virtual void onKeyDown(const int key) override
Called when a key is pressed while element is in focus.
Definition: text_area.cpp:87
void setWidth(const float width) noexcept
Sets the width.
Definition: element.cpp:83
chaiscript::ModulePtr getEntityModule()
Definition: generated_registrations.h:154
virtual std::string to_string() const noexcept
Returns a string representation of the object.
Definition: component.cpp:63
static std::shared_ptr< CursorEnterEvent > create()
Factory function.
Definition: cursor_enter_event.h:27
glm::mat4 getAbsoluteTransformationMatrix() const noexcept
Gets the absolute transformation matrix.
Definition: transform.cpp:168
chaiscript::ModulePtr getMouseButtonDownEventModule()
Definition: generated_registrations.h:452
Uniform getUniform() const noexcept
Gets the uniform.
Definition: set_uniform_event.h:39
std::shared_ptr< Scene > createSceneFromMap(const unsigned int patch_width_tiles, const unsigned int patch_height_tiles, const Map &map)
Creates a scene from a map.
Definition: scene_generator.cpp:276
glm::vec3 getLocalRotationAxis() const noexcept
Gets the local rotation axis.
Definition: transform.cpp:129
virtual void onLeftClick() override
Called when element is left clicked.
Definition: button.cpp:36
Definition: event_type.h:34
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: component_manager.cpp:10
chaiscript::ModulePtr getSpriteMovementModule()
Definition: generated_registrations.h:767
void addInfluencingLight(std::shared_ptr< Light > light) noexcept
Adds an influencing light.
Definition: renderable.cpp:103
int windowHeight()
Getter for the window width.
Definition: graphics_system.cpp:100
void addComponent(std::shared_ptr< Component > component)
Adds a component.
Definition: entity.cpp:9
float getHeight() const noexcept
Gets the height.
Definition: camera.cpp:194
glm::dvec2 getPosition() const noexcept
Gets the position.
Definition: mouse_cursor_event.h:38
static std::shared_ptr< SetActiveEvent > create(const bool active)
Factory function.
Definition: set_active_event.h:32
static std::shared_ptr< ResumeKeyInputEvent > create()
Resume Key Input Event factory function.
Definition: resume_key_input_event.h:26
std::string getName() const noexcept
Gets the name.
Definition: shader.cpp:497
std::map< std::shared_ptr< Game::Scene >, bool > getScenes() const noexcept
Gets the scenes.
Definition: engine.cpp:57
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: renderable.cpp:259
Definition: event_type.h:37
virtual void removeObserver(std::shared_ptr< Observer > observer)
Removes an observer.
Definition: subject.cpp:9
bool isComponentWithin(const Component &component) const
Determines if component within.
Definition: camera.cpp:230
chaiscript::ModulePtr getTransformModule()
Definition: generated_registrations.h:194
int getKey() const noexcept
Definition: key_up_event.h:33
void loadFont(const std::string &ttf_file, const unsigned int size, const std::string &name="")
Loads a font.
Definition: font_generator.cpp:31
void dummy()
Definition: input_system.h:65
chaiscript::ModulePtr getSetUniformEventModule()
Definition: generated_registrations.h:858
chaiscript::ModulePtr getElementModule()
Definition: generated_registrations.h:1181
float getFreeCameraSpeed() const noexcept
Gets the free camera speed when in free camera mode.
Definition: camera.cpp:218
chaiscript::ModulePtr getTextModule()
Definition: generated_registrations.h:1299
static std::shared_ptr< ToggleLayerEvent > create(const unsigned int layer_number, const bool on)
Factory function.
Definition: toggle_layer_event.h:36
std::string getName() const noexcept
Gets the name.
Definition: load_map_event.h:39
std::shared_ptr< Shader > getShader(const std::string &name) const
Gets the shader.
Definition: shader_manager.cpp:145
void setUniformForAllPrograms(const Uniform &u)
Sets the uniform for all programs.
Definition: shader_manager.cpp:152
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: area.cpp:82
virtual void onLeftClickRelease() override
Called when element has left click released over it.
Definition: text_field.cpp:90
chaiscript::ModulePtr getToggleFreeCameraEventModule()
Definition: generated_registrations.h:692
chaiscript::ModulePtr getGraphicsSystemModule()
Definition: generated_registrations.h:820
void translate(const float x, const float y) noexcept
Adds 2d translation to Transform.
Definition: transform.cpp:64
virtual void onScroll(const glm::dvec2 position_change) override
Called when the mouse wheel is scrolled while element is in focus.
Definition: button.cpp:75
Definition: event_type.h:23
void setFar(const float far) noexcept
Sets the far z plane.
Definition: camera.cpp:206
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: text.cpp:119
virtual std::string className() const noexceptoverride
Returns a string representing the class name.
Definition: text_field.cpp:153
static std::shared_ptr< ChangeTextEvent > create(const std::string &text)
ChangeTextEvent factory function.
Definition: change_text_event.h:33
chaiscript::ModulePtr getToggleLayerEventModule()
Definition: generated_registrations.h:561
float getFar() const noexcept
Gets the far z plane.
Definition: camera.cpp:210
void setActive(const bool active) noexcept
Sets entity active or inactive.
Definition: entity.cpp:41
virtual void onCursorEnter() override
Called when the mosue cursor goes over the element.
Definition: area.cpp:60
chaiscript::ModulePtr getComponentManagerModule()
Definition: generated_registrations.h:256
Definition: wrappable_text.h:20
std::list< std::shared_ptr< Transform > > getChildren() const
Gets the children.
Definition: transform.cpp:193
std::shared_ptr< Font > getFont(const std::string &name) const noexcept
Gets the font.
Definition: font_generator.cpp:132
int getButton() const noexcept
Gets the button.
Definition: mouse_button_up_event.h:38
void registerModules(std::shared_ptr< chaiscript::ChaiScript > chai)
Definition: generated_registrations.h:1356
void setColor(const glm::vec4 &color)
Sets the color.
Definition: text.cpp:25
void setHorizontalAlignment(const HorizontalAlignment &alignment)
Sets the horizontal alignment.
Definition: wrappable_text.cpp:11
bool removeRenderable(const int id)
Removes a renderable from the renderable pool.
Definition: graphics_system.cpp:127
virtual void onScroll(const glm::dvec2 position_change) override
Called when the mouse wheel is scrolled while element is in focus.
Definition: text_area.cpp:96
void setClassName(const std::string &name)
Sets the class name on the scripting object.
Definition: script_object.cpp:16
void removeComponent(std::shared_ptr< Component > component)
Removes a component.
Definition: entity.cpp:23
std::string getName() const noexcept
Gets the name.
Definition: load_character_event.h:38
static std::shared_ptr< SetUniformEvent > create(const Uniform &uniform)
Factory function for SetUniformEvent.
Definition: set_uniform_event.h:33
static std::shared_ptr< ListCharactersEvent > create()
Factory function.
Definition: list_characters_event.h:26
chaiscript::ModulePtr getFPSCounterModule()
Definition: generated_registrations.h:544
static std::shared_ptr< ListMapsEvent > create()
Factory function.
Definition: list_maps_event.h:26
chaiscript::ModulePtr getMouseButtonUpEventModule()
Definition: generated_registrations.h:341
virtual std::string className() const noexcept
Returns a string representing the class name.
Definition: component.cpp:69
void parseCommand(const std::string &command)
Parses a debug command.
Definition: debug_parser.cpp:46
void setFontPath(const std::string &font_path) noexcept
Sets the font path.
Definition: font_generator.cpp:23
void setTransform(std::shared_ptr< Transform > transform) noexcept
Sets the transform.
Definition: scene.cpp:10
void setTextPadding(const float text_padding) noexcept
Sets the text padding.
Definition: element.cpp:95
void setMovingSpeed(const float speed)
Sets the moving speed.
Definition: sprite_movement.cpp:79
virtual void onRightClick() override
Called when element is right clicked.
Definition: button.cpp:41
virtual std::string to_string() const noexceptoverride
Returns a string representation of the object.
Definition: text_field.cpp:157