22 January 2018, 20:28 | #81 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
In 15.16 binary....
Code:
2.9 is 10.1110011001100110 2.89999 is 10.1110011001100110 2.900001 is also 10.1110011001100110 |
23 January 2018, 09:24 | #82 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
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 | |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Quote:
|
|
23 January 2018, 10:57 | #84 | |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,213
|
Quote:
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 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
I think you are right - I'll use a NewType then.
|
23 January 2018, 20:05 | #86 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
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 | ||
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Quote:
Quote:
|
||
23 January 2018, 23:47 | #88 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
|
24 January 2018, 00:35 | #89 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
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 |
24 January 2018, 22:08 | #90 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
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 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
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 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
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 |
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 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
Thanks !!!
|
25 January 2018, 22:59 | #95 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
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 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
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 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
I don't see any gray colour.
|
27 January 2018, 00:26 | #98 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
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 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
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 I know it is talking about PORTSIGBIT - how to fix it? Thanks |
28 January 2018, 00:01 | #100 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
Funny, that compiles for me in Blitz 2.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blitz basic 2 Help | Havie | Coders. Blitz Basic | 30 | 08 September 2013 09:15 |
blitz basic | petza | request.Apps | 11 | 08 April 2007 01:49 |
Blitz Basic 2 anyone? | jobro | request.Apps | 12 | 28 November 2005 18:15 |
Blitz Basic StopCD32 | Tony Landais | Coders. General | 2 | 08 May 2003 22:51 |
Blitz Basic 2 | LaundroMat | Retrogaming General Discussion | 5 | 24 July 2001 08:10 |
|
|