From 3c507e0f84818754853610c381457771416f92ee Mon Sep 17 00:00:00 2001 From: Philip Minakov Date: Sun, 17 Nov 2024 01:59:24 +0400 Subject: [PATCH 1/2] Add swi functions --- swilib/include/swilib/image.h | 9 +++++++++ swilib/include/swilib/ui.h | 24 ++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/swilib/include/swilib/image.h b/swilib/include/swilib/image.h index 3901e63a..5d06a16c 100644 --- a/swilib/include/swilib/image.h +++ b/swilib/include/swilib/image.h @@ -277,6 +277,15 @@ __swi_begin(0x1EC) void FreeDynIcon(int picture) __swi_end(0x1EC, FreeDynIcon, (picture)); + +/** + * Get the maximum count of PIT icons. + * @return count + * */ +__swi_begin(0x3D9) +int GetPITSize() +__swi_end(0x3D9, GetPITSize, ()); + /** @} */ __swilib_end diff --git a/swilib/include/swilib/ui.h b/swilib/include/swilib/ui.h index 948b914f..4eabfd65 100644 --- a/swilib/include/swilib/ui.h +++ b/swilib/include/swilib/ui.h @@ -1578,6 +1578,30 @@ __swi_begin(0x80D8) void *RamMenuAnywhere() __swi_end(0x80D8, RamMenuAnywhere, ()); +/** + * Size of UI header. + * @return pointer to the rect + * */ +__swi_begin(0x83D6) +RECT *GetHeaderRECT(void) +__swi_end(0x83D6, GetHeaderRECT, ()); + +/** + * Size of UI options header. + * @return pointer to the rect + * */ +__swi_begin(0x83D7) +RECT *GetOptionsHeaderRect(void) +__swi_end(0x83D7, GetOptionsHeaderRect, ()); + +/** + * Size of UI main area. + * @return pointer to the rect + * */ +__swi_begin(0x83D8) +RECT *GetMainAreaRECT(void) +__swi_end(0x83D8, GetMainAreaRECT, ()); + /** @} */ __swilib_end From d0eec97a810fc0a70fa9bf77521d47ad98ba169e Mon Sep 17 00:00:00 2001 From: Philip Minakov Date: Sun, 17 Nov 2024 01:59:33 +0400 Subject: [PATCH 2/2] Add some constants for SGold --- swilib/include/swilib/base.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/swilib/include/swilib/base.h b/swilib/include/swilib/base.h index 22139dcb..532fb225 100644 --- a/swilib/include/swilib/base.h +++ b/swilib/include/swilib/base.h @@ -60,13 +60,15 @@ typedef struct LLIST LLIST; * */ enum DefaultLgpID { #ifdef NEWSGOLD - LGP_NULL = 0x7FFFFFFF, /**< Empty LGP */ -#else - LGP_NULL = 0x7FFF, /**< Empty LGP */ -#endif + LGP_NULL = 0x7FFFFFFF, /**< Empty LGP */ LGP_DOIT_PIC = 0x7FFFC0FB, /**< OK icon */ LGP_CHANGE_PIC = 0x7FFFC10D, /**< Change icon */ LGP_SAVE_PIC = 0x7FFFC113, /**< Save icon */ +#else + LGP_NULL = 0x7FFF, /**< Empty LGP */ + LGP_DOIT_PIC = 0x4E48, /**< OK icon */ + LGP_MENU_PIC = 0x4E4A, /**< Menu icon */ +#endif }; /**