2017-09-20 08:42:57 -07:00
|
|
|
// Copyright © 2017 Project Golan, all rights reserved.
|
2017-09-23 12:43:54 -07:00
|
|
|
#include "g_stage.h"
|
2017-09-27 19:26:32 -07:00
|
|
|
#include "g_object.h"
|
|
|
|
#include "g_player.h"
|
2017-09-23 12:43:54 -07:00
|
|
|
#include "r_draw.h"
|
2017-09-20 08:42:57 -07:00
|
|
|
|
|
|
|
#include <Doominati.h>
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2017-09-21 10:53:20 -07:00
|
|
|
// Extern Functions ----------------------------------------------------------|
|
2017-09-20 19:36:30 -07:00
|
|
|
|
2017-09-20 08:42:57 -07:00
|
|
|
//
|
2017-09-23 17:21:07 -07:00
|
|
|
// GInit
|
2017-09-20 08:42:57 -07:00
|
|
|
//
|
2017-09-26 14:00:23 -07:00
|
|
|
void GInit(char const *resdecl)
|
2017-09-20 08:42:57 -07:00
|
|
|
{
|
2017-09-23 12:43:54 -07:00
|
|
|
extern void R_ResDec_Load(char const *fname);
|
|
|
|
|
2017-09-20 08:42:57 -07:00
|
|
|
printf("\n=====================\n"
|
|
|
|
u8"オミ:影響の目 1.0\n"
|
|
|
|
u8"Copyright © 2017 Project Golan, all rights reserved.\n\n");
|
|
|
|
|
2017-09-21 10:53:20 -07:00
|
|
|
DGE_Renderer_SetVirtualRes(960, 720);
|
2017-09-20 08:42:57 -07:00
|
|
|
|
2017-09-21 18:55:03 -07:00
|
|
|
printf("Loading resource declarations...\n");
|
2017-09-26 14:00:23 -07:00
|
|
|
R_ResDec_Load(resdecl);
|
2017-09-21 18:55:03 -07:00
|
|
|
|
2017-09-20 08:42:57 -07:00
|
|
|
printf("Loading object function table...\n");
|
|
|
|
G_ObjDef_Init();
|
2017-09-28 10:52:02 -07:00
|
|
|
G_ObjDef_AddType("Player", subtype_player, G_Player_propC, (DGE_CallbackType)G_Player_Think);
|
2017-09-20 08:42:57 -07:00
|
|
|
|
|
|
|
printf("Loading object definitions...\n");
|
|
|
|
G_ObjDef_Load("objdefs.dod");
|
|
|
|
|
2017-09-20 19:36:30 -07:00
|
|
|
printf("Registering callbacks...\n");
|
2017-09-21 18:55:22 -07:00
|
|
|
DGE_Callback_Register(DGE_CB_Draw, (DGE_CallbackType)R_Draw);
|
2017-09-21 10:53:20 -07:00
|
|
|
DGE_Callback_Register(DGE_CB_DrawPost, (DGE_CallbackType)R_DrawPost);
|
2017-09-20 08:42:57 -07:00
|
|
|
|
2017-09-20 19:36:30 -07:00
|
|
|
printf("Ready.\n");
|
2017-09-23 17:21:07 -07:00
|
|
|
}
|
2017-09-21 10:53:20 -07:00
|
|
|
|
2017-09-23 17:21:07 -07:00
|
|
|
//
|
|
|
|
// main
|
|
|
|
//
|
|
|
|
[[__extern("asm")]] DGE_Callback
|
|
|
|
void main(void)
|
|
|
|
{
|
2017-09-26 14:00:23 -07:00
|
|
|
GInit("resdecl.rd");
|
2017-09-28 10:51:14 -07:00
|
|
|
G_Stage_LoadBase();
|
|
|
|
G_Stage_Run(1);
|
2017-09-20 08:42:57 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// EOF
|