Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/23/26 21:52
WFO Training with parallel cores Zorro64
by Martin_HH. 02/23/26 15:29
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 6,385 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 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 | 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