Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: crash in a simple function... [Re: Ottawa] #151604
09/04/07 23:39
09/04/07 23:39
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
I only have SED open, and It wasn't dropping in FPS before I had the dragging window function. I even tried removing my inkey function; no luck.

And I can't run my script from WED; I still have the A6 WED, but I have the free Lite-C SED.

Maybe it should be int main()? I'm really lost here.

Last edited by MrCode; 09/04/07 23:41.

Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: crash in a simple function... [Re: MrCode] #151605
09/05/07 16:17
09/05/07 16:17
Joined: Mar 2007
Posts: 75
Hamburg, Ger
Altimeter Offline
Junior Member
Altimeter  Offline
Junior Member

Joined: Mar 2007
Posts: 75
Hamburg, Ger
Maybe it helps for debugging to separate the inkey loop (it is a loop internally that waits for inputs) from your dragging loop.
Do one thing after the other, if you can afford that.
Something like

inkey(type_string);
while (type_string == NULL){wait(1);}
//programm reaches this point only after inkey has ended
while(1)
{
mouse_pos.x= mouse_cursor.x;
mouse_pos.y= mouse_cursor.y;
wait(1);
}

This should at least give you some information, whether your framerate still drops (if so, it is not because of interference of inkey and dragging).

Re: crash in a simple function... [Re: Altimeter] #151606
09/05/07 18:33
09/05/07 18:33
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
But I've gotten rid of the dragging loop (I couldn't get it to work by taking a parameter). I also tried removing inkey();. It's still running at 40 FPS.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: crash in a simple function... [Re: MrCode] #151607
09/06/07 06:34
09/06/07 06:34
Joined: Sep 2003
Posts: 928
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 928
I dont think that your loops or inkey or whatever can reduce your frame rate but maybe you have a "fps_max" setting somewhere in your script?

Re: crash in a simple function... [Re: Spirit] #151608
09/06/07 22:57
09/06/07 22:57
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Nope, no fps_max.

Re: crash in a simple function... [Re: MrCode] #151609
09/18/07 04:24
09/18/07 04:24
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Hey, I just figured it out! It's because I was using a TTF font for my inkey line.

I don't know why it makes things so slow, but that's what was causing the FPS drop.


Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: crash in a simple function... [Re: MrCode] #151610
09/19/07 04:42
09/19/07 04:42
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
anyone know why Lite-C has such trouble with TTFs?

It really sucks to have to use the few and cruddy bmap fonts that I have (I've used TTFs so many times before with C-Script, so why bother with looking for bmaps?). Does anyone have/know of any good bitmap fonts anywhere? Unfortunately, I can't pay ca$h, so I'm looking for free ones.

Also, I want to be able to change the color. Can anyone tell me if there's a way to do this with bmap fonts? (red/green/blue= n doesn't work)

Last edited by MrCode; 09/19/07 04:55.
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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