![]() |
#1 |
Adept
Join Date: Apr 2011
Posts: 103
![]() |
Bug Report: Graphics not masking
The 8x8, 8x16, and 16x16 tiles are not masking properly in windows because they have a white background, rather than a black one. I think whoever saves them probably needs to make sure that the paper color is black, since it probably cannot be seen because of the transparency.
Also, ANGBAND_DIR_XRTA_FONT is still being initialized in init_stuff in main-win.c (lines 4873-4878). It should be either removed from here, like the ones for graphics and sounds were, or put in an if (!ANGBAND_DIR_XRTA_FONT) wrapper. Like the others were, the memory is being allocated twice, but only freed once. Also, would ticket #1461 be fixed by removing the line "file_delete(old_savefile);" from line 380 and putting it on line 402? (The exsiting .old file is not deleted until the .new file is confirmed to have been written, but before the existing save file is renamed .old.) You can remove the lines " else file_delete(old_savefile);" on lines 414 and 415, if you want the .old file to remain as a backup. For ticket #942, I'm curious what the OSX and SDL ports use for icons? Lastly, what does the "multiple save file handling " mentioned in other threads mean? I could not find a therad that talked about it. Edit: for the first part of ticket #1469, adding the line "case VK_CLEAR: ch = '5'; kp=TRUE; break;" in handle_keydown() works for me. (wParam is 12 for me when pressing numpad5 when numlock is not on.) Edit: For the second part of ticket #1469, the numpad keys are not handled in handle_keydown(), but WM_CHAR message are not generated for them, so they are not handled that way. ( I do not know where the plain numpad keypresses are handled.) Maybe in handle_keydown add lines like "case VK_NUMPAD7: if (mc||ma||ms) {ch = VK_NUMPAD7; kp = TRUE;} break;" Last edited by Blue Baron; June 19, 2011 at 05:37. |
![]() |
![]() |
![]() |
#2 | |||
Angband Devteam member
Join Date: Apr 2007
Posts: 334
![]() |
Quote:
Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
#3 |
Angband Devteam member
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 40
Posts: 1,516
![]() |
Blue Baron, you are my personal hero!
In case anyone else is interested, I fixed the PNG tilesets by opening them in gimp, saving a copy as PNG, turning off "save background color" and "save color value for transparent pixels". For some reason (under WINE) I was able to walk/run/alter using the number pad with numlock on and off after applying your fix. Are you seeing problems still? |
![]() |
![]() |
![]() |
#4 | |
Adept
Join Date: Apr 2011
Posts: 103
![]() |
Quote:
Code:
strnfmt(old_savefile, sizeof(old_savefile), "%s.old", path); while (file_exists(old_savefile) && (count++ < 100)) { strnfmt(old_savefile, sizeof(old_savefile), "%s.%u%u.old", path, Rand_simple(32767), count); } Ahh thanks I did not know they were there and was only looking in the src directory. |
|
![]() |
![]() |
![]() |
#5 | |
Angband Devteam member
Join Date: Apr 2007
Posts: 334
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
#6 | |
Adept
Join Date: Apr 2011
Posts: 103
![]() |
Quote:
To say it another way, when numlock is on, handle_keydown() is seeing all of the numpad key presses except when shift is held down. for the tunnelling I added lines like "case VK_NUMPAD7: if (mc||ma||ms) {ch = KC_HOME; kp = TRUE;} break;". When I had "ch = VK_NUMPAD7" in there various other commands were being executed, so the VK_ codes are can't be used directly by term_keypress(). Edit: It seems like with the shift key down, and num lock is on, windows is translating the numpad keys to the numpad keys with numlock off with shift off. Last edited by Blue Baron; June 19, 2011 at 11:19. |
|
![]() |
![]() |
![]() |
#7 | |
Angband Devteam member
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 40
Posts: 1,516
![]() |
Quote:
http://www.suacommunity.com/dictiona...temp-entry.php It looks like _mktemp_s() might be the thing to us. I think this is the strategy that the real world uses nowadays. ![]() |
|
![]() |
![]() |
![]() |
#8 | |
Angband Devteam member
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 40
Posts: 1,516
![]() |
Quote:
![]() |
|
![]() |
![]() |
![]() |
#9 | ||
Adept
Join Date: Apr 2011
Posts: 103
![]() |
Quote:
![]() Also, the special_key_list in 3.2.0 captures VK_SELECT, VK_PRINT, VK_EXECUTE,VK_SNAPSHOT,VK_HELP, and VK_16-VK_24, but handle_keydown() does not. Does anyone care about these keys? Edit: Quote:
Anyways, above i meant something like: Code:
#if (defined(POSIX)) // I do not know what should be here file_exists() uses #ifdef HAV_STAT strnfmt(old_savefile, sizeof(old_savefile),"%sXXXXXX", path); res = mkstemp(old_saevfile); #elif (defined(WINDOWS)) strncopy(old_savefile, path,1024); res = tmpnam_s(old_savefile, 1024); // or _mktmp_s() // However mkstemp opens a file descriptor, but these two don't. so there would be additional // code either here or for the unix version #else strnfmt(old_savefile, sizeof(old_savefile), "%s.old", path); while (file_exists(old_savefile) && (count++ < 100)) { strnfmt(old_savefile, sizeof(old_savefile), "%s.%u%u.old", path, Rand_simple(32767), count); } #endif Last edited by Blue Baron; June 19, 2011 at 18:28. |
||
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bug report: shopkeeper greetings | Derakon | Development | 4 | June 19, 2011 19:43 |
Bug report - negative min values in ego_item.txt | jens | Development | 5 | June 19, 2011 13:30 |
Bug report - money not updated | jens | Development | 0 | June 18, 2011 23:20 |
Bug Report - Subwindow refresh after options load | dhegler | Vanilla | 3 | March 2, 2010 19:56 |
Vanilla Bug Report: Everburning Lantern | The G Masta | Vanilla | 1 | November 11, 2009 18:35 |