Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] So to get like the first 8?

[DiscordArchive] So to get like the first 8?

[DiscordArchive] So to get like the first 8?

Pages (4): Previous 1 2 3 4 Next
rektbyfaith
Administrator
0
06-03-2018, 09:06 PM
#21
Archived author: Kavligula • Posted: 2018-06-03T21:06:59.577000+00:00
Original source

This is an example of how to get specific bits out of an integer
rektbyfaith
06-03-2018, 09:06 PM #21

Archived author: Kavligula • Posted: 2018-06-03T21:06:59.577000+00:00
Original source

This is an example of how to get specific bits out of an integer

rektbyfaith
Administrator
0
06-03-2018, 09:07 PM
#22
Archived author: Kavligula • Posted: 2018-06-03T21:07:01.947000+00:00
Original source

I *think*
rektbyfaith
06-03-2018, 09:07 PM #22

Archived author: Kavligula • Posted: 2018-06-03T21:07:01.947000+00:00
Original source

I *think*

rektbyfaith
Administrator
0
06-03-2018, 09:08 PM
#23
Archived author: Skarn • Posted: 2018-06-03T21:08:16.896000+00:00
Original source

the question now is how to construct those masks dynamically
rektbyfaith
06-03-2018, 09:08 PM #23

Archived author: Skarn • Posted: 2018-06-03T21:08:16.896000+00:00
Original source

the question now is how to construct those masks dynamically

rektbyfaith
Administrator
0
06-03-2018, 09:08 PM
#24
Archived author: Skarn • Posted: 2018-06-03T21:08:24.380000+00:00
Original source

when given different n_bits
rektbyfaith
06-03-2018, 09:08 PM #24

Archived author: Skarn • Posted: 2018-06-03T21:08:24.380000+00:00
Original source

when given different n_bits

rektbyfaith
Administrator
0
06-03-2018, 09:08 PM
#25
Archived author: Kavligula • Posted: 2018-06-03T21:08:40.456000+00:00
Original source

It'd just be multiplying some value by the size of n_bits
rektbyfaith
06-03-2018, 09:08 PM #25

Archived author: Kavligula • Posted: 2018-06-03T21:08:40.456000+00:00
Original source

It'd just be multiplying some value by the size of n_bits

rektbyfaith
Administrator
0
06-03-2018, 09:09 PM
#26
Archived author: Kavligula • Posted: 2018-06-03T21:09:37.345000+00:00
Original source

In the example you listed they're just using size_t
rektbyfaith
06-03-2018, 09:09 PM #26

Archived author: Kavligula • Posted: 2018-06-03T21:09:37.345000+00:00
Original source

In the example you listed they're just using size_t

rektbyfaith
Administrator
0
06-03-2018, 09:09 PM
#27
Archived author: Kavligula • Posted: 2018-06-03T21:09:45.439000+00:00
Original source

Which is defined depending on the architecture iirc
rektbyfaith
06-03-2018, 09:09 PM #27

Archived author: Kavligula • Posted: 2018-06-03T21:09:45.439000+00:00
Original source

Which is defined depending on the architecture iirc

rektbyfaith
Administrator
0
06-03-2018, 09:09 PM
#28
Archived author: Kavligula • Posted: 2018-06-03T21:09:54.484000+00:00
Original source

schlumpf would have a better idea of that, I don't do much bit manipulation anymore
rektbyfaith
06-03-2018, 09:09 PM #28

Archived author: Kavligula • Posted: 2018-06-03T21:09:54.484000+00:00
Original source

schlumpf would have a better idea of that, I don't do much bit manipulation anymore

rektbyfaith
Administrator
0
06-03-2018, 09:12 PM
#29
Archived author: schlumpf • Posted: 2018-06-03T21:12:00.051000+00:00
Original source

def mask(bits):
r = 0
while bits:
r = r | 1
r = r << 1
bits -= 1
return r

mask(1)=0b1
mask2)=0b11
rektbyfaith
06-03-2018, 09:12 PM #29

Archived author: schlumpf • Posted: 2018-06-03T21:12:00.051000+00:00
Original source

def mask(bits):
r = 0
while bits:
r = r | 1
r = r << 1
bits -= 1
return r

mask(1)=0b1
mask2)=0b11

rektbyfaith
Administrator
0
06-03-2018, 09:15 PM
#30
Archived author: schlumpf • Posted: 2018-06-03T21:15:36.498000+00:00
Original source

A = (raw & mask(bitsa)) >> 0
B = (raw & (mask(bitsb) << bitsa)) >> (bitsa)
sign = (raw & (mask(1) << (bitsa+bitsb)) >> (bitsa+bitsb)
rektbyfaith
06-03-2018, 09:15 PM #30

Archived author: schlumpf • Posted: 2018-06-03T21:15:36.498000+00:00
Original source

A = (raw & mask(bitsa)) >> 0
B = (raw & (mask(bitsb) << bitsa)) >> (bitsa)
sign = (raw & (mask(1) << (bitsa+bitsb)) >> (bitsa+bitsb)

Pages (4): Previous 1 2 3 4 Next
Recently Browsing
 
Recently Browsing