Subversion Repositories Kolibri OS

Rev

Rev 6371 | Rev 6385 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6371 Rev 6379
Line 1162... Line 1162...
1162
	mov [SpriteOldCoordinatY],ebx
1162
	mov [SpriteOldCoordinatY],ebx
1163
	mov esi,[rectangular_shade_x]
1163
	mov esi,[rectangular_shade_x]
1164
	mov edi,[rectangular_shade_y]
1164
	mov edi,[rectangular_shade_y]
Line 1165... Line 1165...
1165
 
1165
 
1166
	sub esi,eax
-
 
1167
	jns no_sign_sprite_size_x
1166
	sub esi,eax
1168
	neg esi
1167
	jns @f
-
 
1168
		neg esi ;sign sprite size x
Line 1169... Line 1169...
1169
	no_sign_sprite_size_x:
1169
	@@:
1170
 
-
 
1171
	sub edi,ebx
1170
 
1172
	jns no_sign_sprite_size_y
1171
	sub edi,ebx
-
 
1172
	jns @f
Line 1173... Line 1173...
1173
	neg edi
1173
		neg edi ;sign sprite size y
1174
	no_sign_sprite_size_y:
-
 
1175
 
1174
	@@:
1176
	test esi,esi
1175
 
-
 
1176
	test esi,esi
Line 1177... Line 1177...
1177
	jnz no_null_sprite_x
1177
	jnz @f
1178
	mov esi,1
-
 
1179
	no_null_sprite_x:
1178
		mov esi,1 ;null sprite x
1180
 
1179
	@@:
-
 
1180
 
Line 1181... Line 1181...
1181
	test edi,edi
1181
	test edi,edi
1182
	jnz no_null_sprite_y
1182
	jnz @f
Line 1183... Line 1183...
1183
	mov edi,1
1183
		mov edi,1 ;null sprite y
Line 1211... Line 1211...
1211
	call columnus
1211
	call columnus
Line 1212... Line 1212...
1212
 
1212
 
1213
	test eax,eax
1213
	test eax,eax
1214
	jnz crossing_with_work_area
1214
	jnz crossing_with_work_area
1215
	mov [finishing_crossing],1
-
 
1216
	mov [register],1
1215
	mov [finishing_crossing],1
Line 1217... Line 1216...
1217
	crossing_with_work_area:
1216
	crossing_with_work_area:
1218
 
1217
 
Line 1243... Line 1242...
1243
	inc ebx
1242
	inc ebx
1244
	mov [SpriteCoordinatX],eax
1243
	mov [SpriteCoordinatX],eax
1245
	mov [SpriteCoordinatY],ebx
1244
	mov [SpriteCoordinatY],ebx
Line 1246... Line 1245...
1246
 
1245
 
1247
	cmp [SpriteCoordinatX],0
1246
	cmp [SpriteCoordinatX],0
1248
	jns no_null_sprite_coordinat_x
1247
	jns @f
1249
	mov [SpriteCoordinatX],1
-
 
1250
	no_null_sprite_coordinat_x:
1248
		mov [SpriteCoordinatX],1 ;null sprite coordinat x
1251
 
1249
	@@:
1252
	cmp [SpriteCoordinatY],0
1250
	cmp [SpriteCoordinatY],0
1253
	jns no_null_sprite_coordinat_y
1251
	jns @f
1254
	mov [SpriteCoordinatY],1
1252
		mov [SpriteCoordinatY],1 ;null sprite coordinat y
Line 1255... Line 1253...
1255
	no_null_sprite_coordinat_y:
1253
	@@:
1256
 
1254
 
Line 1257... Line 1255...
1257
	mov esi,[rectangular_shade_x]
1255
	mov esi,[rectangular_shade_x]
1258
	mov edi,[rectangular_shade_y]
1256
	mov edi,[rectangular_shade_y]
1259
 
1257
 
1260
	sub esi,[OldX]
