|
Post by salamiboy2 on May 31, 2016 13:12:22 GMT -5
Got it. Also, why isn't my collision code working? It works in BEX. Attachments:game_s.sbs (9.58 KB)
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 31, 2016 13:15:52 GMT -5
Good question. I'll take a peek when I get home (in about 4 hours, have to work some overtime today).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on May 31, 2016 19:33:49 GMT -5
Good grief that was a pain in the rear to troubleshoot www.second-dimension.com/sbasic/Snag the latest patch update and you should be good to go Thanks for posting the issue!
|
|
|
Post by salamiboy2 on Jun 1, 2016 4:59:49 GMT -5
Sorry...found 2 more bugs
* DrawTiles16 routine doesn't work * In the files section of Project Browser, clicking the remove button with nothing selected causes a crash
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 1, 2016 6:07:46 GMT -5
Did you copy the DrawTiles16 routine from Maitrus? It's not built into SecondBASIC. If you did copy and paste it, I'll take a look at what's going on later on tonight when I get home from work.
Good to know about the remove file button.
|
|
|
Post by salamiboy2 on Jun 1, 2016 9:50:11 GMT -5
yup...I did copy-paste it. I've used it in my BEX projects since 2013! (I wish I was never beginnerxorz, I should consider removing my posts when I find the password)
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 1, 2016 11:13:12 GMT -5
Haha gotcha. Alright, I'll see where the problem lies. I may end up just adding it as a regular function while I'm at it since it seems enough people use it
|
|
|
Post by salamiboy2 on Jun 1, 2016 11:45:46 GMT -5
Sounds like a good idea. I kind of got tired with repeatedly copy-pasting it into my projects anyway
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 1, 2016 18:42:18 GMT -5
New update available on the SecondBASIC download page. The issue was with calling ASM subroutines. I also fixed a few other little things as well. Let me know if you run into any more bugs
|
|
|
Post by salamiboy2 on Jun 2, 2016 5:04:44 GMT -5
I'm still getting an error. Removing the comment on the function gives me a "cannot nest functions or subroutines" error and leaving the comment says "you forgot to put )" or something...sorry...
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 2, 2016 8:22:24 GMT -5
Can you check your code again and see if you may have forgotten the proper end sub/function?
Depending on when you snagged the update last night, you may have missed the most recent patch update (I believe it's 2.2.34 now).
If all the above has been checked, I'll take another look tonight (I was working on Harvy last night after the update and everything appeared to be working).
Thanks!
|
|
|
Post by nathan999 on Jul 11, 2016 6:13:02 GMT -5
Hello again. Just downloaded the latest version but it seems that my issue is not yet solved. The compiler doesn't seem to accept inlined assembly when it is inside another structure. For example:
If level = 5 Then If ntscTimings = 1 Then Asm lea XgmNtscFsclear, a1 End Asm Else Asm lea XgmPalFsclear, a1 End Asm End If Else If ntscTimings = 1 Then Asm lea XgmNtscSclear, a1 End Asm Else Asm lea XgmPalSclear, a1 End Asm End If End If The compile complains in every lea and in every "End Asm" line.
I have Asm/End Asm structures before that block of code, but they aren't "at the top level" (outside subs even) and they work. But every Asm/End Asm structure embeded inside another structure seems to fail.
|
|
|
Post by nathan999 on Jul 11, 2016 6:23:13 GMT -5
I've created a very simple test case to show the issue:
'' Very simple test case
Global a As Integer
' This compiles Asm lea someLabel, a1 End Asm
' Call the Sub Call tryMe()
Declare Sub tryMe() ' This won't compile Asm lea someLabel, a1 End Asm If a = 2 Then ' This won't compile, either Asm lea someLabel, a1 End Asm End If End Sub
Asm someLabel: ds.b 16 ; 16 bytes of space. End Asm
Also, regular assembly comments inside nested Asm / End Asm blocks are not recognized, and everything seems to indicate both issues are related:
'' Very simple test case 2
Asm ; This comment seems To be okay For the compiler... End Asm
Declare Sub this() Asm ; This comment is Not. End Asm End Sub
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 11, 2016 7:47:40 GMT -5
Thanks for the heads up Nathan, I'll take care of this today for you I'm heading into the dentist office now, but when I'll make it top priority for when I get home.
|
|
|
Post by nathan999 on Jul 11, 2016 12:06:42 GMT -5
Please do take your time, bro Thanks for your efforts.
|
|