| ||
| Views: 31,777,190 | Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search | 06-14-26 05:12 PM |
| Guest: | ||
| 0 users reading [DISCUSSION] Debug menu for Listing backgrounds, objs, etc | 1 bot |
| Main - Development - [DISCUSSION] Debug menu for Listing backgrounds, objs, etc | Hide post layouts | New reply |
| diegovsky |
| ||
|
Newcomer Normal user Level: 2 Posts: 1/1 EXP: 18 Next: 28 Since: 07-22-25 Last post: 326 days ago Last view: 326 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 - Development - [DISCUSSION] Debug menu for Listing backgrounds, objs, etc | Hide post layouts | New reply |
|
Page rendered in 0.039 seconds. (2048KB of memory used) MySQL - queries: 28, rows: 74/74, time: 0.032 seconds.
Acmlmboard 2.064 (2018-07-20)© 2005-2008 Acmlm, Xkeeper, blackhole89 et al. |