English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 07 July 2019, 13:52   #1
thyslo
Registered User
 
Join Date: Apr 2018
Location: Germany
Posts: 45
Covert BitMap to ImageData for Bobs

I'm just trying to display a Bob using the GELs system.

RKRM Libraries page 637 contains a description of the image format needed to display a Bob properly.

However I loaded the image already using datatypes. Now I've a pointer to the struct BitMap of the image data.

I just don't know how to convert it.

Is there any known way to convert the BitMap->Planes to the Bob format?
thyslo is offline  
Old 07 July 2019, 16:37   #2
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 202
Quote:
Originally Posted by thyslo View Post
Is there any known way to convert the BitMap->Planes to the Bob format?
It's really quite simple. The bob "ImageData" field is the concatenation of all image planes, bob->Depth of them. Each plane is an array that is (bob->Width + 15) & -16 bytes wide and bob->Height lines high. Or to put it in simple words, if you have a "struct Bitmap", and this bitmap is non-interleaved, planar, then "bob->ImageData" is simply the concatenation of all the data which is found in the Bitmap->PlanePtrs. For example:
Code:
 NEWOB myNewBob = {      /* Data for the new ob structure defined in animtools.h */         bob_data2,NULL, /* Image,ColorSet */         32,4,2,2,       /* Width,Heigth,Depth,RasterDepth       */         160,100,        /* x,y                  */         SAVEBACK | OVERLAY,ISBOB,       /* Flags,ExtraFlags     */         3,0,            /* PlanePick,PlaneOnOff         */         0,0             /* meMask,hitMask */ };
is a bob of 32 pixels wide and 4 pixels high, two bitplanes. A potential image data array then reads as follows:
Code:
 UWORD __chip bob_data2[2*2*GEL_SIZE]={         /*plane 1*/         0xaaaa,0xaaaa,0xaaaa,0xaaaa,0xaaaa,0xaaaa,0xaaaa,0xaaaa,         /*plane 2*/         0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555,0x5555 };
HTHH, Thomas
Thomas Richter is offline  
 


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
GOTEK Floppy Emulator: Covert ADF to real floppies? c0dehunter support.Hardware 7 29 May 2016 20:27
Clipping bobs roondar Coders. General 18 24 September 2015 09:54
FS: Various bits n bobs jujasi MarketPlace 0 12 July 2009 19:13
Covert Action bornemannen Games images which need to be WHDified 4 04 October 2006 12:32
Covert Action by Microprose hiptanaka request.Old Rare Games 2 30 July 2006 20:32

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.05617 seconds with 14 queries