BitmapApi BoolBitmapApi FloatBitmapApi PolygonApi MaterialsApi ShaderApi LinesApi PointsApi MoveApi PointApi VectorApi VolumeApi FloatVolumeApi ColorVolumeApi FontApi TextureApi BooleanOpsApi PolyDistFieldApi WaveformApi MainLoopApi FrameBufferApi
new new_bm new_fb new_bb bm_expr load save_png save_png_arr save_raw save_gif_anim bm_url bm_fetch bm_fetch2 bm_gltf bm_atlas_x bm_atlas_y bm_atlas_xy bm_cubemap bm_invcubemap edge_fix border add_shape_border bm_choose_color sub alt compose_x compose_y blit blitFB blitBB bm_scale bm_scale2 bm_fullscreen interpolate bm_color bm_plus bm_medianfilter repeat flip_x flip_y rot90 indicator fractal_mountain lightmap noise_vec gradient circ_gradient chessboard mandelbrot blur floodfill floodfill_color floodfill_color_inv gray_to_black baked_shadow bm_bumpmap bm_memoize bm_world_from_bitmap bm_persistent_cache cbm_empty cbm_from_bitmap cbm_to_bitmap cbm_bicubic cbm_sample cbm_rotate s_spherical s_bitmap s_sample cfb_c cfb_x cfb_y cfb_add cfb_mul cfb_sqrt cfb_sin cfb_cos cfb_tan cfb_sample cfb_equalizer cbb_sample
// FINDING: BitmapApi newbitmap

class ConstantBitmap_Color : public Bitmap<Color>
{
public:
  ConstantBitmap_Color(Color c, int x, int y) : c(c), x(x), y(y) { }
  void Collect(CollectVisitor &vis) { }
  void HeavyPrepare() { }
  void Prepare() { }

  int SizeX() const { return x; }
  int SizeY() const { return y; }
  Color Map(int , int ) const
  {
    return c;
  }
private:
  Color c;
  int x,y;
};

EXPORT GameApi::BM GameApi::BitmapApi::newbitmap(int sx, int sy, unsigned int color)
{
  ::Bitmap<Color> *b = new ConstantBitmap_Color(Color(color), sx,sy);
  BitmapColorHandle *handle = new BitmapColorHandle;
  handle->bm = b;
  BM bm = add_bitmap(e, handle);
  return bm;
  
}