summaryrefslogtreecommitdiff
path: root/bowshock/source/bs/gendat.c
blob: 6d81876b394ed7ad4daa282335404ed92106c14a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2022-2023 Gabriel Jensen.

#include <bow/info.h>
#include <bow/sav.h>

#include <zap/mem.h>

#include <string.h>

void bow_gendat(bow_playdat * const playdatptr) {
	bow_log("generating player data");
	bow_playdat playdat;
	zap_cp(&playdat,playdatptr,sizeof (playdat));
	playdat.ship.typ  = bow_objtyp_ship;
	playdat.ship.mass = bow_shipmass(playdat.ship.shiptyp);
	zap_cp(playdatptr,&playdat,sizeof (playdat));
}