-
 
1261
	jns no_znak_size_of_rectangulare_crossing_x
1258
	sub esi,[OldX]
1262
	neg esi
1259
	jns @f
1263
	no_znak_size_of_rectangulare_crossing_x:
1260
		neg esi
1264
 
1261
	@@:
1265
	sub edi,[OldY]
1262
	sub edi,[OldY]
Line 1266... Line 1263...
1266
	jns no_znak_size_of_rectangulare_crossing_y
1263
	jns @f
1267
	neg edi
1264
		neg edi
Line 1268... Line 1265...
1268
	no_znak_size_of_rectangulare_crossing_y:
1265
	@@:
1269
 
1266
 
1270
	mov ecx,[OldX]
1267
	mov ecx,[OldX]
1271
	mov edx,[OldY]
1268
	mov edx,[OldY]
1272
 
1269
 
1273
	sub ecx,[PosX]
1270
	sub ecx,[PosX]
1274
	jns no_minimum_x_crossing
1271
	jns @f
1275
	mov ecx,0
1272
	xor ecx,ecx
Line 1276... Line 1273...
1276
	add ecx,[PosX]
1273
	add ecx,[PosX]
1277
	mov [OldX],ecx
1274
	mov [OldX],ecx
1278
	add ecx,esi
1275
	add ecx,esi
1279
	mov [rectangular_shade_x],ecx
1276
	mov [rectangular_shade_x],ecx
1280
	no_minimum_x_crossing:
1277
	@@:
1281
 
1278
 
1282
	sub edx,[PosY]
1279
	sub edx,[PosY]
1283
	jns no_minimum_y_crossing
1280
	jns @f
Line 1284... Line 1281...
1284
	mov edx,0
1281
	xor edx,edx
1285
	add edx,[PosY]
1282
	add edx,[PosY]
1286
	mov [OldY],edx
1283
	mov [OldY],edx
1287
	add edx,edi
1284
	add edx,edi
1288
	mov [rectangular_shade_y],edx
1285
	mov [rectangular_shade_y],edx
1289
	no_minimum_y_crossing:
1286
	@@:
1290
 
1287
 
1291
	mov ecx,[Picture_SizeX]
1288
	mov ecx,[Picture_SizeX]
1292
	sub ecx,esi
1289
	sub ecx,esi
Line 1293... Line 1290...
1293
	cmp [OldX],ecx
1290
	cmp [OldX],ecx
1294
	jl no_maximum_x_crossing
1291
	jl @f
1295
	dec ecx
1292
	dec ecx
1296
	mov [OldX],ecx
1293
	mov [OldX],ecx
1297
	add ecx,esi
1294
	add ecx,esi
1298
	mov [rectangular_shade_x],ecx
1295
	mov [rectangular_shade_x],ecx
1299
	no_maximum_x_crossing:
1296
	@@:
1300
 
1297
 
1301
	mov edx,[Picture_SizeY]
1298
	mov edx,[Picture_SizeY]
Line 1302... Line 1299...
1302
	sub edx,edi
1299
	sub edx,edi
1303
	cmp [OldY],edx
1300
	cmp [OldY],edx
1304
	jl no_maximum_y_crossing
1301
	jl @f
1305
	dec edx
1302
	dec edx
Line 1321... Line 1318...
1321
 
1318
 
1322
	cmp [DrawSprite_flag],1
1319
	cmp [DrawSprite_flag],1
Line 1323... Line 1320...
1323
	jne no_activate_put_fon_
1320
	jne no_activate_put_fon_
1324
 
1321
 
1325
	cmp [Paste_flag],1
1322
	cmp [Paste_flag],1
1326
	je no_put_fon___
1323
	je @f
1327
	call PutFonForSprite
1324
		call PutFonForSprite
1328
	no_put_fon___:
1325
	@@:
Line 1329... Line 1326...
1329
	and [Paste_flag],0
