Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: What does inkey() return? [Re: jcl] #409127
10/11/12 22:12
10/11/12 22:12
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Thank you very much for the tip with redefining the struct. That comes in very handy. Maybe you could overload str_cursor with a function that takes an additional var argument and sets the cursor to that position in a future version?

Originally Posted By: jcl
Yes, inkey and inchar switches off all other key functions - that is mentioned in the manual. Only after inkey/inchar ended you can again use the normal key events and variables.

I was aware of this. My point was that the state of the keys is even unavailable one frame after inkey has terminated. Maybe that is a good addendum for the manual.


Always learn from history, to be sure you make the same mistakes again...
Re: What does inkey() return? [Re: Uhrwerk] #409128
10/11/12 22:34
10/11/12 22:34
Joined: Sep 2007
Posts: 101
Luxembourg
K
krial057 Offline
Member
krial057  Offline
Member
K

Joined: Sep 2007
Posts: 101
Luxembourg
Quote:
Maybe you could overload str_cursor with a function that takes an additional var argument and sets the cursor to that position in a future version?

You could do that by yourself for now:

Php Code:
void str_cursor(STRING* str, long newpos)
{
	char* pCursorPos = (char*)&newpos;
	str->pad[4] = pCursorPos[0];
	str->pad[5] = pCursorPos[1];
	str->pad[6] = pCursorPos[2];
	str->pad[7] = pCursorPos[3];
} 



Last edited by krial057; 10/11/12 22:34.
Re: What does inkey() return? [Re: krial057] #409130
10/11/12 22:56
10/11/12 22:56
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I have already done this, just a bit different: I copied JCL's redefinition and directly set and return the cursor member of the STRING struct in my str_cursor version. Your workaround looks nice as well. Maybe I'll switch.

I was just asking for an officially supported version as manually overriding an engine struct seems a bit dirty to me and I guess the implementation work for JCL would only be marginal.


Always learn from history, to be sure you make the same mistakes again...
Page 2 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1