X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Fvgmtest.c;h=b2b1b0403c6521fdfb5f2ba136d2ab9e232d0466;hb=6972c5fdbdc4480581d3c0ab65d9ef8c3a089847;hp=f1893ca69332bbe7cb740e4faf9640ce4f37bb36;hpb=e10c363a3823520d71a8279f618f04d45c2615df;p=16.git diff --git a/src/vgmtest.c b/src/vgmtest.c index f1893ca6..b2b1b040 100755 --- a/src/vgmtest.c +++ b/src/vgmtest.c @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669 + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -28,18 +28,18 @@ //#include "src/lib/doslib/adlib.h" #include "src/lib/16_in.h" -void OPL2_Write(byte reg, byte data); -byte OPL2_ReadStatus(void); +void OPL2_Write(UINT8 reg, UINT8 data); +UINT8 OPL2_ReadStatus(void); -void OPL2_Write(byte reg, byte data) +void OPL2_Write(UINT8 reg, UINT8 data) { //ym3812_w(0, 0, reg); //ym3812_w(0, 1, data); - opl2out(reg, data); + opl2out((word)reg, (word)data); return; } -byte OPL2_ReadStatus(void) +UINT8 OPL2_ReadStatus(void) { return(inp(ADLIB_FM_ADDRESS)); //return ym3812_r(0, 0); @@ -48,28 +48,25 @@ byte OPL2_ReadStatus(void) void main(int argc, char *argv[]) { - global_game_variables_t gvar; +// static global_game_variables_t gvar; VGM_FILE pee[9]; - player_t player[MaxPlayers]; char *bakapee; bakapee = malloc(64); if(argv[1]) bakapee = argv[1]; - else bakapee = "data/0.vgm"; + else bakapee = "data/adlib.vgm"; printf("%x\n", OpenVGMFile(bakapee, &pee[0])); - IN_Startup(); - IN_Default(0,&player,ctrl_Joystick); +// IN_Startup(); IN_Default(0,&gvar.player[0],ctrl_Keyboard1); InitEngine(); PlayMusic(&pee[0]); - while(!IN_KeyDown(sc_Escape)) - //while(!getch()) +// while(!IN_KeyDown(sc_Escape)) + while(!kbhit()) { - IN_ReadControl(0,&player); +// IN_ReadControl(0,&gvar.player); UpdateSoundEngine(); } StopMusic(); FreeVGMFile(&pee[0]); - //IN_Shutdown(); DeinitEngine(); - IN_Shutdown(); + //IN_Shutdown(); }