The simple and common way, provided you can afford the memory requirements, is to build a temporary image of your map into a buffer when the level starts, and then do (x,y) lookups from there.
So, if your screen consists of 20 map tiles across by 20 map tiles down, you would reserve a 400 byte buffer for this and, upon starting the level, clear it and then iterate through all your platforms and write the 'tile index' of each one at buffer + x + y*20.
Then, during the game, you can look up a tile simply by the same method.
Chuckie Egg, amongst countless others I'm sure, does exactly this in order to read its map data quickly.
If you don't want to use this method, then you can always do it by hand. Here are a few possibilities:
1) If you're not so concerned about speed (e.g. because only the player needs to check collisions), then you could just iterate through every platform. I would store them as (top left x, top left y, width, height), and then the check for collision is just (in some pseudocode type thing):
Code:
function checkplatform(x, y):
foreach platform p:
dx = x - p.topleftx
dy = y - p.toplefty
if (dx >= 0 and dx < p.width and dy >= 0 and dy < p.height)
return true
return false
This would also allow you to have bigger rectangular blocks of tiles.
2) For something a bit faster, you could handle horizontal and vertical platforms separately, and use two tables: one containing 20 entries for x positions, in which a bit is set for each vertical platform which exists in that column; and another containing 20 entries for y positions, in which a bit is set for each horizontal platform which exists in that row. This would allow you to see quickly if there is anything in the row/column you are looking up, and give you all the indices of potential platforms. Then you would have a smaller set of platforms to do a more detailed check on, like the one above. Blurp does something similar for testing collisions between bullets and monsters (there's a bit more detail on my blog).
Hope that helps!
Rich