Gamestudio Links
Zorro Links
Newest Posts
StartWeek not working as it should
by jcl. 04/20/24 08:38
Data from CSV not parsed correctly
by jcl. 04/20/24 08:32
Zorro FIX plugin - Experimental
by jcl. 04/20/24 08:30
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (7th_zorro, Aku_Aku, henrybane, flink, 1 invisible), 739 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392213
01/20/12 10:43
01/20/12 10:43
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
My project is currently unaivalable for Download. Since yesterday, Megaupload is no more. So i'll have to reupload the project this evening to another hoster.


Greetings
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392258
01/20/12 19:18
01/20/12 19:18
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Download available again on my Blog(still in progress).
Updated MainPost.


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392325
01/21/12 18:04
01/21/12 18:04
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Today, i added the possibillity to define global vars, as you do in LiteC.

Code:
int Foo;
....

void main()
{
  Foo = 5;
}



It took some time, because when i wrote the parsing for methods/functions i didnt implement something to stop earlier in case its just a global var. so i had to restructure those functions. What a mess grin


Last edited by Rackscha; 01/21/12 18:04.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392450
01/22/12 19:33
01/22/12 19:33
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Okay, since today its possible to use:

global fcuntion dummies
Structs
lazy enums

The enums are a bit special, thats why i call them "lazy" enums.

you declare them like this:
Code:
enum ETest = { Alpha, Beta, Sonstwas};



1) you cant define custom values at the moment
2) every enum value is unique inside an enum declaration

output is like this:
Code:
#define ETest int
#define Alpha 0
#define Beta 1
#define Sonstwas 2



So as you can see, if you cant hold back yourself, you can abuse them very easy wink. But this should be better to programm and read(if used properly).

And i have something else in my mind, however one question first:

Is it possible to define a SET in C++ which has multiple states?(so in fact flags).

Greetings
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392745
01/26/12 20:45
01/26/12 20:45
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Today i played around with analysing function code. First result:

We have warnings for (possible) missing returns grin


Since the way iam doing it, is very lazy and simple, the last function will throw the same error even if the condition has an "else" statement with a valid return(so in fact, return is always guranteed).

Greetings
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392811
01/27/12 21:29
01/27/12 21:29
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
BIG SUCCESS this evening.
This is obsolete:
Code:
...
Instance.Method(Instance);
...



Finally this is possible:

Code:
Instance.Method();



Compiler now detects method calls and add the required Instancepointer WHOHOO grin

Input:
Code:
...
CTestClass* LClass;

void main()
{
    STRING* LNumber = str_create("hi");
    LClass = _CTestClass();
    LClass.LField.Test();
    while(key_enter == 0)
    {
        draw_text(LClass.ClassName, 20, 20, vector(100, 100, 100));
        draw_text(LClass.ClassParentName, 20, 80, vector(100, 100, 100));
        str_for_int(LNumber, LClass.GetNumber());
        draw_text(LNumber, 20, 100, vector(100, 100, 100));
        wait(1);
    }
    delete(LClass);
    ptr_remove(LNumber);
}



output:
Code:
CTestClass* LClass;


void main()
{

    STRING* LNumber = str_create("hi");
    LClass = _CTestClass();
    LClass.LField.Test(LClass.LField);
    while(key_enter == 0)
    {
        draw_text(LClass.ClassName, 20, 20, vector(100, 100, 100));
        draw_text(LClass.ClassParentName, 20, 80, vector(100, 100, 100));
        str_for_int(LNumber, LClass.GetNumber(LClass));
        draw_text(LNumber, 20, 100, vector(100, 100, 100));
        wait(1);
    }
    delete(LClass);
    ptr_remove(LNumber);
}



Greetings
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392835
01/28/12 14:45
01/28/12 14:45
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
New release:
V0.4
- You can define Global vars
- You can define global function dummies
- You can define structs (its yet not possible to define values at the end)
- You can define (lazy) enums. You cant set custom values. Each value in an enum is unique
- New warnings for possible wrong/missing return statements
- You dont have to add the instancepointer to the method call manually anymore. Its automatic^^
- super() is obsoleted. You can finally use ParentClass:ParentMethod() to call methods from a parentclass
- Showing alternative matchind identifier(not yet used everywhere)
- Showing LiteC Errors correctly in log

Download link in mainpost.

Development of this project will slowdown a bit, because i want to start a real project using my precompiler to find busg and problems. If you find bugs/problems please tell me. I cant find all of them myself^^"

Greetings
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392842
01/28/12 16:29
01/28/12 16:29
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
in V0.4 i found a bug with auto adding the Instancepointer to a methodcall. It didnt ignore strings(oops).
This is fixed and will be included in a later update.

And i added the possibillity to use comments(single and multiline comments).
They are just striped out and not included in the output.

Greetings
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392907
01/29/12 15:20
01/29/12 15:20
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
yay, using private/protected/public in class-definition makes sense now^^.

Compiler uses accesspecifier now(and their restrictions).

so:

Code:
class CFoo()
  private:
  int FFoo;
  public
  int ForAll;
};



truly influences compiler now. FFoo can only be accessed when inside a method of this class. Public is accessible to all. Proteced is accessible to the same class and classes derived from it.

If you try to acces a member without the correct permission(i.e. accessing private, while only allowed accesing public) you get an error.

Greets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Genesis "Precompiler" (prototype) [Re: Rackscha] #392908
01/29/12 15:33
01/29/12 15:33
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Although I'm not a huge fan of OPP (at least from Java), I must say you make impressive progress!


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Page 2 of 3 1 2 3

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