| ||
| Views: 31,725,928 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 06-11-26 04:49 AM |
| Guest: | ||
| Main - Posts by diegovsky |
| diegovsky |
| ||
|
Newcomer Normal user Level: 2 Posts: 1/1 EXP: 17 Next: 29 Since: 07-22-25 Last post: 323 days ago Last view: 323 days ago |
Hey so I'm a newbie here and I would love to contribute to melonDS.
I've been developing my own homebrew game but have been stumbling upon some graphics problems and having a debug window to visually show the data in each background, objs, etc would be very nice. I tried to read a bit of the source code this evening but got quickly confused due to the very low level nature of the code. I'm currently looking at GPU2D_Soft.cpp to understand how I would access the bgs to provide some sort of layered view, however, the code appears very complex due to the macros to use a different drawing pixel function depending on gpu accel, etc. In the following code, why is dst+256 and dst+512 being written? Is this some sort of double/triple buffering?
void SoftRenderer::DrawPixel_Normal(u32* dst, u16 color, u32 flag) { u8 r = (color & 0x001F) << 1; u8 g = (color & 0x03E0) >> 4; u8 b = (color & 0x7C00) >> 9; //g |= ((color & 0x8000) >> 15); *(dst+256) = *dst; *dst = r | (g << 8) | (b << 16) | flag; } void SoftRenderer::DrawPixel_Accel(u32* dst, u16 color, u32 flag) { u8 r = (color & 0x001F) << 1; u8 g = (color & 0x03E0) >> 4; u8 b = (color & 0x7C00) >> 9; *(dst+512) = *(dst+256); *(dst+256) = *dst; *dst = r | (g << 8) | (b << 16) | flag; } |
| Main - Posts by diegovsky |
|
Page rendered in 0.031 seconds. (2048KB of memory used) MySQL - queries: 22, rows: 67/67, time: 0.026 seconds.
Acmlmboard 2.064 (2018-07-20)© 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |