MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / debug_sprite

Function debug_sprite

src/debug.cpp:6726–6905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6724}
6725
6726static void debug_sprite(TCHAR **inptr)
6727{
6728 uaecptr saddr, addr, addr2;
6729 int xpos, xpos_ecs;
6730 int ypos, ypos_ecs;
6731 int ypose, ypose_ecs;
6732 int attach;
6733 uae_u64 w1, w2, ww1, ww2;
6734 bool detectsize = true;
6735 int size = 1, width;
6736 int ecs, sh10;
6737 int y, i;
6738 TCHAR tmp[80], tmp2a[80], tmp2b[80];
6739 int max = 14;
6740
6741 addr2 = 0;
6742 ignore_ws(inptr);
6743 addr = readhex(inptr, NULL);
6744 ignore_ws(inptr);
6745 if (more_params (inptr)) {
6746 size = readhex(inptr, NULL);
6747 detectsize = false;
6748 }
6749 if (size != 1 && size != 2 && size != 4) {
6750 addr2 = size;
6751 detectsize = true;
6752 ignore_ws(inptr);
6753 if (more_params(inptr)) {
6754 size = readint(inptr, NULL);
6755 detectsize = false;
6756 }
6757 }
6758 if ((size != 1 && size != 2 && size != 4) || detectsize) {
6759 size = 1;
6760 if (get_word_debug(addr + 2) == 0 && get_word_debug(addr + 4) != 0 && get_word_debug(addr + 6) == 0) {
6761 size = 2;
6762 } else if (get_word_debug(addr + 2) == 0 && get_word_debug(addr + 4) == 0 && get_word_debug(addr + 6) == 0 && get_word_debug(addr + 8) != 0) {
6763 size = 4;
6764 }
6765 }
6766
6767 for (;;) {
6768 ecs = 0;
6769 sh10 = 0;
6770 saddr = addr;
6771 width = size * 16;
6772 w1 = get_word_debug(addr);
6773 w2 = get_word_debug(addr + size * 2);
6774 console_out_f(_T(" %06X "), addr);
6775 for (i = 0; i < size * 2; i++)
6776 console_out_f(_T("%04X "), get_word_debug(addr + i * 2));
6777 console_out_f(_T("\n"));
6778
6779 ypos = (int)(w1 >> 8);
6780 xpos = w1 & 255;
6781 ypose = (int)(w2 >> 8);
6782 attach = (w2 & 0x80) ? 1 : 0;
6783 if (w2 & 4)

Callers 1

debug_lineFunction · 0.85

Calls 7

ignore_wsFunction · 0.85
readhexFunction · 0.85
more_paramsFunction · 0.85
readintFunction · 0.85
get_word_debugFunction · 0.70
get_long_debugFunction · 0.70
console_out_fFunction · 0.50

Tested by

no test coverage detected