Jump to content


  • Content Count

  • Joined

Community Reputation

99 Excellent


About Lillapojkenpåön

  • Rank
    Chopper Commander

Recent Profile Visitors

4,074 profile views
  1. I forgot to say THANKS! that worked great! I'm working on a bB kernel, but the code (level data, logic etc.) in bB needs to end up in different places in the kernel, are there any preprcessor commands that can change where code ends up? or a way to split up the generated assembly from bB to different parts? The DPCplus include file has this bB.asm ; DPC frequencies DPC_waveforms.asm ; rest of bB stuff, ending with graphics bB2.asm but I can't find how it's split into two parts?
  2. Will it be recorded? I really need to learn how to use that thing
  3. Is it possible for you to add the possibility to include text documents that aren't assembly files in bB? I would like to split my code up into different files so I can have them open in different windows and include them in the main source that I compile. Example: include "init.bas" or include "init.txt" or whatever only this works asm include "init.asm" end I tried to do that and put another end at the beginning and asm at the end of the included file but didn't work, maybe there is a way allready? Or else I request it 😀
  4. gosub bB gosub __MySubroutine ; jumps to MySoubroutine rem put outside of code __MySubroutine rem code block return function C/C++ void MyFunction(); // function prototype, needed for the compiler if you want to put the function below where it's being called from // you could put the function here and remove the prototype // we jump from the main function to MyFunction // variables are only locally known to the function they are defined in // to create a global variable that can be accessed by any function define it here outside of any function int main() { MyFunction(); // jumps to MyFunction } void MyFunction() // function declaration { //code block }
  5. on...goto bB dim _Counter = a on _Counter goto __case_1 __case_2 __case_3 __case_4 __case_5 __case_6 __case_7 goto __break ; if _Counter > 6 __case_1 rem code block goto __break __case_2 rem code block goto __break __case_3 rem code block goto __break __case_4 rem code block goto __break __case_5 rem code block goto __break __case_6 rem code block goto __break __case_7 rem code block __break switch C/C++ int _Counter; switch (_Counter) { case 1: // code block break; case 2: // code block break; case 3: // code block break; case 4: // code block break; case 5: // code block break; case 6: // code block break; case 7: // code block break; }
  6. For Loop bB dim _LoopCounter = temp5 for _LoopCounter = 0 to 9 player1y[_LoopCounter] = _Y_POS[_LoopCounter] next rem put outside of code data _Y_POS 10, 20, 30, 40, 50, 60, 70, 80, 90 end For Loop C/C++ int _PlayerY[9]; // Create an array of nine integers int _LoopCounter; const int _Y_POS[9] = {10, 20, 30, 40, 50, 60, 70, 80, 90}; // Read-Only array, same as a data table in bB for (_LoopCounter = 0; _LoopCounter < 9; _LoopCounter++) { _PlayerY[_LoopCounter] = _Y_POS[_LoopCounter]; }
  7. Boolean bB def _Aristocrat=a{0} def _Bangladesh=a{1} def _Cola=a{2} def _Didrick=a{3} _Aristocrat=0 _Bangladesh=0 _Cola=1 _Didrick=1 if _Aristocrat && !_Bangladesh then _Cola = 1: _Didrick = 0 if !_Aristocrat && _Bangladesh then _Cola = 0: _Didrick = 1 Boolean C/C++ bool _Aristocrat = false; bool _Bangladesh = false; bool _Cola = true; bool _Didrick = true; if (_Aristocrat && !_Bangladesh) {_Cola = true; _Didrick = false;} if (!_Aristocrat && _Bangladesh) {_Cola = false; _Didrick = true;}
  8. Integer variables bB Dim _Aristocrat = a Dim _Bangladesh = b Dim _Cola = c Dim _Didrick = d _Aristocrat = 0: _Bangladesh = 0: _Cola = 0: _Didrick = 0 if _Aristocrat > _Bangladesh then _Cola = 25: _Didrick = 1 else _Cola = 50: _Didrick = 0 bB Comparison Operators: rem = equal to rem <> not equal rem > greater than rem < less than rem >= greater than or equal to rem <= less than or equal to bB Logical Operators: rem && AND rem || OR rem ! NOT Integer variables C/C++ int _Aristocrat; int _Bangladesh; int _Cola; int _Didrick; _Aristocrat = 0; _Bangladesh = 0; _Cola = 0; _Didrick = 0; if (_Aristocrat > _Bangladesh) {_Cola = 25; _Didrick = 1;} else {_Cola = 50; _Didrick = 0;} C/C++ Comparison Operators: // == equal to // != not equal // > greater than // < less than // >= greater than or equal to // <= less than or equal to C/C++ Logical Operators: // && AND // || OR // ! NOT
  9. I looked into C/C++ a couple days ago and realized how similar it was to bB, I know I'm not the only one who only knows bB so I thought I would share my findings since I found it very inspiring, especially considering SpiceC. I will make different posts with commonly used bB code and it's equivalent in C/C++ and have an index to them here in the first post, and hopefully people chime in with their knowledge, corrections or questions.
  10. Would that be minus? I have a basic loop question, you can use bpl with both x and y right? So if any of them is > 128 it will not loop, is that how it works?
  11. I think he meant that you have to add an extra line in those tables since it never loops on zero so pretend the second line is zero, I think you could just load 64 and dey at the beginning of the loop instead of bottom to keep it the same size
  12. Well I have very little to do so if you want to pm me the bas I'll convert it to dpc+. You dont have to use it, it would just be fun for me
  13. Oh yeah now that you mention it i remember they are over complicated and use pointers and a shared 48pixel subroutine that I never understood myself
  14. Why don't you look at the assembly in one of your many titlescreens? My loop looks like this Ldy #logoheight Logoloop Sta wsync Sty temp1 Lda logo0,y Sta grp0 Lda logo1,y Sta grp1 Lda logo2,y Sta grp0 Ldx logo4,y Lda logo5,y Sta temp2 Lda logo3,y Ldy temp2 Sta grp1 Stx grp0 Sty grp1 Sta grp0 Ldy temp1 Lda logocolor,y Sta colup0 Sta colup1 Dey Bpl Logoloop
  15. Cool game, what if it was called rescue dog and if you get hit and "die" you start controlling The dog and you can run over and jump on The dudes chest and resesitate him, and if the dog gets hit he lays on his back with his legs straight up in The air and you can go and put him up on his legs again, only if both get hit its finito, I would like to see those animations by your friend
  • Create New...