aboutsummaryrefslogtreecommitdiff
path: root/devtools/tasmrecover/dreamweb/look.asm
blob: 399e1f16fd8289983cc7b9e35bfc3c90f4f42a68 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
;Copyright (c) 1990-2011 by Neil Dodwell
;Released with permission from Neil Dodwell under GPLv2
;See LICENSE file for full license text
;---------------------------------------------------------------Look-routine----

Autolook	proc	near

	mov	ax,mousex
	cmp	ax,oldx
	jnz	diffmouse
	mov	ax,mousey
	cmp	ax,oldy
	jnz	diffmouse

	dec	lookcounter
	cmp	lookcounter,0
	jnz	noautolook
	cmp	watchingtime,0
	jnz	noautolook
	call	dolook
noautolook:	ret

diffmouse:	mov	lookcounter,1000
	ret

	endp




Look	proc	near

	cmp	watchingtime,0
	jnz	blank
	cmp	pointermode,2
	jz	blank

	cmp	commandtype,241
	jz	alreadylook
	mov	commandtype,241
	mov	al,25
	call	commandonly
alreadylook:	cmp	mousebutton,1
	jnz	nolook
	mov	ax,mousebutton
	cmp	ax,oldbutton
	jz	nolook
	call	dolook
nolook:	ret

	endp





Dolook	proc	near

	call	createpanel
	call	showicon
	call	undertextline
	call	worktoscreenm

	mov	commandtype,255
	call	dumptextline

	mov	bl,roomnum
	and	bl,31
	mov	bh,0
	add	bx,bx

	mov	es,roomdesc
	add	bx,intextdat

	mov	si,[es:bx]
	add	si,intext

	call	findnextcolon

	mov	di,66
	cmp	reallocation,50
	jc	notdream3
	mov	di,40
notdream3:	mov	bx,80
	mov	dl,241
	call	printslow

	cmp	al,1
	jz	afterlook
	mov	cx,400
	call	hangonp

afterlook:	mov	pointermode,0
	mov	commandtype,0
	call	redrawmainscrn
	call	worktoscreenm
	ret

	endp






Redrawmainscrn	proc	near

	mov	timecount,0
	call	createpanel
	mov	newobs,0
	call	drawfloor
	call	printsprites
	call	reelsonscreen
	call	showicon
	call	getunderzoom
	call	undertextline
	call	readmouse
	mov	commandtype,255
	ret

	endp















Getback1	proc	near

	cmp	pickup,0
	jz	notgotobject
	call	blank
	ret

notgotobject:	cmp	commandtype,202
	jz	alreadyget
	mov	commandtype,202
	mov	al,26
	call	commandonly
alreadyget:	mov	ax,mousebutton
	cmp	ax,oldbutton
	jz	nogetback
	and	ax,1
	jnz	dogetback
nogetback:	ret

dogetback:	mov	getback,1
	mov	pickup,0
	ret

	endp