summaryrefslogtreecommitdiff
path: root/Stubs.c
blob: fab02096b3a2c59b37b010e0b788c17f54e976b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/dos.h>

#include "Bobi.h"

extern struct NewWindow ToolNW;
extern struct Screen *mainscreen;
extern struct Window *mainwindow,*toolwindow;
extern struct RastPort *toolrastport;
extern WORD mainpalette[];
extern struct MenuItem ToolWindowMenuItem;

/*************************************************************************/

void ClearAllFunc()
{
	if(ShowRequest2("Do you really want to\ndelete all bobs?","OF COURSE!"))
		ClearAll();
}

/*************************************************************************/

void QuitFunc()
{
	if(ShowRequest2("Do you really want to quit ?","JAJA!"))
		Cleanup(TRUE);
	else ShowMonoReq2("Da hast du nochmals Glück gehabt!");
}

/*************************************************************************/

void GrabDPaintFunc()
{
	ShowMonoReq2("Can't find the DPaint screen :-)");
}

/*************************************************************************/

void GrabScreenFunc()
{
	ShowMonoReq2("Sorry, this function will\nnever be implemented!");
}

/*************************************************************************/

void SaveIFFAnimFunc()
{
	ShowMonoReq2("Sorry, this function is not\nyet implemented!");
}

/*************************************************************************/

void EditPaletteFunc()
{
	Snooze(mainwindow);		/* nicht LockWindows() wegen Farbpalette! */
	if(toolwindow) Snooze(toolwindow);
	CopyMem(RequestColor(mainscreen),mainpalette,2*32);
	if(toolwindow) UnSnooze(toolwindow);
	UnSnooze(mainwindow);
}

/*************************************************************************/

void ToolWindowFunc()
{
	if(ToolWindowMenuItem.Flags & CHECKED)
	{
		if(!toolwindow)
		{
			ToolNW.Screen  = mainscreen;
			if(ToolNW.TopEdge>mainscreen->Height-ToolNW.Height)
				ToolNW.TopEdge=mainscreen->Height-ToolNW.Height;
			if(!(toolwindow = OpenWindow(&ToolNW)))
			{
				ShowMonoReq2("Can't open tool window!\n");
			}
			toolrastport = toolwindow->RPort;
		}
	}
	else
	{
		if(toolwindow)
		{
			ToolNW.TopEdge=toolwindow->TopEdge;
			ClearMenuStrip(toolwindow);
			CloseWindow(toolwindow);
			toolwindow=0; toolrastport=0;
			ActivateWindow(mainwindow);
		}
	}
}