1326
	and [Paste_flag],0
1330
	no_activate_put_fon_:
1327
	no_activate_put_fon_:
Line 1353... Line 1350...
1353
	add edi,[PosY]
1350
	add edi,[PosY]
Line 1354... Line 1351...
1354
 
1351
 
1355
	mov ebp,[Picture_SizeX]
1352
	mov ebp,[Picture_SizeX]
1356
	dec ebp
1353
	dec ebp
1357
	cmp esi,ebp
-
 
1358
	jl no_minimum_x_allocation
1354
	cmp esi,ebp
1359
	mov esi,ebp
1355
	jl @f
-
 
1356
		mov esi,ebp ;minimum x allocation
Line 1360... Line 1357...
1360
	no_minimum_x_allocation:
1357
	@@:
1361
 
1358
 
1362
	mov ebp,[Picture_SizeY]
1359
	mov ebp,[Picture_SizeY]
1363
	dec ebp
-
 
1364
	cmp edi,ebp
1360
	dec ebp
1365
	jl no_minimum_y_allocation
1361
	cmp edi,ebp
-
 
1362
	jl @f
Line 1366... Line 1363...
1366
	mov edi,ebp
1363
		mov edi,ebp ;minimum y allocation
Line 1367... Line 1364...
1367
	no_minimum_y_allocation:
1364
	@@:
1368
 
1365
 
Line 1369... Line 1366...
1369
	call calculate_rectangle
1366
	call calculate_rectangle
1370
 
1367
 
1371
	;save color pixels in ReserveArray
1368
	;save color pixels in ReserveArray
1372
	square_width_save
1369
	square_width_save
1373
 
1370
 
1374
	cmp [DrawSprite_flag],1
1371
	cmp [DrawSprite_flag],1
1375
	jne no_save_fon_for_sprite_
1372
	jne @f
Line 1376... Line 1373...
1376
	;save current coordinats as old
1373
	;save current coordinats as old
Line 1377... Line -...
1377
	mov eax,[SpriteCoordinatX]
-
 
1378
	mov ebx,[SpriteCoordinatY]
-
 
1379
	mov [SpriteOldCoordinatX],eax
-
 
1380
	mov [SpriteOldCoordinatY],ebx
-
 
1381
 
-
 
1382
	call SaveFonForSprite
-
 
1383
 
-
 
1384
	no_save_fon_for_sprite_:
-
 
1385
 
-
 
1386
	;draw calculated pixels on work arrea
-
 
1387
	mov ebx,[ReserveArray]
-
 
1388
	mov ecx,[ebx]
-
 
1389
	add ebx,4
-
 
1390
	next_pixel_put_allocation:
-
 
1391
 
-
 
1392
	mov edx,0x1f3fff
-
 
1393
	mov esi,edx
-
 
1394
	shr edx,16
-
 
1395
 
-
 
1396
	mov ebp,ecx
-
 
1397
	and ebp,8
-
 
1398
	cmp ebp,8
-
 
1399
	jne black_color
-
 
1400
	mov si,0xffff
-
 
1401
	mov dl,0xff
-
 
1402
	black_color:
1374
	mov eax,[SpriteCoordinatX]
1403
 
-
 
Line 1404... Line 1375...
1404
	mov eax,[ebx]
1375
	mov ebx,[SpriteCoordinatY]
1405
	mov [eax],si
1376
	mov [SpriteOldCoordinatX],eax
1406
	mov [eax+2],dl
-
 
1407
 
1377
	mov [SpriteOldCoordinatY],ebx
1408
	add ebx,4
1378
 
1409
	dec ecx
-
 
Line 1410... Line 1379...
1410
	jnz next_pixel_put_allocation
1379
	call SaveFonForSprite
1411
 
1380
 
1412
	cmp [DrawSprite_flag],1
1381
	@@:
1413
	jne no_activate_draw_sprite_
1382