From 90a098b64879242b721cb71cb8f005ca4f56abe0 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Wed, 2 Apr 2008 18:40:54 +0000 Subject: [PATCH] fixed bug in tiled background, found by heavyiron git-svn-id: svn://kolibrios.org@784 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/video/vesa20.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/trunk/video/vesa20.inc b/kernel/trunk/video/vesa20.inc index c49f630350..38a94b0c0c 100644 --- a/kernel/trunk/video/vesa20.inc +++ b/kernel/trunk/video/vesa20.inc @@ -799,15 +799,15 @@ dp2: push eax xor edx, edx mov eax, ebx - mov ecx, [BgrDataHeight] - div ecx ; edx := y mod BgrDataHeight - sub ecx, edx ; ecx := BgrDataHeight - (y mod BgrDataHeight) + div dword [BgrDataHeight] ; edx := y mod BgrDataHeight pop eax push eax + mov ecx, [BgrDataWidth] mov esi, edx - imul esi, [BgrDataWidth] ; esi := (y mod BgrDataHeight) * BgrDataWidth + imul esi, ecx ; esi := (y mod BgrDataHeight) * BgrDataWidth xor edx, edx - div dword [BgrDataWidth] ; edx := x mod BgrDataWidth + div ecx ; edx := x mod BgrDataWidth + sub ecx, edx add esi, edx ; esi := (y mod BgrDataHeight)*BgrDataWidth + (x mod BgrDataWidth) pop eax lea esi, [esi*3]