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 572|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Family
rockford Tue 15:57
RIP - Sir Roger Moore
rockford Tue 15:56
CSS-Me-Do - SoCoder2
Jayenkai Tue 09:41
Manchester Arena Explosion
rockford Tue 05:47
Any Feature Requests?
spinal Mon 12:02
Switch - Mini Dock
Jayenkai Mon 06:26
AGameAWeek : 2017 - Part One
rychan Mon 05:17
ArdWiiNo?
spinal Sun 12:42
Great Big Youtube thread
Jayenkai Sun 11:13
Time for a new Android Test Doohickey
Jayenkai Sun 07:00
More

Latest Items
Dev-Diary : My Journey into NES Development
rychan Tue 01:53
Showcase : Flappadiddle
Jayenkai Sun 14:39
Snippet : QFind
Jayenkai Sun 13:02
Showcase : Tiny Blocks
Jayenkai Sun 04:08
Showcase : Read Error A
rychan Fri 05:13
Blog : All my makes!
Jayenkai Tue 05:48
Showcase : Infinitron
rychan Mon 18:03
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
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
More

Who's Online
rskgames
Tue, at 18:08
rychan
Tue, at 17:58
shroom_monk
Tue, at 17:30
steve_ancell
Tue, at 17:15
rockford
Tue, at 15:58
Jayenkai
Tue, at 15:51
spinal
Tue, at 14:49
Pakz
Tue, at 14:41
Socoder
Tue, at 11:01
Dabz
Tue, at 10:58
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.