jbs30000 #1 Posted November 13, 2010 I decided to rewrite my Super Mario program because the code desperately needs to be cleaned up. So first I made definitions for all of the variables of "a". Then, in order to make things look neater, I put them in a file named SMarioM.h and put the file in the bB\includes folder. I then put include SMarioM.h in my main program. When I compile it seems to be OK, but if I try to use any of the definitions they aren't recognized, so obviously my include file isn't be read. Here's what my main code looks like: rem Rebuilding Super Mario Bros with hopefully better code. include div_mul.asm set kernel_options player1colors pfcolors no_blank_lines set romsize 32kSC const pfres=32 set smartbranching on rem ************************************************************************************************** rem * This file uses all the bits in variable "a" to set or check on various attributes about Mario. * rem ************************************************************************************************** include SMarioM.h bank 2 bank 3 bank 4 bank 5 bank 6 bank 7 bank 8 Quote Share this post Link to post Share on other sites
jbs30000 #2 Posted November 13, 2010 I should also note that I played with the path, even putting in include c:\Atari2600\bB\includes\SMarioM.h It still doesn't work. Quote Share this post Link to post Share on other sites
+batari #3 Posted November 13, 2010 What does SMarioM.h contain? If it contains the original bB dims, it won't work - typically .h files contain assembler-friendly equates. However, there is an automatically generated file called 2600basic_variable_redefs.h that contains the dims converted to equates, among some other things. You can pull just the converted equates you need out of the generated 2600basic_variable_redefs.h and make the SMarioM.h out of them. Make you sure only pull out the converted equates or you might get errors. They should be fairly simple to identify. Quote Share this post Link to post Share on other sites
jbs30000 #4 Posted November 13, 2010 They're all defs Here are a few lines of code rem ************************************************** rem * Make or check if Mario is small or large. * rem ************************************************** def Shrink_Mario=a{0}=0 def Mario_is_Small=!a{0} def Grow_Mario=a{0}=1 def Mario_is_Large=a{0} Quote Share this post Link to post Share on other sites
+batari #5 Posted November 13, 2010 Defs must be in the .bas file. There is currently no way around that. Quote Share this post Link to post Share on other sites
jbs30000 #6 Posted November 13, 2010 OK, thank you for the information. It's good to know. I tried changing the extension of my include file to bas, but that didn't work either. No big deal, I just wanted my program to look a little less crowded. Quote Share this post Link to post Share on other sites