1
0

PatternFont.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * PatternFont.h
  3. * -------------
  4. * Purpose: Code for creating pattern font bitmaps
  5. * Notes : (currently none)
  6. * Authors: OpenMPT Devs
  7. * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
  8. */
  9. #pragma once
  10. #include "openmpt/all/BuildSettings.hpp"
  11. OPENMPT_NAMESPACE_BEGIN
  12. struct MODPLUGDIB;
  13. struct PATTERNFONT
  14. {
  15. MODPLUGDIB *dib;
  16. MODPLUGDIB *dibASCII; // optional
  17. int nWidth, nHeight; // Column Width & Height, including 4-pixels border
  18. int nClrX, nClrY; // Clear (empty note) location
  19. int nSpaceX, nSpaceY; // White location (must be big enough)
  20. UINT nEltWidths[5]; // Elements Sizes
  21. UINT padding[5]; // Padding pixels contained in element width
  22. int nNumX, nNumY; // Vertically-oriented numbers 0x00-0x0F
  23. int nNum10X, nNum10Y; // Numbers 10-29
  24. int nAlphaAM_X,nAlphaAM_Y; // Letters A-M +#
  25. int nAlphaNZ_X,nAlphaNZ_Y; // Letters N-Z +?
  26. int nNoteX, nNoteY; // Notes ..., C-, C#, ...
  27. int nNoteWidth[2]; // Total width of note (C#)
  28. int nOctaveWidth; // Octave Width
  29. int nVolX, nVolY; // Volume Column Effects
  30. int nVolCmdWidth; // Width of volume effect
  31. int nVolHiWidth; // Width of first character in volume parameter
  32. int nCmdOfs; // XOffset (-xxx) around the command letter
  33. int nParamHiWidth;
  34. int nInstrOfs, nInstr10Ofs, nInstrHiWidth;
  35. int pcParamMargin; // Margin for first digit of PC event parameter number
  36. int pcValMargin; // Margin for first digit of PC event parameter value
  37. int paramLoMargin; // Margin for second digit of parameter
  38. int spacingY; // Vertical spacing between letters in the bitmap
  39. };
  40. class PatternFont
  41. {
  42. public:
  43. static const PATTERNFONT *currentFont;
  44. static void UpdateFont(HWND hwnd);
  45. static void DeleteFontData();
  46. };
  47. OPENMPT_NAMESPACE_END