libmcgui.pas 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. unit libmcgui;
  2. interface
  3. const
  4. NEGICON_A = $20;
  5. NEGICON_B = $10;
  6. MOUSE_LBUTTON = $08;
  7. MOUSE_RBUTTON = $04;
  8. MCGUI_INTERNAL_FONT = 0;
  9. MCGUI_EXTERNAL_FONT = 1;
  10. type
  11. // Texture Information Structure
  12. sMcGuiTexture = packed record
  13. addr : pointer;
  14. end;
  15. // Memory Card Information Structure
  16. sMcGuiCards = packed record
  17. _file : array [0..20] of char;
  18. title : array [0..64] of char;
  19. frame : byte;
  20. block : byte;
  21. dataBytes : longint;
  22. iconAddr : pointer;
  23. dataAddr : pointer;
  24. end;
  25. // BG Information Structure
  26. sMcGuiBg = packed record
  27. mode : smallint;
  28. scrollDirect : shortint; // 0:Up 1:Up&Left 2:Left 3:Down&left 4:Down ...
  29. scrollSpeed : shortint; // 0:no scroll 1:1/60 2:1/30 3:1/20
  30. timadr : pointer;
  31. end;
  32. // Cursor Information Structure
  33. sMcGuiCursor = packed record
  34. mode : byte;
  35. r, g, b : byte;
  36. end;
  37. // BGM,Sound Effects Information Structure
  38. Tbgm = packed record
  39. isbgm : longint;
  40. seq : pdword;
  41. vh : pdword;
  42. vb : pdword;
  43. SVOL : longint;
  44. isReverb : longint;
  45. reverbType : longint;
  46. reverbDepth : longint;
  47. end;
  48. Tse = packed record
  49. isse : longint;
  50. vh : pdword;
  51. vb : pdword;
  52. vol : longint;
  53. prog : longint;
  54. TONE_OK : longint;
  55. TONE_CANCEL : longint;
  56. TONE_CURSOR : longint;
  57. TONE_ERROR : longint;
  58. end;
  59. sMcGuiSnd = packed record
  60. MVOL : longint;
  61. bgm : Tbgm;
  62. se : Tse;
  63. end;
  64. // Controller Related Information Structure
  65. TType = packed record
  66. flag : longint;
  67. BUTTON_OK : dword;
  68. BUTTON_CANCEL : dword;
  69. end;
  70. sMcGuiController = packed record
  71. buf : array [0..1] of byte;
  72. type1 : Ttype;
  73. type2 : Ttype;
  74. type3 : Ttype;
  75. type4 : Ttype;
  76. end;
  77. // Memory Card Screen Configuration Structure
  78. McGuiEnv = packed record
  79. cards : sMcGuiCards; // Memory Card Information
  80. bg : sMcGuiBg; // BG Information
  81. controller : sMcGuiController; // Controller Related Information
  82. sound : sMcGuiSnd; // BGM Sound Effects Information
  83. texture : sMcGuiTexture; // Texture Information
  84. cursor : sMcGuiCursor; // Cursor Information
  85. end;
  86. PMcGuiEnv = ^McGuiEnv;
  87. function McGuiSave(env:PMcGuiEnv): longint; external;
  88. function McGuiLoad(env:PMcGuiEnv): longint; external;
  89. function McGuiSetExternalFont(env: PMcGuiEnv; mode: longint): longint; external;
  90. implementation
  91. begin
  92. end.