Software renderer bug (+2 bonus bugs) ;) (all fixed)

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Software renderer bug (+2 bonus bugs) ;) (all fixed)

Post by jox »

In the software renderer the selection of listboxes doesn't get clipped.

Here is a screenshot from the user interface demo:

Image

The problem is in CVideoSoftware.cpp
function CVideoSoftware::draw2DRectangle()

Replace

Code: Select all

core::rect<s32> p(pos);
if(!p.isValid())  return;
BackBuffer->drawRectangle(p, color);
with

Code: Select all

core::rect<s32> p(pos);
p.clipAgainst(*clip);
BackBuffer->drawRectangle(p, color);
and it's ok.

The "bonus bugs" are actually forgotten bugs. Here is a reminder for Niko :)

1.

CFileSystem.cpp

The Linux version of getWorkingDirectory() doesn't return WorkingDirectory:

Replace

Code: Select all

#ifdef LINUX
	getcwd(WorkingDirectory, (size_t)FILE_SYSTEM_MAX_PATH);
#endif
with

Code: Select all

#ifdef LINUX
	getcwd(WorkingDirectory, (size_t)FILE_SYSTEM_MAX_PATH);
	return WorkingDirectory;
#endif
2.

fast_atof.h

Once there was a fix applied only to the non const function (fast_atof_move() )

To fix also fast_atof_move_const():

Replace

Code: Select all

if (*c == 'e')
{
	++c;
	f32 exp = (f32)strtol(c, &t, 10);
	f *= (f32)pow(10.0f, exp);
}
with

Code: Select all

if (*c == 'e')
{
	++c;
	f32 exp = (f32)strtol(c, &t, 10);
	f *= (f32)pow(10.0f, exp);
	c = t;
}
(The function is actually not used, but it might some day...)
It is like it is. And because it is like it is, things are like they are.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

sweeeeeeeeeet!

Jox, your bug fixes rule!

It seems like Mexico relaxed you in a good way! :wink:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

you're getting close...you're getting veeeeeeery close!

Post by afecelis »

remember my first app ever created in Irrlicht? well, all I could see in software mode was a bunch of triangles... check it now:

http://www.danielpatton.com/afecelis/sc ... ftware.jpg

you're getting close my friend!


:D
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Yea, unfortunately I'm going back to good (c)old germany in one week... :cry:

Hehe, yes I remember that one! Wow, thats' a progress.. Looks funny that screenshot. :)
It is like it is. And because it is like it is, things are like they are.
Post Reply