English Amiga Board Blitz Basic Questions
 Register Amiga FAQ Rules & Help Members List  /  Moderators List Today's Posts Mark Forums Read

 22 January 2018, 20:28 #81 E-Penguin Banana   Join Date: Jul 2016 Location: Darmstadt Posts: 805 In 15.16 binary.... Code: ``` 2.9 is 10.1110011001100110 2.89999 is 10.1110011001100110 2.900001 is also 10.1110011001100110``` It's not possible to express 0.9 exactly as a binary fraction.
 23 January 2018, 09:24 #82 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 It means I just have to throw away my brilliant idea and find another solution. I wanted to use only one number to keep ID of a cell + direction (direction was supposed to be after a comma - a number from numeric keyboard layout). Now I'm going to multiple direction number by 1000 and add to cell's ID (which is always less then 1000). Thanks
23 January 2018, 09:42   #83
idrougge
Registered User

Join Date: Sep 2007
Location: Stockholm
Posts: 3,793
Quote:
 Originally Posted by E-Penguin Am I relying too much on the processor? My Plan B is to draw to a bitmap, cut out shapes and then QBlit those, but, surely, the 2d drawing functions should be able to handle more than 6 polygons? Any 3d game must be doing more than that, and I'm not dealing with a z-axis at all.
Check the original examples directory, it has some polygon examples.

23 January 2018, 10:57   #84
E-Penguin
Banana

Join Date: Jul 2016
Posts: 805
Quote:
 Originally Posted by peceha Now I'm going to multiple direction number by 1000 and add to cell's ID (which is always less then 1000).
The 68000 has no hardware multiplier (afaik), and no hardware divider. If you really wanted to pack data in, you'd be better off doing something with bit shifts and bit masks.

Eg, if your ID is always <1000, you can use the first 10 bits of a 16-bit word (up to 1024), and the remaining 6 bits (64) as other stuff.

Then:
combo_word = (direction LSL 10) | id
id = combo_word & \$03FF
direction = combo_word LSR 10

Although, frankly, you're probably better off creating a NewType with two members.

 23 January 2018, 13:19 #85 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 I think you are right - I'll use a NewType then.
 23 January 2018, 20:05 #86 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 Hi is there a way to make a variable global? I would like to avoid "SHARED" statements inside all the procedures. Thanks
23 January 2018, 23:43   #87
idrougge
Registered User

Join Date: Sep 2007
Location: Stockholm
Posts: 3,793
Quote:
 Originally Posted by E-Penguin The 68000 has no hardware multiplier (afaik), and no hardware divider. If you really wanted to pack data in, you'd be better off doing something with bit shifts and bit masks. combo_word = (direction LSL 10) | id id = combo_word & \$03FF direction = combo_word LSR 10
Note that long shifts on the plain 68000 also cost quite a bit. The max size for an immediate shift is 8, so if you do it with 10, it will cost either two shifts or one register. The number of steps also add up to the final cycle count, so that LSL 3 costs half as much as LSL 6.

Quote:
 Originally Posted by E-Penguin Although, frankly, you're probably better off creating a NewType with two members.
Indeed.

23 January 2018, 23:47   #88
idrougge
Registered User

Join Date: Sep 2007
Location: Stockholm
Posts: 3,793
Quote:
 Originally Posted by peceha Hi is there a way to make a variable global? I would like to avoid "SHARED" statements inside all the procedures.
