DirectWindowStars: Fixed 64-bit build
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
StarWindow.cpp
|
StarWindow.cpp
|
||||||
|
|
||||||
by Pierre Raynaud-Richard.
|
by Pierre Raynaud-Richard.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -69,7 +69,7 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
|
|
||||||
// init the crc pseudo-random generator
|
// init the crc pseudo-random generator
|
||||||
crc_alea = CRC_START;
|
crc_alea = CRC_START;
|
||||||
|
|
||||||
// allocate the star struct array
|
// allocate the star struct array
|
||||||
star_count_max = 8192;
|
star_count_max = 8192;
|
||||||
star_count = 0;
|
star_count = 0;
|
||||||
@@ -81,11 +81,11 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
// to do it (the probability and the angle are linked), but that's
|
// to do it (the probability and the angle are linked), but that's
|
||||||
// simple and doesn't require any trigonometry.
|
// simple and doesn't require any trigonometry.
|
||||||
do {
|
do {
|
||||||
dx = (crc_alea&0xffff) - 0x8000;
|
dx = (crc_alea&0xffff) - 0x8000;
|
||||||
CrcStep();
|
CrcStep();
|
||||||
CrcStep();
|
CrcStep();
|
||||||
|
|
||||||
dy = (crc_alea&0xffff) - 0x8000;
|
dy = (crc_alea&0xffff) - 0x8000;
|
||||||
CrcStep();
|
CrcStep();
|
||||||
CrcStep();
|
CrcStep();
|
||||||
} while ((dx == 0) && (dy == 0));
|
} while ((dx == 0) && (dy == 0));
|
||||||
@@ -98,11 +98,11 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
dy <<= 1;
|
dy <<= 1;
|
||||||
square <<= 2;
|
square <<= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// save the starting speed vector.
|
// save the starting speed vector.
|
||||||
star_list[i].dx0 = dx;
|
star_list[i].dx0 = dx;
|
||||||
star_list[i].dy0 = dy;
|
star_list[i].dy0 = dy;
|
||||||
|
|
||||||
// simulate the animation to see how many moves are needed to
|
// simulate the animation to see how many moves are needed to
|
||||||
// get out by at least 1024 in one direction. That will give us
|
// get out by at least 1024 in one direction. That will give us
|
||||||
// an minimal value for how long we should wait before restarting
|
// an minimal value for how long we should wait before restarting
|
||||||
@@ -118,7 +118,7 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
dy += (dy>>4);
|
dy += (dy>>4);
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add a random compenent [0 to 15] to the minimal count before
|
// add a random compenent [0 to 15] to the minimal count before
|
||||||
// restart.
|
// restart.
|
||||||
star_list[i].count0 = cnt + ((crc_alea&0xf0000)>>16);
|
star_list[i].count0 = cnt + ((crc_alea&0xf0000)>>16);
|
||||||
@@ -131,7 +131,7 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
star_list[i].dx = 0;
|
star_list[i].dx = 0;
|
||||||
star_list[i].dy = 0;
|
star_list[i].dy = 0;
|
||||||
star_list[i].count = (i&255);
|
star_list[i].count = (i&255);
|
||||||
}
|
}
|
||||||
|
|
||||||
// allocate the semaphore used to synchronise the star animation drawing access.
|
// allocate the semaphore used to synchronise the star animation drawing access.
|
||||||
drawing_lock = create_sem(0, "star locker");
|
drawing_lock = create_sem(0, "star locker");
|
||||||
@@ -142,7 +142,7 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
my_thread = spawn_thread(StarWindow::StarAnimation, "StarAnimation",
|
my_thread = spawn_thread(StarWindow::StarAnimation, "StarAnimation",
|
||||||
B_DISPLAY_PRIORITY, (void*)this);
|
B_DISPLAY_PRIORITY, (void*)this);
|
||||||
resume_thread(my_thread);
|
resume_thread(my_thread);
|
||||||
|
|
||||||
// add a view in the background to insure that the content area will
|
// add a view in the background to insure that the content area will
|
||||||
// be properly erased in black. This erase mechanism is not synchronised
|
// be properly erased in black. This erase mechanism is not synchronised
|
||||||
// with the star animaton, which means that from time to time, some
|
// with the star animaton, which means that from time to time, some
|
||||||
@@ -156,7 +156,7 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
// to do it, as it gives us access to hardware acceleration...
|
// to do it, as it gives us access to hardware acceleration...
|
||||||
frame.OffsetTo(0.0, 0.0);
|
frame.OffsetTo(0.0, 0.0);
|
||||||
//view = new BView(frame, "", B_FOLLOW_ALL, B_WILL_DRAW);
|
//view = new BView(frame, "", B_FOLLOW_ALL, B_WILL_DRAW);
|
||||||
|
|
||||||
// The only think we want from the view mechanism is to
|
// The only think we want from the view mechanism is to
|
||||||
// erase the background in black. Because of the way the
|
// erase the background in black. Because of the way the
|
||||||
// star animation is done, this erasing operation doesn't
|
// star animation is done, this erasing operation doesn't
|
||||||
@@ -165,18 +165,18 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
// mechanism to draw in the same area of the StarWindow.
|
// mechanism to draw in the same area of the StarWindow.
|
||||||
// Such thing is usualy not recommended as synchronisation
|
// Such thing is usualy not recommended as synchronisation
|
||||||
// is generally an issue (drawing in random order usualy
|
// is generally an issue (drawing in random order usualy
|
||||||
// gives remanent incorrect result).
|
// gives remanent incorrect result).
|
||||||
// set the view color to be black (nicer update).
|
// set the view color to be black (nicer update).
|
||||||
//view->SetViewColor(0, 0, 0);
|
//view->SetViewColor(0, 0, 0);
|
||||||
//AddChild(view);
|
//AddChild(view);
|
||||||
|
|
||||||
// Add a shortcut to switch in and out of fullscreen mode.
|
// Add a shortcut to switch in and out of fullscreen mode.
|
||||||
AddShortcut('f', B_COMMAND_KEY, new BMessage('full'));
|
AddShortcut('f', B_COMMAND_KEY, new BMessage('full'));
|
||||||
|
|
||||||
// As we said before, the window shouldn't get wider than 2048 in any
|
// As we said before, the window shouldn't get wider than 2048 in any
|
||||||
// direction, so those limits will do.
|
// direction, so those limits will do.
|
||||||
SetSizeLimits(40.0, 2000.0, 40.0, 2000.0);
|
SetSizeLimits(40.0, 2000.0, 40.0, 2000.0);
|
||||||
|
|
||||||
// If the graphic card/graphic driver we use doesn't support directwindow
|
// If the graphic card/graphic driver we use doesn't support directwindow
|
||||||
// in window mode, then we need to switch to fullscreen immediately, or
|
// in window mode, then we need to switch to fullscreen immediately, or
|
||||||
// the user won't see anything, as long as it doesn't used the undocumented
|
// the user won't see anything, as long as it doesn't used the undocumented
|
||||||
@@ -188,7 +188,7 @@ StarWindow::StarWindow(BRect frame, const char *name)
|
|||||||
|
|
||||||
key_map *map;
|
key_map *map;
|
||||||
get_key_map(&map, &buf);
|
get_key_map(&map, &buf);
|
||||||
|
|
||||||
if (map != NULL) {
|
if (map != NULL) {
|
||||||
sSwapped = (map->left_control_key == 0x5d)
|
sSwapped = (map->left_control_key == 0x5d)
|
||||||
&& (map->left_command_key == 0x5c);
|
&& (map->left_command_key == 0x5c);
|
||||||
@@ -225,7 +225,7 @@ StarWindow::~StarWindow()
|
|||||||
|
|
||||||
status_t result;
|
status_t result;
|
||||||
wait_for_thread(my_thread, &result);
|
wait_for_thread(my_thread, &result);
|
||||||
|
|
||||||
// Free window resources. As they're used by the drawing thread, we
|
// Free window resources. As they're used by the drawing thread, we
|
||||||
// need to terminate that thread before freeing them, or we could crash.
|
// need to terminate that thread before freeing them, or we could crash.
|
||||||
free(star_list);
|
free(star_list);
|
||||||
@@ -329,11 +329,11 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
star_count_new = (star_count_max*(window_area>>10))>>10;
|
star_count_new = (star_count_max*(window_area>>10))>>10;
|
||||||
if (star_count_new > star_count_max)
|
if (star_count_new > star_count_max)
|
||||||
star_count_new = star_count_max;
|
star_count_new = star_count_max;
|
||||||
|
|
||||||
// set the position of the new center of the window (in case of move or resize)
|
// set the position of the new center of the window (in case of move or resize)
|
||||||
cx = (info->window_bounds.right+info->window_bounds.left+1)/2;
|
cx = (info->window_bounds.right+info->window_bounds.left+1)/2;
|
||||||
cy = (info->window_bounds.bottom+info->window_bounds.top+1)/2;
|
cy = (info->window_bounds.bottom+info->window_bounds.top+1)/2;
|
||||||
|
|
||||||
// update to the new clipping region. The local copy is kept relative
|
// update to the new clipping region. The local copy is kept relative
|
||||||
// to the center of the animation (origin of the star coordinate).
|
// to the center of the animation (origin of the star coordinate).
|
||||||
clipping_bound.left = info->clip_bounds.left - cx;
|
clipping_bound.left = info->clip_bounds.left - cx;
|
||||||
@@ -350,19 +350,19 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
clipping_list[i].top = info->clip_list[i].top - cy;
|
clipping_list[i].top = info->clip_list[i].top - cy;
|
||||||
clipping_list[i].bottom = info->clip_list[i].bottom - cy;
|
clipping_list[i].bottom = info->clip_list[i].bottom - cy;
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the new rowbyte
|
// update the new rowbyte
|
||||||
// NOTE: "row_bytes" is completely misnamed, and was misused too
|
// NOTE: "row_bytes" is completely misnamed, and was misused too
|
||||||
row_bytes = info->bytes_per_row / (info->bits_per_pixel / 8);
|
row_bytes = info->bytes_per_row / (info->bits_per_pixel / 8);
|
||||||
|
|
||||||
// update the screen bases (only one of the 3 will be really used).
|
// update the screen bases (only one of the 3 will be really used).
|
||||||
draw_ptr8 = (uint8*)info->bits + info->bytes_per_row
|
draw_ptr8 = (uint8*)info->bits + info->bytes_per_row
|
||||||
* info->window_bounds.top + info->window_bounds.left
|
* info->window_bounds.top + info->window_bounds.left
|
||||||
* (info->bits_per_pixel / 8);
|
* (info->bits_per_pixel / 8);
|
||||||
// Note: parenthesis around "info->bits_per_pixel / 8"
|
// Note: parenthesis around "info->bits_per_pixel / 8"
|
||||||
// are needed to avoid an overflow when info->window_bounds.left
|
// are needed to avoid an overflow when info->window_bounds.left
|
||||||
// becomes negative.
|
// becomes negative.
|
||||||
|
|
||||||
draw_ptr16 = (uint16*)draw_ptr8;
|
draw_ptr16 = (uint16*)draw_ptr8;
|
||||||
draw_ptr32 = (uint32*)draw_ptr8;
|
draw_ptr32 = (uint32*)draw_ptr8;
|
||||||
|
|
||||||
@@ -407,11 +407,11 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
r++;
|
r++;
|
||||||
}
|
}
|
||||||
goto invisible;
|
goto invisible;
|
||||||
|
|
||||||
// if it's still visible...
|
// if it's still visible...
|
||||||
visible:
|
visible:
|
||||||
if (i >= star_count_new) {
|
if (i >= star_count_new) {
|
||||||
// ...and the star won't be used anylonger, then we erase it.
|
// ...and the star won't be used anylonger, then we erase it.
|
||||||
if (pixel_depth == 32)
|
if (pixel_depth == 32)
|
||||||
draw_ptr32[s->last_draw] = 0;
|
draw_ptr32[s->last_draw] = 0;
|
||||||
else if (pixel_depth == 16)
|
else if (pixel_depth == 16)
|
||||||
@@ -420,7 +420,7 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
draw_ptr8[s->last_draw] = 0;
|
draw_ptr8[s->last_draw] = 0;
|
||||||
}
|
}
|
||||||
goto not_defined;
|
goto not_defined;
|
||||||
|
|
||||||
// if the star just became invisible and it was because the
|
// if the star just became invisible and it was because the
|
||||||
// context was modified and not fully stop, then we need to erase
|
// context was modified and not fully stop, then we need to erase
|
||||||
// those stars who just became invisible (or they could leave
|
// those stars who just became invisible (or they could leave
|
||||||
@@ -443,7 +443,7 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
not_defined:
|
not_defined:
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialise all the new star (the ones which weren't used but
|
// initialise all the new star (the ones which weren't used but
|
||||||
// will be use after that context update) to set their last position
|
// will be use after that context update) to set their last position
|
||||||
// as invalid.
|
// as invalid.
|
||||||
@@ -453,18 +453,18 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the window origin offset.
|
// update the window origin offset.
|
||||||
window_offset = row_bytes*(cy-info->window_bounds.top) + (cx-info->window_bounds.left);
|
window_offset = row_bytes*(cy-info->window_bounds.top) + (cx-info->window_bounds.left);
|
||||||
|
|
||||||
// set the pixel_depth and the pixel data, from the color_space.
|
// set the pixel_depth and the pixel data, from the color_space.
|
||||||
switch (info->pixel_format) {
|
switch (info->pixel_format) {
|
||||||
case B_RGBA32 :
|
case B_RGBA32 :
|
||||||
case B_RGB32 :
|
case B_RGB32 :
|
||||||
pixel_depth = 32;
|
pixel_depth = 32;
|
||||||
((uint8*)&pixel32)[0] = 0x20;
|
((uint8*)&pixel32)[0] = 0x20;
|
||||||
((uint8*)&pixel32)[1] = 0xff;
|
((uint8*)&pixel32)[1] = 0xff;
|
||||||
((uint8*)&pixel32)[2] = 0x20;
|
((uint8*)&pixel32)[2] = 0x20;
|
||||||
((uint8*)&pixel32)[3] = 0xff;
|
((uint8*)&pixel32)[3] = 0xff;
|
||||||
break;
|
break;
|
||||||
case B_RGB16 :
|
case B_RGB16 :
|
||||||
@@ -485,9 +485,9 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
case B_RGBA32_BIG :
|
case B_RGBA32_BIG :
|
||||||
case B_RGB32_BIG :
|
case B_RGB32_BIG :
|
||||||
pixel_depth = 32;
|
pixel_depth = 32;
|
||||||
((uint8*)&pixel32)[3] = 0x20;
|
((uint8*)&pixel32)[3] = 0x20;
|
||||||
((uint8*)&pixel32)[2] = 0xff;
|
((uint8*)&pixel32)[2] = 0xff;
|
||||||
((uint8*)&pixel32)[1] = 0x20;
|
((uint8*)&pixel32)[1] = 0x20;
|
||||||
((uint8*)&pixel32)[0] = 0xff;
|
((uint8*)&pixel32)[0] = 0xff;
|
||||||
break;
|
break;
|
||||||
case B_RGB16_BIG :
|
case B_RGB16_BIG :
|
||||||
@@ -506,10 +506,10 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the new star count.
|
// set the new star count.
|
||||||
star_count = star_count_new;
|
star_count = star_count_new;
|
||||||
|
|
||||||
// save a copy of the variables used to calculate the move of the window center
|
// save a copy of the variables used to calculate the move of the window center
|
||||||
cx_old = cx - info->window_bounds.left;
|
cx_old = cx - info->window_bounds.left;
|
||||||
cy_old = cy - info->window_bounds.top;
|
cy_old = cy - info->window_bounds.top;
|
||||||
@@ -518,7 +518,7 @@ StarWindow::SwitchContext(direct_buffer_info *info)
|
|||||||
|
|
||||||
// This is the thread doing the star animation itself. It would be easy to
|
// This is the thread doing the star animation itself. It would be easy to
|
||||||
// adapt to do any other sort of pixel animation.
|
// adapt to do any other sort of pixel animation.
|
||||||
long
|
status_t
|
||||||
StarWindow::StarAnimation(void *data)
|
StarWindow::StarAnimation(void *data)
|
||||||
{
|
{
|
||||||
star *s;
|
star *s;
|
||||||
@@ -527,15 +527,15 @@ StarWindow::StarAnimation(void *data)
|
|||||||
bigtime_t time;
|
bigtime_t time;
|
||||||
StarWindow *w;
|
StarWindow *w;
|
||||||
clipping_rect *r;
|
clipping_rect *r;
|
||||||
|
|
||||||
// receive a pointer to the StarWindow object.
|
// receive a pointer to the StarWindow object.
|
||||||
w = (StarWindow*)data;
|
w = (StarWindow*)data;
|
||||||
|
|
||||||
// loop, frame after frame, until asked to quit.
|
// loop, frame after frame, until asked to quit.
|
||||||
while (!w->kill_my_thread) {
|
while (!w->kill_my_thread) {
|
||||||
// we want a frame to take at least 16 ms.
|
// we want a frame to take at least 16 ms.
|
||||||
time = system_time()+16000;
|
time = system_time()+16000;
|
||||||
|
|
||||||
// get the right to do direct screen access.
|
// get the right to do direct screen access.
|
||||||
while (acquire_sem(w->drawing_lock) == B_INTERRUPTED)
|
while (acquire_sem(w->drawing_lock) == B_INTERRUPTED)
|
||||||
;
|
;
|
||||||
@@ -604,17 +604,17 @@ StarWindow::StarAnimation(void *data)
|
|||||||
s->last_draw = INVALID;
|
s->last_draw = INVALID;
|
||||||
loop:
|
loop:
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// release the direct screen access
|
// release the direct screen access
|
||||||
release_sem(w->drawing_lock);
|
release_sem(w->drawing_lock);
|
||||||
|
|
||||||
// snooze for whatever time is left from the initial allocation done
|
// snooze for whatever time is left from the initial allocation done
|
||||||
// at the beginning of the loop.
|
// at the beginning of the loop.
|
||||||
time -= system_time();
|
time -= system_time();
|
||||||
if (time > 0)
|
if (time > 0)
|
||||||
snooze(time);
|
snooze(time);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
StarWindow.h
|
StarWindow.h
|
||||||
|
|
||||||
by Pierre Raynaud-Richard.
|
by Pierre Raynaud-Richard.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -22,7 +22,7 @@ class StarWindow : public BDirectWindow {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// standard constructor and destrcutor
|
// standard constructor and destrcutor
|
||||||
StarWindow(BRect frame, const char *name);
|
StarWindow(BRect frame, const char *name);
|
||||||
virtual ~StarWindow();
|
virtual ~StarWindow();
|
||||||
|
|
||||||
// standard window member
|
// standard window member
|
||||||
@@ -38,12 +38,12 @@ private:
|
|||||||
// this function is used to inforce a direct access context
|
// this function is used to inforce a direct access context
|
||||||
// modification.
|
// modification.
|
||||||
void SwitchContext(direct_buffer_info *info);
|
void SwitchContext(direct_buffer_info *info);
|
||||||
|
|
||||||
// function used to increment the pseudo_random generator
|
// function used to increment the pseudo_random generator
|
||||||
inline void CrcStep();
|
inline void CrcStep();
|
||||||
|
|
||||||
// the drawing thread function.
|
// the drawing thread function.
|
||||||
static long StarAnimation(void *data);
|
static status_t StarAnimation(void *data);
|
||||||
|
|
||||||
// struct used to control each star.
|
// struct used to control each star.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -66,7 +66,7 @@ static long StarAnimation(void *data);
|
|||||||
uint32 last_draw;
|
uint32 last_draw;
|
||||||
} star;
|
} star;
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
// used for star->last_draw
|
// used for star->last_draw
|
||||||
INVALID = 0xffffffff,
|
INVALID = 0xffffffff,
|
||||||
@@ -81,37 +81,37 @@ static long StarAnimation(void *data);
|
|||||||
thread_id my_thread;
|
thread_id my_thread;
|
||||||
// used to synchronise the star animation drawing.
|
// used to synchronise the star animation drawing.
|
||||||
sem_id drawing_lock;
|
sem_id drawing_lock;
|
||||||
|
|
||||||
|
|
||||||
// array used for star animation.
|
// array used for star animation.
|
||||||
star *star_list;
|
star *star_list;
|
||||||
// count of star currently animated.
|
// count of star currently animated.
|
||||||
uint32 star_count;
|
uint32 star_count;
|
||||||
// maximal count of star in the array.
|
// maximal count of star in the array.
|
||||||
uint32 star_count_max;
|
uint32 star_count_max;
|
||||||
|
|
||||||
|
|
||||||
// the pixel drawing can be done in 3 depth : 8, 16 or 32.
|
// the pixel drawing can be done in 3 depth : 8, 16 or 32.
|
||||||
int32 pixel_depth;
|
int32 pixel_depth;
|
||||||
|
|
||||||
// base pointer of the screen, one per pixel_depth
|
// base pointer of the screen, one per pixel_depth
|
||||||
uint8 *draw_ptr8;
|
uint8 *draw_ptr8;
|
||||||
uint16 *draw_ptr16;
|
uint16 *draw_ptr16;
|
||||||
uint32 *draw_ptr32;
|
uint32 *draw_ptr32;
|
||||||
|
|
||||||
// pixel data, one per pixel_depth (for the same pixel_depth,
|
// pixel data, one per pixel_depth (for the same pixel_depth,
|
||||||
// the value depends of the color and the specific color encoding).
|
// the value depends of the color and the specific color encoding).
|
||||||
uint8 pixel8;
|
uint8 pixel8;
|
||||||
uint16 pixel16;
|
uint16 pixel16;
|
||||||
uint32 pixel32;
|
uint32 pixel32;
|
||||||
|
|
||||||
// offset, in bytes, between two lines of the frame buffer.
|
// offset, in bytes, between two lines of the frame buffer.
|
||||||
uint32 row_bytes;
|
uint32 row_bytes;
|
||||||
|
|
||||||
// offset, in bytes, between the base of the screen and the base
|
// offset, in bytes, between the base of the screen and the base
|
||||||
// of the content area of the window (top left corner).
|
// of the content area of the window (top left corner).
|
||||||
uint32 window_offset;
|
uint32 window_offset;
|
||||||
|
|
||||||
// clipping region, defined as a list of rectangle, including the
|
// clipping region, defined as a list of rectangle, including the
|
||||||
// smaller possible bounding box. This application will draw only
|
// smaller possible bounding box. This application will draw only
|
||||||
// in the 64 first rectangles of the region. Region more complex
|
// in the 64 first rectangles of the region. Region more complex
|
||||||
@@ -122,13 +122,13 @@ static long StarAnimation(void *data);
|
|||||||
clipping_rect clipping_bound;
|
clipping_rect clipping_bound;
|
||||||
clipping_rect clipping_list[MAX_CLIPPING_RECT_COUNT];
|
clipping_rect clipping_list[MAX_CLIPPING_RECT_COUNT];
|
||||||
uint32 clipping_list_count;
|
uint32 clipping_list_count;
|
||||||
|
|
||||||
// used for dynamic resizing.
|
// used for dynamic resizing.
|
||||||
int32 cx_old, cy_old;
|
int32 cx_old, cy_old;
|
||||||
|
|
||||||
// pseudo-random generator base
|
// pseudo-random generator base
|
||||||
int32 crc_alea;
|
int32 crc_alea;
|
||||||
|
|
||||||
// enable/disable a work around needed for R3.0
|
// enable/disable a work around needed for R3.0
|
||||||
bool need_r3_buffer_reset_work_around;
|
bool need_r3_buffer_reset_work_around;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user