Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    292
  • comments
    557
  • views
    154361

BF Macro Step One Solution

Sign in to follow this  
TANSTAAFL

94 views

Thinking a bit since my earlier entry...

since the macro handler is much like the C/C++ handler, I thought I might as well just use a C preprocessor, and see where it lead me.

I wound up using the Cybiko preprocessor.

Now I've got a tool that takes the following:

#define SET(x,y) >(x)[-]+(y)<(x)
#define ZERO(x) SET(x,0)
#define POSITIONA 10
#define POSITIONB 12
#define VALUE ~5

ZERO(POSITIONA)
SET(POSITIONB,VALUE)


and converts it to the following:








>(10)[-]+(0)<(10)
>(12)[-]+(~5)<(12)



So, most of the hard part is done... all I need now is to make a tool to take it the rest of the way, and I'm done!
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!