No.

 24 January 2018, 00:35 #89 Daedalus Registered User   Join Date: Jun 2009 Location: Dublin, then Glasgow Posts: 4,011 AmiBlitz 3 allows you to declare global variables by using the SHARED keyword outside the procedures: Code: ```SHARED test.b test = 10 Statement printtest{} NPrint test End Statement printtest{} End``` But of course comes with its own restrictions (FPU dependency, IDE requirements etc.).
 24 January 2018, 22:08 #90 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 This time I have a question about SuperTed I opened the PREFS - changed the colors number to 16 (I think I also unchecked TOKENISE - btw. I do not know what it is for) and saved the configuration. Now whenever I open SuperTed and load something I cannot see any text - I know it is there (scrollbar's size changes and I can even compile it ) - I just cannot see it. How to fix it? EDIT ehh... forget it - the colors got changed when I played with screen modes. Last edited by peceha; 24 January 2018 at 22:56.
 25 January 2018, 12:13 #91 Daedalus Registered User   Join Date: Jun 2009 Location: Dublin, then Glasgow Posts: 4,011 Yep, it sounds like the foreground and background colours ended up being the same. Tokenizing is when Blitz recognises a keyword and changes its colour to show you that it has understood. If you turn it off, SuperTED is essentially just a text editor. This option is to allow you to edit normal text files without having it capitalise certain words.
 25 January 2018, 21:03 #92 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 Thanks again Daedalus If there is still someone willing to answer I have another one: I'd like to load some shapes from IFF picture (16x16 tiles). Can I have all of them in one picture or I need to have one tile per picture?
 25 January 2018, 22:03 #93 TurboCrash Registered User   Join Date: Dec 2015 Location: Lisbon/Portugal Posts: 51 One picture is enough, remember that the first color in the palette is the alpha/transparent color. So if using more than one palette it should be easier to divide graphics at least by palette. LoadBitmap 1,"images.iff" GetaShape 1,0,0,16,16 GetaShape 2,0,16,16,16 That's GetaShape Shapenumber, start at X, start at Y, get Xpixels, get Ypixels
 25 January 2018, 22:11 #94 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 Thanks !!!
 25 January 2018, 22:59 #95 idrougge Registered User   Join Date: Sep 2007 Location: Stockholm Posts: 3,793 If you draw them in one picture and surround each shape with a box, you can auto-grab them using RedShapeZ. It's part of the Blitz Support Suite and is installed automatically with the Ultimate Blitz CD. Just make sure you save them in the "Acid shapes" format.
 26 January 2018, 16:37 #96 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 Hi, please take a look at the picture. [/url] On the left you can see my tileset (yes, I know ) and on the right you can see how it looks when the program runs. Why do I have that gray color at all???? Gray color is not used in my tileset - I mean it is part of the palette but it is not used in drawing. Funny thing is some tiles are half gray - half black or even white I run it on WB in default 4 colors. My tileset is an IFF image with 4 colors palette (same as WB and in the same order). What am I doing wrong?
 27 January 2018, 00:14 #97 idrougge Registered User   Join Date: Sep 2007 Location: Stockholm Posts: 3,793 I don't see any gray colour.
 27 January 2018, 00:26 #98 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 You need to zoom in a little. Then just look on the walls (should be black) but they are gray in some places. Same happens to "dots" -mostly are white but on some tiles they are grey. Also small "squares" in the middle of the tiles: should be white and black (as on the left picture) but they have some gray color in it.
 27 January 2018, 20:52 #99 peceha Registered User   Join Date: Dec 2017 Location: Poland Age: 43 Posts: 141 Just one more This one has nothing to do with my previous question. I found an example of doing a commodity. When I type it into AmiBlitz - all works fine. When I type it into Blitz2, the following line gives me an error: Code: `AddWaitEvent PortSigBit(CommodityMsgPort),\$800000` saying that "array not yet Dim'd" I know it is talking about PORTSIGBIT - how to fix it? Thanks
 28 January 2018, 00:01 #100 idrougge Registered User   Join Date: Sep 2007 Location: Stockholm Posts: 3,793 Funny, that compiles for me in Blitz 2.

 Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 Similar Threads Thread Thread Starter Forum Replies Last Post Havie Coders. Blitz Basic 30 08 September 2013 09:15 petza request.Apps 11 08 April 2007 01:49 jobro request.Apps 12 28 November 2005 18:15 Tony Landais Coders. General 2 08 May 2003 22:51 LaundroMat Retrogaming General Discussion 5 24 July 2001 08:10

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News Main     Amiga scene     Retrogaming General Discussion     Nostalgia & memories Support     New to Emulation or Amiga scene         Member Introductions     support.WinUAE     support.WinFellow     support.OtherUAE     support.FS-UAE         project.AmigaLive     support.Hardware         Hardware mods         Hardware pics     support.Games     support.Demos     support.Apps     support.Amiga Forever     support.Amix     support.Other Requests     request.UAE Wishlist     request.Old Rare Games     request.Demos     request.Apps     request.Modules     request.Music     request.Other     Looking for a game name ?     Games images which need to be WHDified abime.net - Hall Of Light     HOL news     HOL suggestions and feedback     HOL data problems     HOL contributions abime.net - Amiga Magazine Rack     AMR news     AMR suggestions and feedback     AMR data problems     AMR contributions abime.net - Home Projects     project.Amiga Lore     project.EAB     project.IRC     project.Mods Jukebox     project.Wiki abime.net - Hosted Projects     project.aGTW     project.APoV     project.ClassicWB     project.Jambo!     project.Green Amiga Alien GUIDES     project.Maptapper     project.Sprites     project.WinUAE - Kaillera Other Projects     project.Amiga Demo DVD     project.Amiga Game Factory     project.CARE     project.EAB File Server     project.CD32 Conversion     project.Game Cover Art         GCA.Feedback and Suggestions         GCA.Work in Progress         GCA.Cover Requests         GCA.Usefull Programs         GCA.Helpdesk     project.KGLoad     project.MAGE     project.Missing Full Shareware Games     project.SPS (was CAPS)     project.TOSEC (amiga only)     project.WHDLoad         project.Killergorilla's WHD packs Misc     Amiga websites reviews     MarketPlace         Swapshop     Kinky Amiga Stuff     Collections     EAB's competition Coders     Coders. General         Coders. Releases         Coders. Tutorials     Coders. Asm / Hardware     Coders. System         Coders. Scripting         Coders. Nextgen     Coders. Language         Coders. C/C++         Coders. AMOS         Coders. Blitz Basic     Coders. Contest         Coders. Entries Off Topic     OT - General     OT - Entertainment     OT - Sports     OT - Technical     OT - Gaming

All times are GMT +2. The time now is 19:28.

 -- EAB3 skin ---- EAB2 skin ---- Mobile skin Archive - Top