Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] Does anybody have any idea how that can be read/written from python?

[DiscordArchive] Does anybody have any idea how that can be read/written from python?

[DiscordArchive] Does anybody have any idea how that can be read/written from python?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
06-03-2018, 08:04 PM
#1
Archived author: Skarn • Posted: 2018-06-03T20:04:35.779000+00:00
Original source

Does anybody have any idea how that can be read/written from python?
rektbyfaith
06-03-2018, 08:04 PM #1

Archived author: Skarn • Posted: 2018-06-03T20:04:35.779000+00:00
Original source

Does anybody have any idea how that can be read/written from python?

rektbyfaith
Administrator
0
06-03-2018, 08:04 PM
#2
Archived author: Skarn • Posted: 2018-06-03T20:04:40.436000+00:00
Original source

```py
A fixed point real number, opposed to a floating point.

template<typename Base, size_t integer_bits, size_t decimal_bits> struct fixed_point
{
Base decimal : decimal_bits;
Base integer : integer_bits;
Base sign : 1;
float to_float() const { return (sign ? -1.0f : 1.0f) * (integer + decimal / float (1 << decimal_bits)); }
};
```
rektbyfaith
06-03-2018, 08:04 PM #2

Archived author: Skarn • Posted: 2018-06-03T20:04:40.436000+00:00
Original source

```py
A fixed point real number, opposed to a floating point.

template<typename Base, size_t integer_bits, size_t decimal_bits> struct fixed_point
{
Base decimal : decimal_bits;
Base integer : integer_bits;
Base sign : 1;
float to_float() const { return (sign ? -1.0f : 1.0f) * (integer + decimal / float (1 << decimal_bits)); }
};
```

rektbyfaith
Administrator
0
06-03-2018, 08:05 PM
#3
Archived author: Skarn • Posted: 2018-06-03T20:05:13.066000+00:00
Original source

I realize I need to use bitwise operators, but I am confused how I can read the integer_bits in the middle
rektbyfaith
06-03-2018, 08:05 PM #3

Archived author: Skarn • Posted: 2018-06-03T20:05:13.066000+00:00
Original source

I realize I need to use bitwise operators, but I am confused how I can read the integer_bits in the middle

rektbyfaith
Administrator
0
06-03-2018, 08:05 PM
#4
Archived author: Skarn • Posted: 2018-06-03T20:05:24.661000+00:00
Original source

and I am even more confused when it comes to converting a float to that
rektbyfaith
06-03-2018, 08:05 PM #4

Archived author: Skarn • Posted: 2018-06-03T20:05:24.661000+00:00
Original source

and I am even more confused when it comes to converting a float to that

rektbyfaith
Administrator
0
06-03-2018, 08:05 PM
#5
Archived author: Skarn • Posted: 2018-06-03T20:05:36.787000+00:00
Original source

(yeah, I suck a lot at bitwise things)
rektbyfaith
06-03-2018, 08:05 PM #5

Archived author: Skarn • Posted: 2018-06-03T20:05:36.787000+00:00
Original source

(yeah, I suck a lot at bitwise things)

rektbyfaith
Administrator
0
06-03-2018, 08:06 PM
#6
Archived author: Skarn • Posted: 2018-06-03T20:06:25.274000+00:00
Original source

<@309386531699687425> are you reading fixed point stuff in C#?
rektbyfaith
06-03-2018, 08:06 PM #6

Archived author: Skarn • Posted: 2018-06-03T20:06:25.274000+00:00
Original source

<@309386531699687425> are you reading fixed point stuff in C#?

rektbyfaith
Administrator
0
06-03-2018, 08:09 PM
#7
Archived author: Zee • Posted: 2018-06-03T20:09:29.943000+00:00
Original source

I never used that before.
rektbyfaith
06-03-2018, 08:09 PM #7

Archived author: Zee • Posted: 2018-06-03T20:09:29.943000+00:00
Original source

I never used that before.

rektbyfaith
Administrator
0
06-03-2018, 08:10 PM
#8
Archived author: Skarn • Posted: 2018-06-03T20:10:25.938000+00:00
Original source

<@309386531699687425> you are not parsing color animations and such yet?
rektbyfaith
06-03-2018, 08:10 PM #8

Archived author: Skarn • Posted: 2018-06-03T20:10:25.938000+00:00
Original source

<@309386531699687425> you are not parsing color animations and such yet?

rektbyfaith
Administrator
0
06-03-2018, 08:10 PM
#9
Archived author: Zee • Posted: 2018-06-03T20:10:42.661000+00:00
Original source

Not yet no.
rektbyfaith
06-03-2018, 08:10 PM #9

Archived author: Zee • Posted: 2018-06-03T20:10:42.661000+00:00
Original source

Not yet no.

rektbyfaith
Administrator
0
06-03-2018, 08:14 PM
#10
Archived author: schlumpf • Posted: 2018-06-03T20:14:16.737000+00:00
Original source

Make bit masks per field with #bits set. Shift left by sum of previous field sites. Binary-and. Shift back. Done.
rektbyfaith
06-03-2018, 08:14 PM #10

Archived author: schlumpf • Posted: 2018-06-03T20:14:16.737000+00:00
Original source

Make bit masks per field with #bits set. Shift left by sum of previous field sites. Binary-and. Shift back. Done.

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)