Author Topic: WinCPCTelera  (Read 8445 times)

0 Members and 1 Guest are viewing this topic.

Online Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 484
  • Country: fr
  • Liked: 398
  • Likes Given: 762
Re: WinCPCTelera
« Reply #75 on: 10:24, 16 June 19 »
Hi  @awergh,
thanks for reporting.

I just check my code for missing key in WinCPCTelera and all is (fortunately) OK.

;D Edit :
Effectively there is a problem, enum are stored in C in int and cpct_keyID is unsigned short.

Code: [Select]
int enumKeyZ= (i16)0x8008; -> 0xFFFF8008;
cpct_keyID  myKeyZ = getKey(); -> 0x8008;

PROBLEM : enumKeyZ != myKeyZ

I work on it.


By the way here the version of getKey() i used in my games :

Code: [Select]
cpct_keyID getKey()
{
/** From Ronaldo in cpcwiki forum */
u8* keyStatus = cpct_keyboardStatusBuffer;
u8 i;

while (!cpct_isAnyKeyPressed());

for (i = 0; i < 10; i++)
{
cpct_keyID keypressed = *keyStatus++ ^ 0xFF;
if (keypressed)
return (keypressed << 8) + i;
}

return 0;
}


Have you completed your changes for CPCtelera 1.5?
I haven't decided if I should be using 1.4.2 or grabbing the latest 1.5 from github.

You can use WinCPCtelera with 1.5, i have migrated my projects to this version and i'm currently programming with it.

I haven't yet migrated String functions but i'll do it today (i saw you use them).

« Last Edit: 11:00, 16 June 19 by Arnaud »

Offline awergh

  • CPC6128
  • ****
  • Posts: 204
  • Country: au
  • Liked: 56
  • Likes Given: 162
Re: WinCPCTelera
« Reply #76 on: 12:00, 16 June 19 »
Thanks for that I'll have a look once I start programming.
I decided to have some discipline this year and try to do much of my planning this month before getting into the development in July as per usual.


I wouldn't be too worried to rush with the String functions, I used them in my 2016/2017 entries and little things but I expect I will use a custom font (same as 2018) as it made memory management below 0x4000 much easier.


I think I'm convinced to go for 1.5 I'll just note which revision it is and stick to it.
I do like the idea that someone could compile my code easily if they wanted to even though there isn't much reason to do so.

Online Arnaud

  • Supporter
  • 464 Plus
  • *
  • Posts: 484
  • Country: fr
  • Liked: 398
  • Likes Given: 762
Re: WinCPCTelera
« Reply #77 on: 13:11, 16 June 19 »
Corrections pushed :
- Solve incompatibility between cpct_keyId enum and typedef
- Update String functions for cpctelera 1.5 API
- Correction in String functions (wrong character could be displayed and mode 2 Space character was not drawn)
- Minor corrections

Thanks a lot for reporting @awergh  :)