Created
March 7, 2013 11:45
-
-
Save marionette-of-u/5107496 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "draw_wisp_ring.hpp" | |
| #include "draw_radar.hpp" | |
| #include "draw_set_screen_back.hpp" | |
| #include "mainlist.hpp" | |
| #include "drawlist.hpp" | |
| namespace st0{ | |
| #define ST0_WRITE_T_BEGIN_END(type) \ | |
| template<> linklist_game_obj *mainlist_t_begin<type>(){ return mainlist.t_begin<type>().get_linklist(); } \ | |
| template<> linklist_game_obj *mainlist_t_end<type>(){ return mainlist.t_end<type>().get_linklist(); } \ | |
| template<> linklist_game_obj *mainlist_create_task<type>(){ return mainlist.create_task<type>().get_linklist(); } \ | |
| template<> std::size_t dynamic_type_id<type>(){ return mainlist.dynamic_type_id<type>(); } | |
| //------------------------------ | |
| //シーンマネージャーリスト | |
| //------------------------------ | |
| typedef mt::list< | |
| mt::task_interface<scene_obj>, | |
| mt::task<stage_0, 1> | |
| > scene_manager_list; | |
| //------------------------------ | |
| //物体リスト | |
| //------------------------------ | |
| typedef mt::list< | |
| mt::task_interface<mass_obj>, | |
| mt::list< | |
| mt::task_interface<movable_obj>, | |
| mt::task<player_ship, 1>, | |
| mt::task<wisp, 64>, | |
| mt::task<player_bullet, 1024>, | |
| mt::list< | |
| mt::task_interface<enemy_obj>, | |
| mt::task<monolith, 16>, | |
| mt::task<binary_star_origin, 16>, | |
| mt::task<binary_star, 32> | |
| > | |
| > | |
| > mass_obj_list; | |
| //------------------------------ | |
| //エフェクトリスト | |
| //------------------------------ | |
| typedef mt::list< | |
| mt::task_interface<effect_obj>, | |
| mt::task<fade_in_player_ship, 1> | |
| > effect_list; | |
| //------------------------------ | |
| //タスクメインリスト | |
| //------------------------------ | |
| typedef mt::list< | |
| mt::task_interface<game_obj>, | |
| mt::task<mouse_cursor, 1>, | |
| mt::task<collision_decision, 1>, | |
| scene_manager_list, | |
| mass_obj_list, | |
| effect_list | |
| > mainlist_type; | |
| mainlist_type mainlist; | |
| //templateの羅列 | |
| ST0_WRITE_T_BEGIN_END(scene_obj); | |
| ST0_WRITE_T_BEGIN_END(stage_0); | |
| ST0_WRITE_T_BEGIN_END(mass_obj); | |
| ST0_WRITE_T_BEGIN_END(movable_obj); | |
| ST0_WRITE_T_BEGIN_END(player_ship); | |
| ST0_WRITE_T_BEGIN_END(wisp); | |
| ST0_WRITE_T_BEGIN_END(player_bullet); | |
| ST0_WRITE_T_BEGIN_END(enemy_obj); | |
| ST0_WRITE_T_BEGIN_END(monolith); | |
| ST0_WRITE_T_BEGIN_END(binary_star_origin); | |
| ST0_WRITE_T_BEGIN_END(binary_star); | |
| ST0_WRITE_T_BEGIN_END(effect_obj); | |
| ST0_WRITE_T_BEGIN_END(fade_in_player_ship); | |
| ST0_WRITE_T_BEGIN_END(game_obj); | |
| ST0_WRITE_T_BEGIN_END(mouse_cursor); | |
| ST0_WRITE_T_BEGIN_END(collision_decision); | |
| linklist_game_obj *mainlist_begin(){ return mainlist.begin().get_linklist(); } | |
| linklist_game_obj *mainlist_end(){ return mainlist.end().get_linklist(); } | |
| linklist_game_obj *mainlist_delete_task(linklist_game_obj *t){ return mainlist.delete_task(t); } | |
| //------------------------------ | |
| //描画タスクのメインリスト | |
| //------------------------------ | |
| typedef mt::list< | |
| mt::task_interface<draw_obj>, | |
| mt::task<draw_set_screen_back, 1>, | |
| mt::task<draw_background_frame, 1>, | |
| mt::task<draw_fieldframe, 1>, | |
| mt::task<draw_fade_in_player_ship, 1>, | |
| mt::task<draw_binary_star, 1>, | |
| mt::task<draw_monolith, 1>, | |
| mt::task<draw_player_bullet, 1>, | |
| mt::task<draw_wisp, 1>, | |
| mt::task<draw_player_ship, 1>, | |
| mt::task<draw_wisp_ring, 1>, | |
| mt::task<draw_radar, 1>, | |
| mt::task<draw_flip, 1> | |
| > drawlist_type; | |
| drawlist_type drawlist(mt::reserved_all); | |
| linklist_draw_obj *drawlist_begin(){ return drawlist.begin().get_linklist(); } | |
| linklist_draw_obj *drawlist_end(){ return drawlist.end().get_linklist(); } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment