just by looking at the code, can anyone tell me why my _PRINTSTRING (760,560) [line 47] is not showing up? I've set COLOR to 0 for Layer(1) [lines 7 and 8] as the screen color is WHITE, and I know that works because I would lose my debugging values in the overworld screen (BLACK) after exiting the inventory. I added a screen shot of the output, which the screen size is 800x600 so 760x560 should still be on the screen. I also have a _PRINTMODE _KEEPBACKGROUND for layer(1) at the top of my startup code, so I should see a BLACK "0" in the currency box with the white background remaining, but its not showing up.
I have to be doing something wrong but, I've been working on this code for a while and have become blind to what I could have messed up.
I have to be doing something wrong but, I've been working on this code for a while and have become blind to what I could have messed up.
Code: (Select All)
SUB Inventory
STATIC Inhand AS _BYTE, Moving AS _BYTE
Tmp& = _COPYIMAGE(_DISPLAY)
OldS = _SOURCE
OldD = _DEST
_DEST Layer(1)
COLOR 0 ' set layer(1) text color to black for currency
_DEST Layer(8)
_SOURCE Layer(8)
I_Base& = _COPYIMAGE(Layer(6))
'------------------Build Screen Base---------------------------
Build_Inventory_Screen I_Base&, Ys%%, Xs%%
'--------------------------------------------------------------
'----------------------click layer setup-----------------------
Build_Inventory_Click_Screen
'--------------------------------------------------------------
DO
IF _KEYDOWN(27) THEN ExitFlag%% = TRUE
_PUTIMAGE , I_Base&, Layer(1)
'-----------------------Place Body Inventory-------------------
FOR i% = 1 TO 7
Display_item_Inventory IL(i%).X, IL(i%).Y, E(i%)
NEXT
'--------------------------------------------------------------
'----------------------Place LOAD inventory--------------------
FOR Iy%% = 0 TO Ys%%
FOR Ix%% = 0 TO Xs%%
IF InventoryLoad(Ix%%, Iy%%) THEN Display_item_Inventory 479 + 72 * Ix%%, 40 + 64 * Iy%%, InventoryLoad(Ix%%, Iy%%)
NEXT: NEXT
'--------------------------------------------------------------
IF _MOUSEBUTTON(1) THEN 'left click
Clicked~& = POINT(_MOUSEX, _MOUSEY)
IF _RED32(Clicked~&) = 128 THEN Result%% = Inventory_Equiped_Click_AI(Inhand, Moving, Clicked~&) 'equiped inventory slot selected
IF _RED32(Clicked~&) = 255 THEN Result%% = Inventory_Load_Click(Inhand, Moving, Clicked~&)
IF _RED32(Clicked~&) = 129 THEN Result%% = Inventory_Cash_Out(Inhand, Moving)
DO: n = _MOUSEINPUT: LOOP WHILE _MOUSEBUTTON(1)
END IF
IF Moving THEN Display_item_Inventory _MOUSEX, _MOUSEY, Inhand
_PRINTSTRING (760, 560), "0", Layer(1) '- 9 * LEN(LTRIM$(STR$(P.Currency))) ,LTRIM$(STR$(P.Currency))
_PUTIMAGE , Layer(1), Layer(0)
_LIMIT 60
DO: LOOP WHILE _MOUSEINPUT
LOOP UNTIL ExitFlag%%
'---------Restore originals---------
_PUTIMAGE , Tmp&, Layer(0)
_SOURCE OldS
_DEST Layer(1)
COLOR 15 'restore print color
_DEST OldD
'-----------Free temps--------------
_FREEIMAGE Tmp&
_FREEIMAGE I_Base&
'----------Clear buffer-------------
_KEYCLEAR
_DELAY .25
_KEYCLEAR
END SUB


