From 0319300f434a236cc95e9763491389002993076f Mon Sep 17 00:00:00 2001 From: mazze Date: Tue, 15 Aug 2017 12:32:04 +0000 Subject: [PATCH] Ported to x86_64. git-svn-id: https://svn.aros.org/svn/aros/trunk/contrib@54869 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- aminet/games/think/muimine/LEWindow.c | 14 +++++++------- aminet/games/think/muimine/LevelData.h | 4 ++-- aminet/games/think/muimine/MFWindow.c | 16 +++++++++------- aminet/games/think/muimine/MUIMine.c | 17 +++++++++++++++-- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/aminet/games/think/muimine/LEWindow.c b/aminet/games/think/muimine/LEWindow.c index 75cd77992..94115587c 100644 --- a/aminet/games/think/muimine/LEWindow.c +++ b/aminet/games/think/muimine/LEWindow.c @@ -53,7 +53,7 @@ struct LEWindowData #define MUIM_LEWindow_EditUpdate (LEWINDOW_TAG_BASE | 0x0807) -struct EditUpdateParams{ ULONG MethodID; LONG type; }; +struct EditUpdateParams{ STACKED ULONG MethodID; STACKED LONG type; }; #define MUIV_LEWindow_EditUpdate_Name 1 #define MUIV_LEWindow_EditUpdate_Width 2 #define MUIV_LEWindow_EditUpdate_Height 3 @@ -578,7 +578,7 @@ static IPTR mAddLevel(struct IClass *cl, Object *obj, Msg msg) attempt to allocate a new edit data buffer for one level more than the current number of levels in the level list */ - LONG n = 0; + SIPTR n = 0; struct EditLevelData * newEdData; DoMethod(data->LevelList, OM_GET, MUIA_List_Entries, &n); @@ -656,7 +656,7 @@ static IPTR mDeleteLevel(struct IClass *cl, Object *obj, Msg msg) greater than zero (it should be since we have a selected entry) */ - LONG n = 0; + SIPTR n = 0; DoMethod(data->LevelList, OM_GET, MUIA_List_Entries, &n); if (n > 0) { @@ -765,7 +765,7 @@ static IPTR mReturnLevels(struct IClass *cl, Object *obj, Msg msg) /* get the number of entries in the level list */ - LONG n = 0; + SIPTR n = 0; DoMethod(data->LevelList, OM_GET, MUIA_List_Entries, &n); if (n) { @@ -901,7 +901,7 @@ static IPTR mEditUpdate(struct IClass * cl, Object * obj, struct EditUpdateParam case MUIV_LEWindow_EditUpdate_Width: { - LONG w = -1; + SIPTR w = -1; DoMethod(data->WidthString, OM_GET, MUIA_String_Integer, &w); if (w >= 0) { @@ -913,7 +913,7 @@ static IPTR mEditUpdate(struct IClass * cl, Object * obj, struct EditUpdateParam case MUIV_LEWindow_EditUpdate_Height: { - LONG h = -1; + SIPTR h = -1; DoMethod(data->HeightString, OM_GET, MUIA_String_Integer, &h); if (h >= 0) { @@ -925,7 +925,7 @@ static IPTR mEditUpdate(struct IClass * cl, Object * obj, struct EditUpdateParam case MUIV_LEWindow_EditUpdate_Mines: { - LONG m =-1; + SIPTR m =-1; DoMethod(data->MinesString, OM_GET, MUIA_String_Integer, &m); if (m >= 0) { diff --git a/aminet/games/think/muimine/LevelData.h b/aminet/games/think/muimine/LevelData.h index 35c387293..45209d5ba 100644 --- a/aminet/games/think/muimine/LevelData.h +++ b/aminet/games/think/muimine/LevelData.h @@ -10,7 +10,7 @@ struct BestTime { - int Time; // time to clear mine field (-ve if not set) + LONG Time; // time to clear mine field (-ve if not set) char Name[BT_NAME_SIZE]; // name of player who achieved this time }; @@ -29,7 +29,7 @@ struct LevelData */ struct LevelDataList { - int NumLevels; // number of allocated entries + LONG NumLevels; // number of allocated entries ULONG Flags; // flags: private ULONG CurrentLevel; // level being played struct LevelData * LevelList; // pointer to the allocated array diff --git a/aminet/games/think/muimine/MFWindow.c b/aminet/games/think/muimine/MFWindow.c index 09048b6aa..1b2333360 100644 --- a/aminet/games/think/muimine/MFWindow.c +++ b/aminet/games/think/muimine/MFWindow.c @@ -680,7 +680,7 @@ static IPTR mSet(struct IClass *cl, Object *obj, struct opSet * msg) struct MFWindowData *data = INST_DATA(cl,obj); struct TagItem *tag; struct TagItem *tags; - ULONG WinOpen = FALSE; + IPTR WinOpen = FALSE; ULONG ret; for (tags = msg->ops_AttrList; (tag = NextTagItem(&tags)); ) @@ -921,7 +921,8 @@ static void SetLevel(Object * obj, struct MFWindowData * data, ULONG level) if (level && level != data->Levels.CurrentLevel) { struct LevelData * pLevel; - ULONG opened = 0, menuid = 0; + IPTR opened = 0; + ULONG menuid = 0; /* set the new level in the window data @@ -1012,7 +1013,7 @@ static void CheckBestTime(Object * obj, struct MFWindowData * data) get the time taken from the minefield and make sure it is valid i.e. greater than zero */ - LONG lastTime = -1; + SIPTR lastTime = -1; DoMethod(data->MineField, OM_GET, MUIA_MineField_TimeTaken, &lastTime); if (lastTime > 0) { @@ -1121,7 +1122,7 @@ static BOOL GetBestTimeName(Object * obj, struct LevelData * pLevel, int rank) */ if (win) { - ULONG sigs = 0; + IPTR sigs = 0; BOOL running = TRUE; Object * app = _app(obj); @@ -1263,7 +1264,7 @@ static void ShowBestTimes(Object * obj, struct LevelDataList * lList, int hiRank */ if (win) { - ULONG sigs = 0; + IPTR sigs = 0; BOOL running = TRUE; Object * app = _app(obj); @@ -1385,7 +1386,7 @@ static void SetupLevels(Object * obj, struct MFWindowData * data) */ if (win) { - ULONG sigs = 0; + IPTR sigs = 0; BOOL running = TRUE; Object * app = _app(obj); @@ -1522,7 +1523,8 @@ static void SetupImages(Object * obj, struct MFWindowData * data) */ if (win) { - ULONG exitcode = ISW_CANCEL, sigs = 0; + ULONG exitcode = ISW_CANCEL; + IPTR sigs = 0; BOOL running = TRUE; Object * app = _app(obj); BPTR lock = CurrentDir(GetProgramDir()); diff --git a/aminet/games/think/muimine/MUIMine.c b/aminet/games/think/muimine/MUIMine.c index e9250ee6e..9a396077a 100644 --- a/aminet/games/think/muimine/MUIMine.c +++ b/aminet/games/think/muimine/MUIMine.c @@ -209,12 +209,25 @@ static VOID stccpy(char *dest,char *source,int len) #ifndef USE_ZUNE_ON_AMIGA + +#ifdef __AROS__ IPTR __stdargs DoSuperNew(struct IClass *cl,Object *obj,IPTR tag1,...) { - return(DoSuperMethod(cl,obj,OM_NEW,&tag1,NULL)); + AROS_SLOWSTACKTAGS_PRE(tag1); + retval = DoSuperMethod(cl, obj, OM_NEW, AROS_SLOWSTACKTAGS_ARG(tag1), NULL); + AROS_SLOWSTACKTAGS_POST; } + +#else + +IPTR __stdargs DoSuperNew(struct IClass *cl,Object *obj,IPTR tag1,...) +{ + return(DoSuperMethod(cl,obj,OM_NEW,&tag1,NULL)); +} + #endif +#endif /* function : loads a picture file and remap for a screen using datatypes @@ -631,7 +644,7 @@ int main(int argc, char *argv[]) SetAttrs(window, MUIA_Window_Open, TRUE, TAG_DONE); { - ULONG sigs = 0; + IPTR sigs = 0; while (DoMethod(app, MUIM_Application_NewInput, &sigs) != MUIV_Application_ReturnID_Quit) -- 2.11.4.GIT