Latest Uploads
Ffs_Spam

Jayenkai

Hives Screen shot

rychan

Rpg Potion Sprites

Pakz

Super Shap ... ration Kit

Andy_A

Platdude Spotting

Jayenkai

Nom nom nom

Jayenkai

Forum Home

replace two half bytes with one byte?

UserMessage
Posted : Monday, 09 January 2017, 10:23 | Permalink
spinal


That title might not help but...

I have 1 byte that I want to overlap 50% over two other bytes, leaving the remaining outer half bytes untouched...

-->

Like always, I seem to be nrealy there, just not quite

Any ideas?

-----
Download "Don't Flip Out!" Directly to your OUYA! (Click Here).
Homepage : http://spinalcode.co.uk
Posted : Monday, 09 January 2017, 10:58 | Permalink
Jayenkai


WW Entries : 106
Like so..?

(Blitz2D/3D/Plus)
-->

-----
"Load, Next List!"
Homepage : http://AGameAWeek.com
Posted : Monday, 09 January 2017, 13:09 | Permalink
spinal


something like that, yup.
Homepage : http://spinalcode.co.uk
Posted : Tuesday, 04 April 2017, 09:46 | Permalink
spinal


hmmmm, need to update this to use a variable instead of the '4' for example, add the first X bytes to my other byte. So say I want to drop a 5 bit number starting at bit 2 of my 8bit number... ???

-----
Download "Don't Flip Out!" Directly to your OUYA! (Click Here).
Homepage : http://spinalcode.co.uk
Posted : Tuesday, 04 April 2017, 14:27 | Permalink
shroom_monk


WW Entries : 8
Here's a simple C++ example that I think does what you want. |edit| (although on subsequent readings, I'm not quite sure what you're getting at with the second sentence; I think what I've done covers the first) |edit| It can be made more concise than this, of course, but I've spread it out to make it easier to follow.

-->

-----
A mushroom a day keeps the doctor away...

Keep It Simple, Shroom!
Posted : Friday, 07 April 2017, 02:58 | Permalink
spinal


Thanks for the help, but unfortunately, I changed my data size to 4 bits, so I''l be going with the first option again.

Sorry shroom.

-----
Download "Don't Flip Out!" Directly to your OUYA! (Click Here).
Homepage : http://spinalcode.co.uk
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 662|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
AGameAWeek : 2017 - Part One
Jayenkai Thu 13:07
Possible LCD experimentation imminent.
steve_ancell Thu 11:49
Arduboy Owners Club
rychan Thu 10:41
Buy Zelda
rockford Wed 16:00
What Have You Done? - April 2017
rychan Wed 06:43
I Hear Voices
Jayenkai Tue 04:30
QOTD : Best TV Show
Pakz Mon 11:30
Repetitive Blogging
rskgames Fri 10:04
TinyBlocks
spinal Fri 06:46
A New Korg Gadget!
Jayenkai Thu 12:30
More

Latest Items
Showcase : Hives
rockford Wed 12:53
Showcase : Quadoban
rskgames Fri 10:11
Blog : My Arduino experience.
steve_ancell Wed 17:02
Showcase : Roguelike Explorer
Pakz Fri 06:59
Showcase : Infinitron
Jayenkai Mon 07:50
News : Newsletter #311
Jayenkai Thu 17:27
Link : Super Shapes Exploration Kit
Andy_A Thu 11:09
Dev-Diary : Sensitive - Arduboy!
rychan Thu 17:27
Snippet : Skylines
steve_ancell Tue 14:25
Dev-Diary : PS2 to N64 Adapter
spinal Sun 10:49
Link : Vector Tutorials/Help page.
Pakz Thu 23:00
Blog : mini project
spinal Sun 10:13
Showcase : Blockman Returns
Jayenkai Fri 03:04
Snippet : Wall Tracing on Random Maps (rpg)
rskgames Wed 22:48
More

Who's Online
spinal
Thu, at 14:07
Jayenkai
Thu, at 13:58
steve_ancell
Thu, at 13:58
HoboBen
Thu, at 13:41
rockford
Thu, at 13:40
rychan
Thu, at 10:41
rskgames
Thu, at 10:32
Andy_A
Thu, at 09:28
Krakatomato
Thu, at 03:58
Pakz
Thu, at 01:04
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.