Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b7a02a
commit 4913439
Showing
7 changed files
with
163 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# Target OS: Amiga OS3.X | ||
# Compiler : GCC | ||
# | ||
|
||
objects = project.o | ||
appname = Project | ||
#option = -O3 -m68030 | ||
option = -O3 -m68030 -noixemul | ||
|
||
project: $(objects) | ||
gcc -o $(appname) $(objects) $(option) | ||
|
||
project.o: project.c project.h | ||
gcc -c project.c $(option) | ||
|
||
clean: | ||
rm $(objects) $(appname) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#include "project.h" | ||
|
||
int main(int argc,char *argv[]) | ||
{ | ||
Object *app,*win1; | ||
ULONG signals; | ||
BOOL running = TRUE; | ||
|
||
APTR GROUP_ROOT_0, Scale_0, TX_label_0, STR_TX_label_0, GA_label_0; | ||
|
||
if (!Open_Libs()) | ||
{ | ||
printf("Cannot open libs\n"); | ||
return(0); | ||
} | ||
|
||
STR_TX_label_0 = "\n\33c\33bDownloading...\33n\n\n http://www.google.com/files/google-all.lha"; | ||
|
||
TX_label_0 = TextObject, | ||
MUIA_Background, MUII_FILL, | ||
MUIA_Frame, MUIV_Frame_Text, | ||
MUIA_Text_Contents, STR_TX_label_0, | ||
MUIA_Text_SetMin, TRUE, | ||
End; | ||
|
||
Scale_0 = ScaleObject, | ||
MUIA_FramePhantomHoriz, TRUE, | ||
MUIA_Scale_Horiz, TRUE, | ||
End; | ||
|
||
GA_label_0 = GaugeObject, | ||
GaugeFrame, | ||
MUIA_HelpNode, "GA_label_0", | ||
MUIA_FixHeight, 10, | ||
MUIA_Gauge_Horiz, TRUE, | ||
MUIA_Gauge_InfoText, "%1d%", | ||
MUIA_Gauge_Current, 48, | ||
MUIA_Gauge_Max, 100, | ||
End; | ||
|
||
GROUP_ROOT_0 = GroupObject, | ||
Child, TX_label_0, | ||
Child, Scale_0, | ||
Child, GA_label_0, | ||
End; | ||
|
||
win1 = WindowObject, | ||
MUIA_Window_Title, "window_title", | ||
MUIA_Window_ID, MAKE_ID('0', 'W', 'I', 'N'), | ||
WindowContents, GROUP_ROOT_0, | ||
End; | ||
|
||
app = ApplicationObject, | ||
MUIA_Application_Author, "NONE", | ||
MUIA_Application_Base, "NONE", | ||
MUIA_Application_Title, "NONE", | ||
MUIA_Application_Version, "$VER: NONE XX.XX (XX.XX.XX)", | ||
MUIA_Application_Copyright, "NOBODY", | ||
MUIA_Application_Description, "NONE", | ||
SubWindow, win1, | ||
End; | ||
|
||
if (!app) | ||
{ | ||
printf("Cannot create application.\n"); | ||
return(0); | ||
} | ||
|
||
DoMethod(win1, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, | ||
app, 2, MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit); | ||
|
||
set(win1,MUIA_Window_Open,TRUE);// open window | ||
|
||
while(running) | ||
{ | ||
ULONG id = DoMethod(app,MUIM_Application_Input,&signals); | ||
|
||
switch(id) | ||
{ | ||
case MUIV_Application_ReturnID_Quit: | ||
if((MUI_RequestA(app,0,0,"Quit?","_Yes|_No","\33cAre you sure?",0)) == 1) | ||
running = FALSE; | ||
break; | ||
} | ||
if(running && signals) Wait(signals); | ||
} | ||
|
||
set(win1,MUIA_Window_Open,FALSE); | ||
|
||
if(app) MUI_DisposeObject(app); | ||
Close_Libs(); | ||
exit(TRUE); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#include <libraries/mui.h> | ||
#include <proto/exec.h> | ||
#include <proto/dos.h> | ||
#include <proto/muimaster.h> | ||
#include <libraries/gadtools.h> | ||
#include <libraries/iffparse.h> | ||
#include <stdio.h> | ||
#include <proto/intuition.h> | ||
#include <proto/graphics.h> | ||
|
||
#define MAKE_ID(a,b,c,d) ((ULONG) (a)<<24 | (ULONG) (b)<<16 | (ULONG) (c)<<8 | (ULONG) (d)) | ||
|
||
#define IPTR ULONG | ||
|
||
struct IntuitionBase *IntuitionBase; | ||
struct GfxBase *GfxBase; | ||
struct Library *MUIMasterBase; | ||
|
||
BOOL Open_Libs(void) | ||
{ | ||
if ( !(IntuitionBase=(struct IntuitionBase *) OpenLibrary("intuition.library",39)) ) | ||
return(0); | ||
|
||
if ( !(GfxBase=(struct GfxBase *) OpenLibrary("graphics.library",0)) ) | ||
{ | ||
CloseLibrary((struct Library *)IntuitionBase); | ||
return(0); | ||
} | ||
|
||
if ( !(MUIMasterBase=OpenLibrary(MUIMASTER_NAME,19)) ) | ||
{ | ||
CloseLibrary((struct Library *)GfxBase); | ||
CloseLibrary((struct Library *)IntuitionBase); | ||
return(0); | ||
} | ||
|
||
return(1); | ||
} | ||
|
||
void Close_Libs(void) | ||
{ | ||
if (IntuitionBase) | ||
CloseLibrary((struct Library *)IntuitionBase); | ||
|
||
if (GfxBase) | ||
CloseLibrary((struct Library *)GfxBase); | ||
|
||
if (MUIMasterBase) | ||
CloseLibrary(MUIMasterBase); | ||
} | ||
|
Binary file not shown.