Click here to Skip to main content
15,886,830 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: old code Pin
PIEBALDconsult10-Mar-22 6:49
mvePIEBALDconsult10-Mar-22 6:49 
GeneralRe: old code PinPopular
honey the codewitch10-Mar-22 7:12
mvahoney the codewitch10-Mar-22 7:12 
GeneralRe: old code Pin
PIEBALDconsult10-Mar-22 7:21
mvePIEBALDconsult10-Mar-22 7:21 
GeneralRe: old code Pin
DRHuff11-Mar-22 13:55
DRHuff11-Mar-22 13:55 
GeneralRe: old code Pin
Greg Utas10-Mar-22 6:50
professionalGreg Utas10-Mar-22 6:50 
GeneralRe: old code Pin
honey the codewitch10-Mar-22 7:10
mvahoney the codewitch10-Mar-22 7:10 
GeneralRe: old code Pin
Greg Utas10-Mar-22 7:12
professionalGreg Utas10-Mar-22 7:12 
GeneralRe: old code Pin
honey the codewitch10-Mar-22 7:18
mvahoney the codewitch10-Mar-22 7:18 
This one is complicated by multiple screen modes, each of which must be represented by a different concrete type with not much in the way of common base class.

The screen mode function itself is a bit odd at first, being like

C++
auto scmode = screen.mode<1,4>(); // native bit depth of 1, 
// virtualized bit depth of 4 (for 8 virtual grayscale colors)

then you can draw to scmode.

I don't like it but the way my graphics library is designed, pixels of different formats are different concrete types so like

C++
gfx::gsc_pixel<1>; // mono pixel
gfx::gsc_pixel<8>; // 8 bit grayscale
gfx::rgb_pixel<16>; // 16 bit rgb
gfx::ycbcr_pixel<24>; // 24-bit Y'CbCr (used by jpeg)
gfx::rgba_pixel<32>; // 32-bit rgb pixel with an alpha channel


therefore different modes with different pixel formats must be different types.

it has a number of advantages. this is just one area where i don't care for it.
To err is human. Fortune favors the monsters.

GeneralRe: old code Pin
jmaida10-Mar-22 11:51
jmaida10-Mar-22 11:51 
GeneralRe: old code Pin
OriginalGriff10-Mar-22 8:22
mveOriginalGriff10-Mar-22 8:22 
GeneralRe: old code Pin
PIEBALDconsult10-Mar-22 8:40
mvePIEBALDconsult10-Mar-22 8:40 
GeneralRe: old code Pin
Super Lloyd10-Mar-22 8:31
Super Lloyd10-Mar-22 8:31 
GeneralRe: old code Pin
Slacker00710-Mar-22 8:36
professionalSlacker00710-Mar-22 8:36 
GeneralRe: old code Pin
englebart10-Mar-22 13:07
professionalenglebart10-Mar-22 13:07 
GeneralRe: old code Pin
Gary R. Wheeler10-Mar-22 14:51
Gary R. Wheeler10-Mar-22 14:51 
GeneralRe: old code Pin
honey the codewitch10-Mar-22 14:54
mvahoney the codewitch10-Mar-22 14:54 
GeneralRe: old code PinPopular
Gary R. Wheeler10-Mar-22 15:16
Gary R. Wheeler10-Mar-22 15:16 
GeneralRe: old code Pin
honey the codewitch10-Mar-22 22:48
mvahoney the codewitch10-Mar-22 22:48 
GeneralRe: old code Pin
Gary Wheeler11-Mar-22 3:16
Gary Wheeler11-Mar-22 3:16 
GeneralRe: old code Pin
Bob@work11-Mar-22 7:06
Bob@work11-Mar-22 7:06 
GeneralRe: old code Pin
sasadler11-Mar-22 6:19
sasadler11-Mar-22 6:19 
GeneralRe: old code Pin
Wizard of Sleeves10-Mar-22 23:29
Wizard of Sleeves10-Mar-22 23:29 
GeneralRe: old code Pin
Don Hughes11-Mar-22 2:06
Don Hughes11-Mar-22 2:06 
GeneralRe: old code Pin
MikeTheFid11-Mar-22 4:46
MikeTheFid11-Mar-22 4:46 
GeneralRe: old code Pin
Baxter P11-Mar-22 5:08
professionalBaxter P11-Mar-22 5:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.