Guest User

th04

a guest
Jun 10th, 2019
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.86 KB | None | 0 0
  1. /********************************************************************/
  2. /*This is part of main.exe of th04                                  */
  3. /*The range is from sub_B439 to sub_B616                            */
  4. /*This code is rewrite of screenshot of Part of MAG.Net             */
  5. /*Because of video's low quality, it was hard to identify, so there */
  6. /*can be wrong name or mistake.                                     */
  7. /*08/20/2018 by WindowsTiger                                        */
  8. /*06/10/2019 by WindowsTiger, EmsLoad Complete                      */
  9. /*          But I could not ensure while loop is written correctly  */
  10. /********************************************************************/
  11.     ______________________
  12.     ________________________________
  13.     ______________
  14. }
  15. #endif
  16. _________ void ___________________________
  17. {
  18.     _________
  19.     _______________________________________________
  20. #ifdef DEMO_REC
  21.     _____________
  22.     _________________________
  23.     ______________
  24.     _______________________________
  25.     ______________
  26. #endif
  27. }
  28. ______ void ____DemoPlay(void)
  29. {
  30. #ifdef DEMO_REC
  31.     if(key_det) goto endDD;
  32.     key_det = DemoBuf[ncountw];
  33.     shiftkey = DemoBuf[ncountw+DEMO_N];
  34. #else
  35.     DemoBuf[ncountw] = key_det;
  36.     DemoBuf[ncountw+DEMO_N] = shiftkey;
  37. #endif
  38.     if(ncountw>=DEMO_N-4){
  39. #ifdef DEMO_REC
  40.         DemoPlaySave();
  41. #endif
  42. endDD:
  43.         hmem_free(TP_SEG(DemoBuf));
  44.         DrfmunOut(10);
  45.         GameCore("op");
  46.     }
  47. }
  48.  
  49. /*--------------------------EMS設作用-------------------------------*/
  50.  
  51. SVN EmsSetup(void)
  52. {
  53.     int i;
  54.     long ofs;
  55.    
  56.     Stage = cfg->Stage;
  57.     if(Stage==6) Rank = 4;
  58.     else Rank = cfg->Rank;
  59.     eyename[3] = '0'+Rank;
  60.     Ems = 0;
  61.     if(ems_exist()==0)return;
  62.     if(ems_space()<EMSSIZE)return;
  63.     Ems = ems_allocate(EMSSIZE);
  64.     if(Ems){
  65.         ems_setname(Ems, "GENSOEMS");
  66.         CdgLoad(31,eyename,0);
  67.         ems_write(Ems,0,SETCLIP(CdgBuf[31].seg[1]),CdgBuf[31].data.size*4);
  68.         CdgFree(31);
  69.     }
  70. }
  71.  
  72. SVN EmsLoad(void)
  73. {
  74.     int i;
  75.     WORD size;
  76.     long ofs;
  77.     static char* bbname = "BB0.CDG";
  78.     bbname[2] = cfg->StChr[0];
  79.     CdgLoad(0,bbname,0);
  80.     if (Ems){
  81.         ems_write(Ems,14000,SETCLIP(CdgBuf[0].Seg[1]),CdgBuf[0].data.size*4);
  82.         if(StChr==0) CdgLoadAll(CDGIP,"KAO0.cd2");
  83.         else CdgLoadAll(CDGIP,"KAO1.cd2");
  84.         i=CDGIP;ofs=94000;
  85.         size=CdgBuf[CDGIP].data.size;
  86.         while(CdgBuf[i].seg[0]){
  87.             ems_write(Ems,ofs,SETCLIP(CdgBuf[i].seg[0]),size);
  88.             ofs += size;
  89.             ems_write(Ems,ofs,SETCLIP(CdgBuf[i].seg[1]),size*4);
  90.             ofs += size*4;
  91.             CdgFree(i);
  92.             i++;
  93.         }
  94.     }
  95. }
  96.  
  97. SVN Ems_____(void)
  98. {
  99.     _________
  100.         ____________________________
  101.         ____________________________
  102.     _____________________________
Add Comment
Please, Sign In to add comment