|
Or moving it on the screen to the right top corner... physically
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
My wife and every user I support at work.
|
|
|
|
|
Did the earth move for you last night ?
Wales earthquake
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
A gentleman never tells.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
That's why I asked ewe
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
I get Turkey, but Wales?
ed
|
|
|
|
|
I had been struggling with my render code for days until things went from bad to worse and I was getting artifacts due to corrupt DMA transfers on top of drawing code errors and other messes.
Finally I sat down and rewrote the damned thing. Not only did I do that, I made it so I'm sending with one buffer while drawing to another buffer, then flipping them to maximize the benefit of DMA.
Not only that, it's now basically a coroutine.
All of this and my render code is actually simpler than before, and it appears to work swimmingly so far.
Took me several hours vs. several days.
All the win. Now I just need to implement touch.
Edit: Got touch working. That was easier than I thought it would be. Woo!
if(m_touch_callback!=nullptr) {
point16 locs[2];
size_t locs_size = sizeof(locs);
m_touch_callback(locs,&locs_size,m_touch_callback_state);
if(locs_size>0) {
if(m_last_touched!=nullptr) {
m_last_touched->on_touch(locs_size,locs);
} else {
control_type* target = nullptr;
for(control_type** ctl_it = m_controls.begin();ctl_it!=m_controls.end();++ctl_it) {
control_type* pctl = *ctl_it;
if(pctl->bounds().intersects((spoint16)locs[0])) {
target = pctl;
}
}
if(target!=nullptr) {
m_last_touched = target;
target->on_touch(locs_size,locs);
}
}
} else {
if(m_last_touched!=nullptr) {
m_last_touched->on_release();
m_last_touched = nullptr;
}
}
}
if(m_flush_callback!=nullptr && m_flushing<(1+(m_buffer2!=nullptr)) && m_dirty_rects.size()!=0) {
if(m_it_dirties==nullptr) {
m_it_dirties = m_dirty_rects.cbegin();
size_t bmp_stride = bitmap_type::sizeof_buffer(size16(m_it_dirties->width(),1));
m_bmp_lines = m_buffer_size/bmp_stride;
if(bmp_stride>m_buffer_size) {
return uix_result::out_of_memory;
}
m_bmp_y = 0;
} else {
if(m_bmp_y>=m_it_dirties->height()) {
++m_it_dirties;
if(m_it_dirties==m_dirty_rects.cend()) {
m_it_dirties = nullptr;
m_dirty_rects.clear();
return uix_result::success;
}
size_t bmp_stride = bitmap_type::sizeof_buffer(size16(m_it_dirties->width(),1));
m_bmp_lines = m_buffer_size/bmp_stride;
if(bmp_stride>m_buffer_size) {
return uix_result::out_of_memory;
}
m_bmp_y = 0;
} else {
m_bmp_y+=m_bmp_lines;
}
}
srect16 subrect(m_it_dirties->x1,m_it_dirties->y1+m_bmp_y,m_it_dirties->x2,m_it_dirties->y1+m_bmp_lines+m_bmp_y);
subrect=subrect.crop((srect16)*m_it_dirties);
bitmap_type bmp(size16(subrect.dimensions().width,m_bmp_lines),m_write_buffer,m_palette);
bmp.fill(bmp.bounds(),m_background_color);
for(control_type** ctl_it = m_controls.begin();ctl_it!=m_controls.end();++ctl_it) {
control_type* pctl = *ctl_it;
if(pctl->bounds().intersects(subrect)) {
srect16 surface_rect = pctl->bounds();
surface_rect.offset_inplace(-subrect.x1,-subrect.y1);
control_surface_type surface(bmp,surface_rect);
pctl->on_render(surface);
}
}
++m_flushing;
m_flush_callback((point16)subrect.top_left(),bmp,m_flush_callback_state);
switch_buffers();
}
return uix_result::success;
To err is human. Fortune favors the monsters.
modified 25-Feb-23 3:30am.
|
|
|
|
|
Why are you simpering?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Because I need a copy editor.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Don't we all?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
honey the codewitch wrote: if(pctl->bounds().intersects((spoint16)locs[0])) {
target = pctl;
}
honey the codewitch wrote: if(bmp_stride>m_buffer_size) {
return uix_result::out_of_memory;
} You've used curly braces for your single-line if-statements!
This really makes my day, I'm so proud of you!
|
|
|
|
|
|
#Worldle #399 2/6 (100%)
🟨⬜⬜⬜⬜⬅️
🟩🟩🟩🟩🟩🎉
https://worldle.teuteuf.fr
go lucky did not need map
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Wordle 616 4/6
⬛⬛⬛🟩⬛
⬛🟩⬛🟩⬛
⬛🟩⬛🟩🟩
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 616 4/6
⬛⬛⬛⬛⬛
⬛⬛⬛⬛🟨
🟩🟩⬛🟩⬛
🟩🟩🟩🟩🟩
|
|
|
|
|
Wordle 616 3/6*
⬜⬜⬜⬜⬜
⬜⬜🟨🟩🟩
🟩🟩🟩🟩🟩
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Wordle 616 5/6
⬜⬜🟨⬜⬜
🟩🟩⬜⬜🟨
🟩🟩⬜⬜🟨
🟩🟩🟨⬜⬜
🟩🟩🟩🟩🟩
|
|
|
|
|
⬜⬜⬜⬜⬜
⬜🟩⬜⬜⬜
🟩🟩⬜⬜🟨
🟩🟩🟩🟩🟩
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
Wordle 616 5/6
⬜⬜🟨⬜⬜
⬜⬜⬜⬜⬜
⬜⬜⬜🟨⬜
🟩🟩⬜⬜🟩
🟩🟩🟩🟩🟩
I had one letter after my third guess, got kind of nervous there
|
|
|
|
|
Wordle 616 4/6
⬛⬛⬛⬛⬛
🟩🟩⬛⬛🟨
🟩🟩🟩🟩⬛
🟩🟩🟩🟩🟩
Get me coffee and no one gets hurt!
|
|
|
|
|
Wordle 616 5/6
⬜⬜⬜⬜⬜
⬜⬜⬜⬜🟨
🟨⬜🟨⬜⬜
⬜🟩⬜🟩🟩
🟩🟩🟩🟩🟩
Hard
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Can we please make game NPCs more interesting?
Also if you asked me in 1993 I'd have never thought the voice synthesis part (with speech patterns and such) would be the most challenging aspect of this given today's existing technology.
To err is human. Fortune favors the monsters.
modified 24-Feb-23 14:29pm.
|
|
|
|
|
Would you like a reply? Press Enter to continue or ESC to quit.
Jeremy Falcon
|
|
|
|
|
Off topic....
For some situations I really like ChatGPT. One is find a regex pattern. Of course ChatGPT is not always right at the first time, but very cooperative to find the correct solution
|
|
|
|
|
Have listen to the NPC's in GTA V sometime - they lead a lot more interesting lives than I do. And boy, do they swear a lot!
But I think those are all pre-recorded rather than on-the-fly generated.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|