What is low/hight byte?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
What is low/hight byte?
I know how to use moving cameras and stuff, but I couldn't understand waht is those values called "low byte" and "hight byte" that are used by the interpolation points.
I use the tag of the next point in the place of the low bite, and it works. And dont know what could be done with the other value.
What does those values mean?
I use the tag of the next point in the place of the low bite, and it works. And dont know what could be done with the other value.
What does those values mean?
Last edited by Ravick on Mon Sep 19, 2011 9:48 am, edited 1 time in total.
- InsanityBringer
- Posts: 3392
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: What is low/hight byte?
paramaters are restricted to 0-255 in the hexen map format. highbyte is a hack around this. I think the formula is this:
(highbyte * 256) + lowbyte
Someone correct me if I'm wrong, but basically this allows you to use more than 255 tags.
(highbyte * 256) + lowbyte
Someone correct me if I'm wrong, but basically this allows you to use more than 255 tags.
- NeuralStunner
-

- Posts: 12328
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
- Contact:
Re: What is low/hight byte?
IB is correct.
I suspect UDMF ignores high byte (or you just shouldn't use it) - It supports arguments up into tens of thousands, probably many more than you'll need.
I suspect UDMF ignores high byte (or you just shouldn't use it) - It supports arguments up into tens of thousands, probably many more than you'll need.
Re: What is low/hight byte?
Hum... So, if i'm using the Hexen map format, I can use it to save tags, right?
How do I use it? The camera has a tag, and then the interpolation points that follows has just this "hight byte" parameter? I dont need to fill the first one?
How do I use it? The camera has a tag, and then the interpolation points that follows has just this "hight byte" parameter? I dont need to fill the first one?
Re: What is low/hight byte?
You're reading it wrong. It's "High Byte", not hight. Anyway, it's not about saving tags, it's about being able to use them. As the Hexen format only supports arguments up to 255, high byte is used to access tags above that.
Example, you want to access tag 516. You can't put 516 into a single argument, because that's more then 255, so you would divide it into two. Set Low Byte to 4, and High byte to 2. (2 * 256) + 4 = 516.
Example, you want to access tag 516. You can't put 516 into a single argument, because that's more then 255, so you would divide it into two. Set Low Byte to 4, and High byte to 2. (2 * 256) + 4 = 516.
Re: What is low/hight byte?
(Sorry for bumping the topic; But it's my own topic, so I think it's ok...)
I'm trying to use the high bites now. I'm expanding an old Hexen format map; It had 254 tags, and now I want to add a moving camera sequence. I gave the camera the tag 255, and the interpolation point bytes 1 and 1 (1*255+1). Is it right? It didn't work at all. How can I use this feature?
Thanks in advanced.
I'm trying to use the high bites now. I'm expanding an old Hexen format map; It had 254 tags, and now I want to add a moving camera sequence. I gave the camera the tag 255, and the interpolation point bytes 1 and 1 (1*255+1). Is it right? It didn't work at all. How can I use this feature?
Thanks in advanced.
Last edited by Ravick on Sat Jan 28, 2012 7:29 am, edited 1 time in total.
-
disposable_username2
- Posts: 168
- Joined: Tue Mar 08, 2011 1:25 pm
Re: What is low/hight byte?
No. The formula is (highbyte * 256) + lowbyte.Ravick wrote: I gave the camera the tag 255, and the interpolation point bytes 1 and 1 (1*255+1). Is it right?
Re: What is low/hight byte?
The idea is that a byte is the smallest amount of memory a computer can use for a variable. On modern computer architectures, a byte is the same thing as an octet: 8 bits. Each can be 0 or 1, so the value can go from 0000 0000 (0) to 1111 1111 (255).
If you need to have a value higher than 255, then you need two bytes. Then the value can go from 0000 0000 0000 0000 (still 0) to 1111 1111 1111 1111 (65535).
The byte that stores the higher bits is the high byte.
To give an analogy with the decimal system we use in every day life, consider than a digit is the smallest amount of characters with which you can write a number. You have ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. So you can write a value from 0 to 9 in one character. If you want to write a higher value than that, then you'll need more characters. With two, you can write a value from 00 to 99. In that way, you have a "high" character (the first) whose value is worth ten times that of the "low" character. If you want to write ten, you'll use 10. That's 1 times ten plus zero times 1. And in the same way that 10 isn't equal to 9; 0000 0001 0000 0000 isn't equal to 1111 1111 -- instead it's one more.
If you need to have a value higher than 255, then you need two bytes. Then the value can go from 0000 0000 0000 0000 (still 0) to 1111 1111 1111 1111 (65535).
The byte that stores the higher bits is the high byte.
To give an analogy with the decimal system we use in every day life, consider than a digit is the smallest amount of characters with which you can write a number. You have ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. So you can write a value from 0 to 9 in one character. If you want to write a higher value than that, then you'll need more characters. With two, you can write a value from 00 to 99. In that way, you have a "high" character (the first) whose value is worth ten times that of the "low" character. If you want to write ten, you'll use 10. That's 1 times ten plus zero times 1. And in the same way that 10 isn't equal to 9; 0000 0001 0000 0000 isn't equal to 1111 1111 -- instead it's one more.
Re: What is low/hight byte?
Thanks for answering. I got how to make the values, but I still need some help in the practical way to use it
I was trying values of 1 and 1 because the camera tag is 255 (I forgot that the formula uses 256), so I was trying to get "256".
So, now I gave to the "Point" and "High Point" values of the camera respectively "0" and "1". Trying to get 256. But how do I declare to the game that the next interpolation point is "256"?
I tried to give the values of "1" and "1" to the next interpolation point, but it also didn't work.
I've used:
The camera shows its view but doesn't move.
Then I've expanded the sequence of the two bytes ("0,1"; "1,1", "2,1", "3,1" and "4,1") in more interpolation points, and used the ACS commands:
And then the interpolation point with the values "2,1" showed its view and moved to the next ("3,1"), and stopped.
All this post probably sounded rather silly or dumb (
), but i'm rly lost with this stuff.
I was trying values of 1 and 1 because the camera tag is 255 (I forgot that the formula uses 256), so I was trying to get "256".
So, now I gave to the "Point" and "High Point" values of the camera respectively "0" and "1". Trying to get 256. But how do I declare to the game that the next interpolation point is "256"?
I tried to give the values of "1" and "1" to the next interpolation point, but it also didn't work.
I've used:
Code: Select all
ChangeCamera (255, 0, 0);
Then I've expanded the sequence of the two bytes ("0,1"; "1,1", "2,1", "3,1" and "4,1") in more interpolation points, and used the ACS commands:
Code: Select all
ChangeCamera (255, 0, 0);
Thing_Activate (255);All this post probably sounded rather silly or dumb (
