[Teton] Load a font file and write a character to the screen.
This commit is contained in:
parent
96063126cb
commit
fe44804dd9
19 changed files with 412 additions and 17 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "glacier/container/linked_list.h"
|
||||
#include "glacier/container/pair.h"
|
||||
#include "glacier/status/error.h"
|
||||
#include "glacier/string/string.h"
|
||||
|
||||
namespace glcr {
|
||||
|
||||
|
|
@ -22,6 +23,18 @@ struct HashFunc<uint64_t> {
|
|||
}
|
||||
};
|
||||
|
||||
template <>
|
||||
struct HashFunc<String> {
|
||||
uint64_t operator()(const String& value) {
|
||||
// FIXME: Write a real hash function.
|
||||
uint64_t acc = 0;
|
||||
for (uint64_t i = 0; i < value.length(); i++) {
|
||||
acc += value[i];
|
||||
}
|
||||
return 0xABBAABBAABBAABBA ^ acc;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename K, typename V, class H = HashFunc<K>>
|
||||
class HashMap {
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue