SARC: Difference between revisions

20 bytes removed ,  5 years ago
m
imported>Leoetlino
imported>Leoetlino
Line 10: Line 10:


<source lang="c++">
<source lang="c++">
  const uint32_t multiplier = 0x65;
const uint32_t multiplier = 0x65;
  const char* string = "月クッパ戦Lv3(クリア後).baglshpp";
const char* string = "月クッパ戦Lv3(クリア後).baglshpp";
  uint32_t hash = 0;
uint32_t hash = 0;
  int i = 0;
int i = 0;
  while (true) {
while (true) {
    char c = string[i++]; // *signed* char
  char c = string[i++]; // *signed* char
    if (!c)
  if (!c)
      break;
    break;
    hash = hash * multiplier + c;
  hash = hash * multiplier + c;
  }
}
</source>
</source>


Anonymous user