DSC Engine
Loading...
Searching...
No Matches
generic_scene_256.hpp
1#pragma once
2
4#include "DSCEngine/resources/asset_data.hpp"
5#include "DSCEngine/sprites/sprite.hpp"
6
7
8namespace DSC
9{
21 class GenericScene256 : public Scene
22 {
23 private:
24 struct __privates__;
25 __privates__* privates;
26
27 void set_banks();
28 void solve_map_requirements();
29
30 void solve_map_requirements_main();
31 void solve_map_requirements_sub();
32
33 void solve_video_mode();
34
35 void load_assets();
36
37 static int validate_bg_size(int w, int h, int color_depth, bool is_bitmap);
38 public:
40 virtual void init() override;
41
42 __attribute__((noinline))
43 virtual void run() override;
44
45 virtual void frame() override;
46
47
48 void require_tiledmap_4bpp(int id, int px_width, int px_height, int number_of_tiles);
49 void require_tiledmap_8bpp(int id, int px_width, int px_height, int number_of_tiles);
50
51 void require_tiledmap(int id, int px_width, int px_height, const AssetData* tileset);
52
53 void require_bitmap(int id, int px_width, int px_height);
54 void require_bitmap(int id, const DSC::AssetData* bitmap);
55
56 void require_bitmap_16bpp(int id, int px_width, int px_height);
57 void require_bitmap_16bpp(int id, const DSC::AssetData* bitmap);
58
59
60 Sprite* create_sprite(Sprite* sprite);
61
62 void begin_sprites_init();
63 void end_sprites_init();
64
66
67 static constexpr int MAIN_BG0 = 0;
68 static constexpr int MAIN_BG1 = 1;
69 static constexpr int MAIN_BG2 = 2;
70 static constexpr int MAIN_BG3 = 3;
71
72 static constexpr int SUB_BG0 = 4;
73 static constexpr int SUB_BG1 = 5;
74 static constexpr int SUB_BG2 = 6;
75 static constexpr int SUB_BG3 = 7;
76 };
77}
Definition: asset_data.hpp:8
general-purpose scene with 256KB BG-Main VRAM
Definition: generic_scene_256.hpp:22
virtual void frame() override
The Scene main loop logic. This method is executed at VBlank.
virtual void init() override
Contains Scene initialization routines (setting variables, loading VRAM etc.)
An active game execution part
Definition: scene.hpp:17
Definition: sprite.hpp:13
Scene logic and transitions.