Latest Uploads
Invasion V ... prototype

rychan

Invasion V ... Prototype

rychan

Shields 64x64

Pakz

Ffs_Spam

Jayenkai

Hives Screen shot

rychan

Rpg Potion Sprites

Pakz

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 547|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
XB360 /XBOne Pads
Jayenkai Thu 16:21
ProcGen Book
Pakz Thu 13:28
Crystal Maze
Jayenkai Thu 05:56
Cerberus X - the continuation of Monkey X
Jayenkai Thu 03:54
Winter Solstice
therevillsgames Wed 16:47
AGameAWeek : 2017 - Part One
Jayenkai Wed 15:10
Polymaniacs Trailer
STEVIE G Wed 10:11
Pick a Theme
Jayenkai Wed 07:51
Let's Go Dizzy
rskgames Wed 04:58
CSS-Me-Do - SoCoder2
Jayenkai Wed 04:48
More

Latest Items
Dev-Diary : My Journey into NES Development
Jayenkai Thu 03:58
Showcase : A Civilization Clone
rychan Thu 03:27
News : Newsletter #320
Jayenkai Tue 18:47
Link : Learn C++
steve_ancell Tue 17:59
Blog : sadas
hardcoal22 Tue 02:50
Showcase : Flappadiddle
Jayenkai Mon 08:20
Article : Cookie Information
rychan Sun 12:28
Dev-Diary : Wii to N64 adapter
spinal Sat 11:50
Link : MonkeyX code examples
Jayenkai Sat 06:42
Link : Available Languages
Jayenkai Thu 13:22
Blog : Mr Testo Tests
Socoder Tue 07:21
Link : Chrome VR Experiments
Jayenkai Tue 06:49
Showcase : Orbital Projectiles
Jayenkai Tue 06:39
Showcase : Hives
zzoom Fri 16:10
Showcase : Tiny Blocks
Jayenkai Sun 04:08
More

Who's Online
TomToad
Thu, at 19:02
Pakz
Thu, at 18:34
steve_ancell
Thu, at 18:03
shroom_monk
Thu, at 17:58
Jayenkai
Thu, at 17:58
rychan
Thu, at 17:47
GfK
Thu, at 17:21
therevillsgames
Thu, at 16:41
Krakatomato
Thu, at 16:33
STEVIE G
Thu, at 16:10
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.