Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


- - - - -

Include files ?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 LDenninger   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 May 2004 - 12:11 PM

Any possibility of getting include-files in AS, or maybe just through a user(coder)-defined callback ? My code could have a callback-function for encountered include-files, performing the task of actually reading the file (the way I like it, just from disk or even from a zip-file or whatever), and passing back the text-buffer... For BeatHarness it would be great, I/people could just make include-files with different graphic effects to be used in all the scripts ! Just rambling here though.. [edited by - LDenninger on May 12, 2004 7:13:38 PM]

Sponsor:

#2 Andreas Jonsson   Moderators   -  Reputation: 3442

Like
Likes
Like

Posted 12 May 2004 - 02:30 PM

Welcome to the forums Led. I've been wondering when you'd show up

Include files would be a task for a pre-processor, which would be a level above AngelScript. Thus I think the best solution is simply to scan the script files, line by line, for any #include directives. When they are encountered the first two characters could be exchanged for '//' making the line a comment. The included files could just be read and added as another script section because order isn't important for AngelScript.

I think this should be a matter of minutes to implement for someone with your skill. Perhaps you would be interesting in making it into a tutorial. That is if you liked the solution.





__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game

[edited by - WitchLord on May 12, 2004 10:11:53 PM]

#3 LDenninger   Members   -  Reputation: 122

Like
Likes
Like

Posted 12 May 2004 - 08:50 PM

Yeah, I figured that much, it''s just that
a) I''m so lazy I hardly make the effort to breathe
b) I don''t have too much time lately

I''ll go for the preprocessor anyway,
''cause I want to get other metadata from my scriptfiles anyway.
(Author, ScriptName, Info)

Anyway, keep up the good work !

#4 Andreas Jonsson   Moderators   -  Reputation: 3442

Like
Likes
Like

Posted 13 May 2004 - 04:27 AM

Yeah, I know how it is. Time is precious.

I would write the pre-processor myself, but I don''t have the time either.

__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS