A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »[App] HSPP - Halo Script Preprocessor

Author Topic: [App] HSPP - Halo Script Preprocessor (24 messages, Page 1 of 1)
Moderators: Dennis

kornman00
Joined: Jul 15, 2010


Posted: Dec 9, 2012 09:52 PM    Msg. 1 of 24       
Download here

HSPP is a C-like preprocessor for .hsc files based on GPP (http://en.nothingisreal.com/wiki/GPP)

Usage: hspp [infile] [outfile]

Example: hspp a10.hs a10.hsc
It doesn't care what the file extensions are. However, I recommend using ".hs" for files which contain preprocessor directives so that the HEK doesn't get a taste of them. Then use ".hsc" for your output files, for obvious reasons.

A full list of supported macros can be found here under the "META-MACROS" heading.


The plan is to fully integrate this into the next release of OpenSauce so that it's all transparent. Because of this, I won't be supporting hspp.exe after today so that work on OS isn't interrupted. Until then, feel free to use this to preprocess your scripts before compiling them with Sapien!


Example setup:
include.hs

(script stub unit player1
(unit (list_get (players) 1))
)


example.hs

#define DEFINE_VECTOR(name) \
(global real #1_x 0) \
(global real #1_y 0) \
(global real #1_z 0)

#ifdef DEBUG
; *****************************************************************
; * DEBUG BUILD *
; *****************************************************************
#else
; *****************************************************************
; * RELEASE BUILD *
; *****************************************************************
#endif

(script stub unit player0
(unit (list_get (players) 0))
)

#include "include.hs"

;(global real temp_x 0)
;(global real temp_y 0)
;(global real temp_z 0)
DEFINE_VECTOR(temp)



hspp example.hs example.hsc

example.hsc




; *****************************************************************
; * RELEASE BUILD *
; *****************************************************************


(script stub unit player0
(unit (list_get (players) 0))
)

(script stub unit player1
(unit (list_get (players) 1))
)

;(global real temp_x 0)
;(global real temp_y 0)
;(global real temp_z 0)
(global real temp_x 0) (global real temp_y 0) (global real temp_z 0)



Jesse
Joined: Jan 18, 2009

Discord: Holy Crust#4500


Posted: Dec 9, 2012 09:59 PM    Msg. 2 of 24       
post


SilentJacket
Joined: Jun 9, 2012

-Did I miss something?-


Posted: Dec 9, 2012 10:04 PM    Msg. 3 of 24       
holy cow, your back

what does a preprocessor do?


killzone64
Joined: Jun 9, 2010

Mostly active on discord


Posted: Dec 9, 2012 10:31 PM    Msg. 4 of 24       
ahh nice to see you back kornman, but what is it that the preprossessor does.

and any new juicy updates for the new opensauce.


HaloExtreme117
Joined: May 5, 2012

~Gone~


Posted: Dec 9, 2012 11:05 PM    Msg. 5 of 24       
Quote: --- Original message by: killzone64
but what is it that the preprossessor does

Quote: --- Original message by: SilentJacket
what does a preprocessor do?

Oh god, I can't be the only programmer here that isn't Korn.
http://en.wikipedia.org/wiki/Preprocessor


SilentJacket
Joined: Jun 9, 2012

-Did I miss something?-


Posted: Dec 9, 2012 11:06 PM    Msg. 6 of 24       
Quote: --- Original message by: HaloExtreme117
Quote: --- Original message by: killzone64
but what is it that the preprossessor does

Quote: --- Original message by: SilentJacket
what does a preprocessor do?

Oh god, I can't be the only programmer here that isn't Korn.
http://en.wikipedia.org/wiki/Preprocessor


hey, I just draw


HaloExtreme117
Joined: May 5, 2012

~Gone~


Posted: Dec 10, 2012 12:29 AM    Msg. 7 of 24       
Quote: --- Original message by: reeiiko15
Quote: --- Original message by: HaloExtreme117
Quote: --- Original message by: killzone64
but what is it that the preprossessor does

Quote: --- Original message by: SilentJacket
what does a preprocessor do?

Oh god, I can't be the only programmer here that isn't Korn.
http://en.wikipedia.org/wiki/Preprocessor
I'm a programmer and I haven't heard the term "preprocessor" before. Not every programmer knows everything about programming.

If you know any C-based languages you'd know the term - it's a pretty vital term.


kornman00
Joined: Jul 15, 2010


Posted: Dec 10, 2012 01:34 AM    Msg. 8 of 24       
Back? I never left :p. Unless you meant halomaps. In which case, I'm only visiting this part of town.

The next release of OS will be big (and is coming soon!). Big improvements, and big additions, and of course bug fixes. Hopefully the community's interest will continue, as we still have some more big ideas for an additional major release following it. But I'll save the details for another day.
Quote: --- Original message by: HaloExtreme117
If you know any C-based languages you'd know the term - it's a pretty vital term.

Yeah, I thought "HSPP is a C-like preprocessor for .hsc files" would be a give-away to that, but I guess not. Hell, even C# has a rudimentary preprocessor (which was what I was going to implement in the event that this didn't work out). But if someone just stuck their nose in a *barf* Java book and didn't do anything to try and expand their horizons, they would be in the dark when it came to preprocessors.


Masters1337
Joined: Mar 5, 2006

halonaminator's unfortunate idol


Posted: Dec 10, 2012 01:35 AM    Msg. 9 of 24       
This converts H4 scripts to CE amirite?


HaloExtreme117
Joined: May 5, 2012

~Gone~


Posted: Dec 10, 2012 01:37 AM    Msg. 10 of 24       
Quote: --- Original message by: Masters1337
This converts H4 scripts to CE amirite?

No.

Quote: --- Original message by: kornman00
Back? I never left :p. Unless you meant halomaps. In which case, I'm only visiting this part of town.

The next release of OS will be big (and is coming soon!). Big improvements, and big additions, and of course bug fixes. Hopefully the community's interest will continue, as we still have some more big ideas for an additional major release following it. But I'll save the details for another day.
Quote: --- Original message by: HaloExtreme117
If you know any C-based languages you'd know the term - it's a pretty vital term.

Yeah, I thought "HSPP is a C-like preprocessor for .hsc files" would be a give-away to that, but I guess not. Hell, even C# has a rudimentary preprocessor (which was what I was going to implement in the event that this didn't work out). But if someone just stuck their nose in a *barf* Java book and didn't do anything to try and expand their horizons, they would be in the dark when it came to preprocessors.

Please don't mention that horrible, horrible disgraceful language. Just thinking about it is sickening.


HaloExtreme117
Joined: May 5, 2012

~Gone~


Posted: Dec 10, 2012 01:46 AM    Msg. 11 of 24       
Quote: --- Original message by: reeiiko15
Quote: --- Original message by: HaloExtreme117
Quote: --- Original message by: reeiiko15
Quote: --- Original message by: HaloExtreme117
Quote: --- Original message by: killzone64
but what is it that the preprossessor does

Quote: --- Original message by: SilentJacket
what does a preprocessor do?

Oh god, I can't be the only programmer here that isn't Korn.
http://en.wikipedia.org/wiki/Preprocessor
I'm a programmer and I haven't heard the term "preprocessor" before. Not every programmer knows everything about programming.

If you know any C-based languages you'd know the term - it's a pretty vital term.
I've only gotten into programming recently and only currently know visual basic.

That's understandable - welcome to programming.
If you ever need any help, send me a PM over and I'll be happy to assist.


OpsY
Joined: Feb 19, 2007

Frobisher Bay


Posted: Dec 10, 2012 03:14 PM    Msg. 12 of 24       
Hey Kornmann, again thanks for your contribution to this community.

Secondly, I know this has been asked - and denied - before; will the next OS be xFire compatible? Personally it's the one thing keeping me away from it... and god knows I could use the additional polies. Thing is, we know many people are also in that case. xFire is the most popular communication tool around Halo and having to disable it while in game is some of an issue.

Isn't there a way both programs work in parallel? I know the hook is similar but I still can't believe there isn't a work around.


The Lodeman
Joined: Sep 16, 2012

Hipster Lodeman: Enjoyed goats before it was cool.


Posted: Dec 10, 2012 03:48 PM    Msg. 13 of 24       
This would have been handy during my HEK carreer.
Cool app, hope the current and aspiring HEK scripters enjoy this.


Xiao
Joined: Nov 14, 2012

Keiichi-kun o mitsuketa.


Posted: Dec 10, 2012 03:48 PM    Msg. 14 of 24       
Rename xfire to zfire. Disable ingame overlay. Done.


Jaz
Joined: Mar 21, 2010

[Insert sarcastic comment here]


Posted: Dec 10, 2012 04:00 PM    Msg. 15 of 24       
Quote: --- Original message by: Xiao
Rename xfire to zfire. Disable ingame overlay. Done.


The ignorance of those who make suggestions like that baffles me.

"having to disable it while in game is some of an issue."


Xiao
Joined: Nov 14, 2012

Keiichi-kun o mitsuketa.


Posted: Dec 10, 2012 05:10 PM    Msg. 16 of 24       
Better than not having xfire work at all. Windowed mode and alt tabbing is better than nothing.

Jaz the sassy pants.


Jaz
Joined: Mar 21, 2010

[Insert sarcastic comment here]


Posted: Dec 10, 2012 05:23 PM    Msg. 17 of 24       
Quote: --- Original message by: Xiao
Better than not having xfire work at all. Windowed mode and alt tabbing is better than nothing.

Jaz the sassy pants.


Having an in-game overlay is better than nothing. Windowed mode and alt tabbing has to compete with nothing. (Can cause glitches)

So I'm looking forward to the next version of OS if it's compatible with Xfire.


HaloExtreme117
Joined: May 5, 2012

~Gone~


Posted: Dec 10, 2012 05:27 PM    Msg. 18 of 24       
Quote: --- Original message by: Jaz
Quote: --- Original message by: Xiao
Better than not having xfire work at all. Windowed mode and alt tabbing is better than nothing.

Jaz the sassy pants.


Having an in-game overlay is better than nothing. Windowed mode and alt tabbing has to compete with nothing. (Can cause glitches)

So I'm looking forward to the next version of OS if it's compatible with Xfire.

'Tis compatible. Sync the OS codebase, build it under Visual C++ 2008, move the built files into the CE directory. No need to wait for a release, the latest source is available online.


kornman00
Joined: Jul 15, 2010


Posted: Dec 10, 2012 06:48 PM    Msg. 19 of 24       
A full installer has to be built, you can't just build with VC++ (it's not all just pure C++) and move the exes around. And the current code is still very much WIP. Which is why we haven't released yet. We could end up changing tag definitions between now and the next official release, or a bad build could FUBAR your tags. The only people who should be messing with the the latest changeset of OS are actual programmers.

Also, Steam has an in-game overlay and works with Halo.


Dumb AI
Joined: Sep 18, 2011

Dead.


Posted: Dec 10, 2012 08:14 PM    Msg. 20 of 24       
Aren't experienced programmers the only ones who should do that?

Anybody can learn programming.


Banshee64
Joined: Dec 4, 2012

oify


Posted: Dec 10, 2012 11:47 PM    Msg. 21 of 24       
I run xfire in a virtual machine, but I guess that's only useful on a multi-monitor setup.

Xfire messes with a lot of things, and breaks a lot of games if you run steam, and for me steam is more important.


HaloExtreme117
Joined: May 5, 2012

~Gone~


Posted: Dec 11, 2012 12:35 AM    Msg. 22 of 24       
Quote: --- Original message by: kornman00
A full installer has to be built, you can't just build with VC++ (it's not all just pure C++) and move the exes around.
I know, I assumed that anyone building OS would have read the wiki notes first.
And the current code is still very much WIP. Which is why we haven't released yet. We could end up changing tag definitions between now and the next official release, or a bad build could FUBAR your tags. The only people who should be messing with the the latest changeset of OS are actual programmers.
I'm a programmer. Come at me bro.
Also, Steam has an in-game overlay and works with Halo.


kornman00
Joined: Jul 15, 2010


Posted: Dec 11, 2012 05:25 AM    Msg. 23 of 24       
I would assume people would read a lot of things, yet people seem to still run past even readme.txt's
Quote: --- Original message by: goldkilla88
...hopefully the new version will fix this stupid OS Sapien bug.

If you have an OS-specific bug, submit a report using our Issues system: http://code.google.com/p/open-sauce/issues/list


nihao123456ftw
Joined: Mar 24, 2012


Posted: Dec 11, 2012 10:55 PM    Msg. 24 of 24       
Quote: --- Original message by: reeiiko15
Quote: --- Original message by: waffles
Kirby pointed me to pidgin, which i've used since then, it supports tons of im providers, including xfire. Never used the overlay ingame anyway *shrug*.
Pidgin is horrible and buggy. It once deleted half my Xfire friends for no reason.


Another solution is Raptr, but it is no way near as useful as xfire. It has an in-game overlay that's compatible with OS but it doesn't work in haloce (overlay works but cannot click anything)

 

 
Previous Older Thread    Next newer Thread







Time: Tue September 24, 2019 6:03 AM 266 ms.
A Halo Maps Website