Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我搜索了很多,但我找不到任何关于在 allegro 5 中比较 2 个位图的信息。在 Allegro 4 中只有 is_same_bitmap() 。我想问你除了比较位图的像素之外是否有任何简单的方法。谢谢你。
您将需要比较像素。(或者你可以计算一个哈希值并比较它们,但是做像素可能会更快,因为你可以在找到不匹配的像素时立即停止。)
为了加快速度,您应该al_lock_bitmap_region()通过返回的数据结构锁定位图并直接访问内存。
al_lock_bitmap_region()